1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-06-06 07:11:54 +00:00
This commit is contained in:
Newnius 2020-04-30 12:02:56 +08:00
parent 4348a51ceb
commit 29f9714e2a
3 changed files with 11 additions and 1 deletions

View File

@ -31,6 +31,7 @@ function job_submit(CRObject $job)
$task['memory'] = intval($task['memory']);
$task['gpu_number'] = intval($task['gpu_number']);
$task['gpu_memory'] = intval($task['gpu_memory']);
$task['is_ps'] = $task['is_ps'] == 1;
$tasks[$i] = $task;
}
$job->set('tasks', $tasks);

View File

@ -155,13 +155,20 @@
<button type="button" class="btn btn-default task-remove">Remove</button>
</div>
</div>
<div class="col-md-2">
<div class="col-md-1">
<label>Host Name</label>
<div class="form-group">
<input type="text" class="form-control task-name" maxlength="32"
placeholder="Task Name & Node Name" value="node1" required/>
</div>
</div>
<div class="col-md-1">
<label>Node Role<abbr title="Node role">?</abbr></label>
<select class="form-control form-control task-is-ps" required>
<option value="1">PS</option>
<option value="0" selected>Worker</option>
</select>
</div>
<div class="col-md-2">
<label>CPU Number</label>
<div class="form-group">

View File

@ -57,6 +57,8 @@ function register_events_job() {
task['memory'] = $(this).find('.task-mem').eq(0).val();
task['gpu_number'] = $(this).find('.task-gpu-num').eq(0).val();
task['gpu_memory'] = $(this).find('.task-gpu-mem').eq(0).val();
task['is_ps'] = $(this).find('.task-is-ps').eq(0).val();
task['gpu_model'] = $(this).find('.task-gpu-model').eq(0).val();
tasks.push(task);
});