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-05-01 12:49:32 +08:00
parent 311bc68cd1
commit 3eff537d5f
4 changed files with 5 additions and 2 deletions

View File

@ -76,6 +76,7 @@ switch ($action) {
$job->set('workspace', cr_get_POST('workspace'));
$job->set('priority', cr_get_POST('priority'));
$job->set('run_before', cr_get_POST('run_before'));
$job->set('locality', cr_get_POST('locality'));
$job->set('tasks', cr_get_POST('tasks'));
$res = job_submit($job);
break;

View File

@ -38,6 +38,7 @@ function job_submit(CRObject $job)
$job->set('workspace', $job->get('workspace'));
$job->set('group', $job->get('virtual_cluster'));
$job->set('priority', $job->getInt('priority'));
$job->set('locality', $job->getInt('locality'));
$job->set('run_before', $job->getInt('run_before'));
$job->set('created_by', $job->getInt('created_by'));
$data['job'] = json_encode($job);

View File

@ -170,7 +170,7 @@
</select>
</div>
<div class="col-md-1">
<label>CPU Number</label>
<label>CPU</label>
<div class="form-group">
<input type="number" class="form-control task-cpu" step="1" min="1" value="1"
placeholder="number of CPU required" required/>
@ -192,7 +192,7 @@
</select>
</div>
<div class="col-md-1">
<label>GPU Number</label>
<label>GPU</label>
<div class="form-group">
<input type="number" class="form-control task-gpu-num" step="1" min="1" value="1"
placeholder="number of GPU cards required" required/>

View File

@ -44,6 +44,7 @@ function register_events_job() {
var cluster = $('#form-job-cluster').val();
var priority = $('#form-job-priority').val();
var run_before = $('#form-job-run-before').val();
var locality = $('#form-job-locality').val();
if (run_before.length !== 0) {
run_before = moment(run_before).unix();
}