update batch create page
This commit is contained in:
parent
2eb187c066
commit
db73229e11
|
@ -224,6 +224,7 @@
|
||||||
var masterip=$("select#masterselector").children('option:selected').val();
|
var masterip=$("select#masterselector").children('option:selected').val();
|
||||||
//mapping_number = 0;
|
//mapping_number = 0;
|
||||||
var task_html = '';
|
var task_html = '';
|
||||||
|
var images = images_info
|
||||||
task_html +=
|
task_html +=
|
||||||
'<div class="panel panel-default" id="task_pannel_' + task_number + '">'
|
'<div class="panel panel-default" id="task_pannel_' + task_number + '">'
|
||||||
+'<div class="panel-heading">'
|
+'<div class="panel-heading">'
|
||||||
|
@ -235,55 +236,13 @@
|
||||||
+'<div id="collapse' + task_number + '" class="panel-collapse collapse in">'
|
+'<div id="collapse' + task_number + '" class="panel-collapse collapse in">'
|
||||||
+'<div class="panel-body">'
|
+'<div class="panel-body">'
|
||||||
+'<div class="form-group">'
|
+'<div class="form-group">'
|
||||||
+'<label class="col-sm-2 control-label">CPU</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="cpuSetting_' + task_number + '" id="cpuSetting_' + task_number + '" value = 1 min="1" max="8" required/>'
|
|
||||||
+'</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Memory</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="memorySetting_' + task_number + '" id="memorySetting_' + task_number + '" value = 1024 min="100" max="8196" required/>'
|
|
||||||
+'</div>MB</div>'
|
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">GPU</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="gpuSetting_' + task_number + '" id="gpuSetting_' + task_number + '" value= 0 min="0" max="2" required/>'
|
|
||||||
+'</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Disk</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="diskSetting_' + task_number + '" id="diskSetting_' + task_number + '" value= 1024 min="128" max="10000" required/>'
|
|
||||||
+'</div>MB</div>'
|
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">VNode Number</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="vnodeCount_' + task_number + '" id="vnodeCount_' + task_number + '" value= 1 min="1" max="14" required/>'
|
|
||||||
+'</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Max Retry Times</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="retryCount_' + task_number + '" id="retryCount_' + task_number + '" value= 1 min="0" max="5" required/>'
|
|
||||||
+'</div></div>'
|
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">Running Path</label>'
|
+'<label class="col-sm-2 control-label">Running Path</label>'
|
||||||
+'<div class="col-sm-3"><input type="text" class="form-control" name="srcAddr_' + task_number + '" id="srcAddr_' + task_number + '" value="/root" required/>'
|
+'<div class="col-sm-3"><input type="text" class="form-control" name="srcAddr_' + task_number + '" id="srcAddr_' + task_number + '" value="/root" required/>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
+'<label class="col-sm-2 control-label">Expire Time</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="number" class="form-control" name="expTime_' + task_number + '" id="expTime_' + task_number + '" value= 60 min="10" max="86400" required/>'
|
|
||||||
+'</div>Seconds</div>'
|
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">Stderr Redirect Path</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="text" class="form-control" placeholder="/path/to/file or /path/" name="stdErrRedPth_' + task_number + '" id="stdErrRedPth_' + task_number + '" value="/root/nfs/batch_{jobid}/" required/>'
|
|
||||||
+'</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Stdout Redirect Path</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="text" class="form-control" placeholder="/path/to/file or /path/" name="stdOutRedPth_' + task_number + '" id="stdOutRedPth_' + task_number + '" value="/root/nfs/batch_{jobid}/" required/>'
|
|
||||||
+'</div></div>'
|
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">Dependency <i class="fa fa-question-circle" title="The tasks ids that this task depends on, seperate them with commas, eg: 1, 2"></i></label>'
|
|
||||||
+'<div class="col-sm-3"><input type="text" class="form-control" name="dependency_' + task_number + '" id="dependency_' + task_number + '" />'
|
|
||||||
+'</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Command</label>'
|
+'<label class="col-sm-2 control-label">Command</label>'
|
||||||
+'<div class="col-sm-3"><input type="text" class="form-control" name="command_' + task_number + '" id="command_' + task_number + '" required/>'
|
+'<div class="col-sm-3"><input type="text" class="form-control" name="command_' + task_number + '" id="command_' + task_number + '" required/>'
|
||||||
+'</div></div>'
|
+'</div></div>'
|
||||||
+'<div class="form-group">'
|
|
||||||
+'<label class="col-sm-2 control-label">Run on: </label>'
|
|
||||||
+'<div class="col-sm-3"><input type="radio" name="runon_' + task_number + '" value="all" checked="checked"/>All vnodes  '
|
|
||||||
+' <input type="radio" name="runon_' + task_number + '" value="master" />One vnode(master)</div>'
|
|
||||||
+'<label class="col-sm-2 control-label">Start at the Same Time</label>'
|
|
||||||
+'<div class="col-sm-3"><input type="checkbox" name="atSameTime_' + task_number + '" checked="checked"/>'
|
|
||||||
+'</div></div>'
|
|
||||||
var images = images_info
|
|
||||||
task_html +=
|
task_html +=
|
||||||
'<div class="form-group"><label class="col-sm-2 control-label">Image Choose</label>'
|
'<div class="form-group"><label class="col-sm-2 control-label">Image Choose</label>'
|
||||||
+'<div class="col-sm-10">'
|
+'<div class="col-sm-10">'
|
||||||
|
@ -337,7 +296,61 @@
|
||||||
'</tbody></table>'
|
'</tbody></table>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
|
task_html +=
|
||||||
|
'<div class="panel panel-default" id="task_subpannel_' + task_number + '">'
|
||||||
|
+'<div class="panel-heading">'
|
||||||
|
+'<h4 class="panel-title">'
|
||||||
|
+'<a data-toggle="collapse" data-panel="#acc" href="#subcollapse' + task_number + '">'
|
||||||
|
+'Show detailed options'
|
||||||
|
+'</a>'
|
||||||
|
+'</h4></div>'
|
||||||
|
+'<div id="subcollapse' + task_number + '" class="panel-collapse collapse">'
|
||||||
|
+'<div class="panel-body">'
|
||||||
+'<div class="form-group">'
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">CPU</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="cpuSetting_' + task_number + '" id="cpuSetting_' + task_number + '" value = 1 min="1" max="8" required/>'
|
||||||
|
+'</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Memory</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="memorySetting_' + task_number + '" id="memorySetting_' + task_number + '" value = 1024 min="100" max="8196" required/>'
|
||||||
|
+'</div>MB</div>'
|
||||||
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">GPU</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="gpuSetting_' + task_number + '" id="gpuSetting_' + task_number + '" value= 0 min="0" max="2" required/>'
|
||||||
|
+'</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Disk</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="diskSetting_' + task_number + '" id="diskSetting_' + task_number + '" value= 1024 min="128" max="10000" required/>'
|
||||||
|
+'</div>MB</div>'
|
||||||
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">VNode Number</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="vnodeCount_' + task_number + '" id="vnodeCount_' + task_number + '" value= 1 min="1" max="14" required/>'
|
||||||
|
+'</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Max Retry Times</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="retryCount_' + task_number + '" id="retryCount_' + task_number + '" value= 1 min="0" max="5" required/>'
|
||||||
|
+'</div></div>'
|
||||||
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">Dependency <i class="fa fa-question-circle" title="The tasks ids that this task depends on, seperate them with commas, eg: 1, 2"></i></label>'
|
||||||
|
+'<div class="col-sm-3"><input type="text" class="form-control" name="dependency_' + task_number + '" id="dependency_' + task_number + '" />'
|
||||||
|
+'</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Expire Time</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="number" class="form-control" name="expTime_' + task_number + '" id="expTime_' + task_number + '" value= 3600 min="10" max="86400" required/>'
|
||||||
|
+'</div>Seconds</div>'
|
||||||
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">Stderr Redirect Path</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="text" class="form-control" placeholder="/path/to/file or /path/" name="stdErrRedPth_' + task_number + '" id="stdErrRedPth_' + task_number + '" value="/root/nfs/batch_{jobid}/" required/>'
|
||||||
|
+'</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Stdout Redirect Path</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="text" class="form-control" placeholder="/path/to/file or /path/" name="stdOutRedPth_' + task_number + '" id="stdOutRedPth_' + task_number + '" value="/root/nfs/batch_{jobid}/" required/>'
|
||||||
|
+'</div></div>'
|
||||||
|
+'<div class="form-group">'
|
||||||
|
+'<label class="col-sm-2 control-label">Run on: </label>'
|
||||||
|
+'<div class="col-sm-3"><input type="radio" name="runon_' + task_number + '" value="all" checked="checked"/>All vnodes  '
|
||||||
|
+' <input type="radio" name="runon_' + task_number + '" value="master" />One vnode(master)</div>'
|
||||||
|
+'<label class="col-sm-2 control-label">Start at the Same Time</label>'
|
||||||
|
+'<div class="col-sm-3"><input type="checkbox" name="atSameTime_' + task_number + '" checked="checked"/>'
|
||||||
|
+'</div></div>'
|
||||||
|
|
||||||
|
task_html +=
|
||||||
|
'<div class="form-group">'
|
||||||
+'<label class="col-sm-2 control-label">Object Storage Mapping<br/>'
|
+'<label class="col-sm-2 control-label">Object Storage Mapping<br/>'
|
||||||
+'<button type="button" id="' + task_number + '" class="btn btn-primary btn-xs" title="add an external storage mapping" onclick="addMapping(this,'+task_number+')">'
|
+'<button type="button" id="' + task_number + '" class="btn btn-primary btn-xs" title="add an external storage mapping" onclick="addMapping(this,'+task_number+')">'
|
||||||
+'Add<i class="fa fa-plus"></i></button></label>'
|
+'Add<i class="fa fa-plus"></i></button></label>'
|
||||||
|
@ -349,8 +362,9 @@
|
||||||
+'</tbody>'
|
+'</tbody>'
|
||||||
+'</table></div>'
|
+'</table></div>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
+'<div class="box-tools pull-right"><button type="button" id="' + task_number + '" onclick="unfoldTask(this)" class="btn btn-primary">Confirm</button></div>'
|
|
||||||
+'</div></div></div>'
|
+'</div></div></div>'
|
||||||
|
+'<div class="box-tools pull-right"><button type="button" id="' + task_number + '" onclick="unfoldTask(this)" class="btn btn-primary">Confirm</button></div>'
|
||||||
|
+'</div></div>'
|
||||||
$(task_html).appendTo("#accordion");
|
$(task_html).appendTo("#accordion");
|
||||||
}
|
}
|
||||||
addTask();
|
addTask();
|
||||||
|
|
Loading…
Reference in New Issue