Browse Source

fix issue

tags/v1.22.12.1^2
zhoupzh 3 years ago
parent
commit
18cf98de7c
2 changed files with 3 additions and 119 deletions
  1. +3
    -118
      templates/repo/grampus/notebook/gpu/new.tmpl
  2. +0
    -1
      templates/repo/grampus/notebook/npu/new.tmpl

+ 3
- 118
templates/repo/grampus/notebook/gpu/new.tmpl View File

@@ -1,22 +1,4 @@
{{template "base/head" .}}
<style>

/* 遮罩层css效果图 */
.inline.required.field.cloudbrain_benchmark {
display: none;
}

.inline.required.field.cloudbrain_snn4imagenet {
display: none;
}

.inline.required.field.cloudbrain_brainscore {
display: none;
}


</style>

{{template "custom/global_mask" .}}

<div class="repository">
@@ -33,7 +15,6 @@
{{template "custom/alert_cb" .}}
<form id="form_id" class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name='isBranches' value="{{.Branches}}">
<input type="hidden" name="type" value="0">
<h3 class="ui top attached header">
{{.i18n.Tr "repo.cloudbrain.new"}}
@@ -84,30 +65,6 @@
placeholder="{{.i18n.Tr "cloudbrain.task_name"}}" value="{{.display_job_name}}" tabindex="3"
autofocus required maxlength="255" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
</div>

<div class="inline required field">
<label>{{.i18n.Tr "cloudbrain.task_type"}}</label>
<select id="cloudbrain_job_type" class="ui search dropdown"
placeholder="{{.i18n.Tr "cloudbrain.task_type"}}" style='width:385px' name="job_type">
<option name="job_type" value="DEBUG">DEBUG</option>
</select>
</div>

<div class="inline required field cloudbrain_benchmark">
<label style="vertical-align: top; margin-top:9px">数据集类别</label>
<select class="ui search dropdown" multiple="multiple" id="cloudbrain_benchmark_category"
style='width:385px'>
{{range .benchmark_categories}}
<option value="{{.Value}}">{{.Value}}</option>
{{end}}
</select>
<div class="mini ui buttons" style="vertical-align: top; margin-top:9px">
<button class="ui button reset">重置</button>
<div class="or"></div>
<button class="ui positive button active all_selected">全选</button>
</div>
</div>
<input id="store_category" type="hidden" name="get_benchmark_category">
<div class="inline required field">
<label>{{.i18n.Tr "repo.modelarts.code_version"}}</label>
<select class="ui dropdown width80 left2 {{if not .Branches}}error{{end}}" id="code_version"
@@ -154,42 +111,10 @@
</div>
{{end}}
</div>

<div class="inline required field">
<label>{{.i18n.Tr "cloudbrain.dataset_storage_path"}}</label>
<input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3"
disabled autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field">
<label>{{.i18n.Tr "cloudbrain.model_storage_path"}}</label>
<input name="model_path" id="cloudbrain_model_path" value="{{.model_path}}" tabindex="3"
disabled autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field">
<label>{{.i18n.Tr "cloudbrain.code_storage_path"}}</label>
<input name="code_path" id="cloudbrain_code_path" value="{{.code_path}}" tabindex="3" disabled
autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field cloudbrain_benchmark">
<label>{{.i18n.Tr "cloudbrain.benchmark_path"}}</label>
<input name="benchmark_path" id="cloudbrain_benchmark_path" value="{{.benchmark_path}}"
tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field cloudbrain_snn4imagenet">
<label>{{.i18n.Tr "cloudbrain.snn4imagenet_path"}}</label>
<input name="snn4imagenet_path" id="cloudbrain_snn4imagenet_path" value="{{.snn4imagenet_path}}"
tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field cloudbrain_brainscore">
<label>{{.i18n.Tr "cloudbrain.brainscore_path"}}</label>
<input name="brainscore_path" id="cloudbrain_brainscore_path" value="{{.brainscore_path}}"
tabindex="3" disabled autofocus required maxlength="255" readonly="readonly">
</div>
<div class="inline required field" hidden>
<label>{{.i18n.Tr "cloudbrain.start_command"}}</label>
<textarea name="command" rows="10" readonly="readonly">{{.command}}</textarea>
<div class="inline field">
<label>{{.i18n.Tr "cloudbrain.description"}}</label>
<input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255">
</div>

<div class="inline field">
<label></label>
<button class="ui green button {{if eq .NotStopTaskCount 1}}disabled{{end}}">
@@ -207,12 +132,6 @@
<script src="{{StaticUrlPrefix}}/js/specsuse.js?v={{MD5 AppVer}}" type="text/javascript"></script>
<script>
let form = document.getElementById('form_id');
$('#messageInfo').css('display', 'none')
function clearValue() {
context = inputs[0]
context.value = ''
$(".icon.icons").css("visibility", "hidden")
}
var isValidate = false;
function validate(){
$('.ui.form').form({
@@ -246,8 +165,6 @@
if (!isValidate) return false;
if(createFlag) return false
let value_task = $("input[name='display_job_name']").val()
let value_image = $("input[name='image']").val()
let value_data = $("input[name='attachment']").val()
let re = /^[a-z0-9][a-z0-9-_]{1,34}[a-z0-9-]$/
let flag = re.test(value_task)
if (!flag) {
@@ -261,7 +178,6 @@
createFlag = true
document.getElementById("mask").style.display = "block"
}

// 页面加载完毕后遮罩层隐藏
document.onreadystatechange = function () {
if (document.readyState === "complete") {
@@ -269,37 +185,6 @@
}

}

$('#cloudbrain_benchmark_category')
.dropdown({
placeholder: "选择数据集类别",
})
$(".ui.button.reset").click(function (e) {
e.preventDefault()
$('#cloudbrain_benchmark_category')
.dropdown("clear", true)
})
$(".ui.positive.button.active.all_selected").click(function (e) {
e.preventDefault()
var selected_value = new Array()
$("#cloudbrain_benchmark_category option").each(function () {
selected_value.push($(this).val())
});
$('#cloudbrain_benchmark_category')
.dropdown("set exactly", selected_value)
})


$('.ui.green.button').click(function () {
if (!$('input[name="isBranches"]').val()) {
return false
}
selected_value = $("#cloudbrain_benchmark_category").val()
$('#store_category').attr("value", selected_value)
validate();
})

;(function() {
var SPECS = {{ .Specs }};
var showPoint = {{ .CloudBrainPaySwitch }};


+ 0
- 1
templates/repo/grampus/notebook/npu/new.tmpl View File

@@ -86,7 +86,6 @@
{{range .images}}
<option name="image_id" value="{{.ID}}">{{.Name}}</option>
{{end}}
<option name="image_id" value="222222222">1111</option>
</select>
</div>


Loading…
Cancel
Save