Browse Source

fix issue

tags/v1.22.5.1^2
zhoupzh 3 years ago
parent
commit
848f906bef
5 changed files with 41 additions and 47 deletions
  1. +2
    -2
      templates/admin/cloudbrain/search.tmpl
  2. +2
    -2
      templates/admin/cloudbrain/search_dashboard.tmpl
  3. +3
    -3
      templates/custom/select_dataset_train.tmpl
  4. +28
    -17
      templates/repo/cloudbrain/benchmark/index.tmpl
  5. +6
    -23
      templates/repo/cloudbrain/benchmark/new.tmpl

+ 2
- 2
templates/admin/cloudbrain/search.tmpl View File

@@ -16,8 +16,8 @@
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">TRAIN</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">INFERENCE</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BENCHMARK</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">SNN4IMAGENET</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BRAINSCORE</a>
<!-- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">SNN4IMAGENET</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">BRAINSCORE</a> -->
</div>
</div>
<div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;">


+ 2
- 2
templates/admin/cloudbrain/search_dashboard.tmpl View File

@@ -28,8 +28,8 @@
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=TRAIN&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="TRAIN">{{.i18n.Tr "cloudbrain.TRAIN"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=INFERENCE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="INFERENCE">{{.i18n.Tr "cloudbrain.INFERENCE"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BENCHMARK&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BENCHMARK"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.SNN4IMAGENET"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BRAINSCORE"}}</a>
<!-- <a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=SNN4IMAGENET&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.SNN4IMAGENET"}}</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType=BRAINSCORE&listType={{$.ListType}}&jobStatus={{$.JobStatus}}" data-value="BENCHMARK">{{.i18n.Tr "cloudbrain.BRAINSCORE"}}</a> -->
</div>
</div>
<div class="ui selection dropdown" style="min-width: 10em;min-height:2.6em;border-radius: .28571429rem;margin-right: 1em;padding: .67em 3.2em .7em 1em;">


+ 3
- 3
templates/custom/select_dataset_train.tmpl View File

@@ -1,14 +1,14 @@

<div class="dataset-repolink" id="dataset-repolink-init" style="display: none;" data-repolink="{{.RepoLink}}" data-cloudranin-type="{{.cloudbraintype}}"></div>
<div class="inline required unite min_title field" id="dataset-base" style="margin-bottom: 0 !important;">
{{if .newInference}}
<label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label>&nbsp;&nbsp;&nbsp;&nbsp;
{{if or (.benchmarkMode) (.newInference)}}
<label style="font-weight: normal;">{{if .benchmarkMode}}{{.i18n.Tr "repo.model_manager"}}</label><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>{{else}}{{.i18n.Tr "dataset.dataset"}}</label>&nbsp;&nbsp;&nbsp;&nbsp;{{end}}
{{else}}
<label style="font-weight: normal;">{{.i18n.Tr "dataset.dataset"}}</label>&nbsp;&nbsp;&nbsp;
{{end}}
<input type="hidden" name="attachment" :value="dataset_uuid">
<input class="disabled" type="text" :value="dataset_name" required onfocus="this.blur();" style="width: 48.5%;">
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus" style="color: #0366d6;"> {{.i18n.Tr "dataset.select_dataset"}}</el-button>
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus" style="color: #0366d6;"> {{if .benchmarkMode}}{{.i18n.Tr "repo.modelarts.infer_job.select_model"}}{{else}}{{.i18n.Tr "dataset.select_dataset"}}{{end}}</el-button>
<el-dialog
title="{{.i18n.Tr "dataset.select_dataset"}}"
:visible.sync="dialogVisible"


+ 28
- 17
templates/repo/cloudbrain/benchmark/index.tmpl View File

@@ -69,28 +69,31 @@
<!-- 表头 -->
<div class="ui grid stackable" style="background: #f0f0f0;;">
<div class="row">
<div class="three wide column padding0">
<div class="three wide column padding0" style="width: 18% !important;">
<span style="margin:0 6px">{{$.i18n.Tr "repo.cloudbrain_task"}}</span>
</div>
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 10.5% !important;">
<span>{{$.i18n.Tr "repo.modelarts.status"}}</span>
</div>
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 10.5% !important;">
<span>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</span>
</div>
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 10.5% !important;">
<span>{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</span>
</div>
<div class="two wide column text center padding0" style="width: 8.5% !important;">
<span>{{$.i18n.Tr "repo.modelarts.createtime"}}</span>
</div>
<div class="one wide column text center padding0">
<div class="one wide column text center padding0" style="width: 8% !important;">
<span>{{$.i18n.Tr "repo.cloudbrain_status_runtime"}}</span>
</div>
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 8% !important;">
<span>{{$.i18n.Tr "repo.modelarts.computing_resources"}}</span>
</div>
<div class="one wide column text center padding0">
<div class="one wide column text center padding0" style="width: 6% !important;">
<span>{{$.i18n.Tr "repo.cloudbrain_creator"}}</span>
</div>
<div class="three wide column text center padding0">
<div class="three wide column text center padding0" style="width: 20% !important;">
<span>{{$.i18n.Tr "repo.cloudbrain_operate"}}</span>
</div>
</div>
@@ -101,36 +104,41 @@
<div class="row">

<!-- 任务名 -->
<div class="three wide column padding0">
<div class="three wide column padding0" style="width: 18% !important;">
<a class="title" href="{{$.Link}}/{{.Cloudbrain.ID}}" title="{{.DisplayJobName}}" style="font-size: 14px;">
<span class="fitted" style="width: 90%;vertical-align: middle;">{{.DisplayJobName}}</span>
</a>
</div>
<!-- 任务状态 -->
<div class="two wide column padding0" style="padding-left: 2.2rem !important;">
<div class="two wide column padding0" style="width: 10.5% !important;">
<span class="job-status" id="{{.Cloudbrain.ID}}" data-repopath="{{$.RepoRelPath}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else}}/modelarts/notebook{{end}}" data-jobid="{{.Cloudbrain.ID}}" data-version="{{.VersionName}}">
<span><i id="{{.Cloudbrain.ID}}-icon" style="vertical-align: middle;" class="{{.Status}}"></i><span id="{{.Cloudbrain.ID}}-text" style="margin-left: 0.4em;font-size: 12px;">{{.Status}}</span></span>
</span>
</div>
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 10.5% !important;">
<a style="font-size: 12px;" href="{{.BenchmarkTypeRankLink}}" target="_blank">
{{.BenchmarkType}}
</a>
</div>
<div class="two wide column text center padding0" style="width: 10.5% !important;">
<a style="font-size: 12px;" href="{{.BenchmarkTypeRankLink}}" target="_blank">
{{.BenchmarkTypeName}}
{{.BenchmarkTypeName}}
</a>
</div>
<!-- 任务创建时间 -->
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 8.5% !important;">
<span style="font-size: 12px;" class="">{{TimeSinceUnix .Cloudbrain.CreatedUnix $.Lang}}</span>
</div>
<!-- 任务运行时间 -->
<div class="one wide column text center padding0">
<div class="one wide column text center padding0" style="width: 8% !important;">
<span style="font-size: 12px;" id="duration-{{.Cloudbrain.ID}}">{{.TrainJobDuration}}</span>
</div>
<!-- 计算资源 -->
<div class="two wide column text center padding0">
<div class="two wide column text center padding0" style="width: 8% !important;">
<span style="font-size: 12px;">{{.ComputeResource}}</span>
</div>
<!-- 创建者 -->
<div class="one wide column text center padding0">
<div class="one wide column text center padding0" style="width: 6% !important;">
{{if .User.Name}}
<a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a>
{{else}}
@@ -138,7 +146,7 @@
{{end}}
</div>

<div class="three wide column text center padding0">
<div class="three wide column text center padding0" style="width: 20% !important;">
<div class="ui compact buttons" >
<!-- 停止任务 -->
<form id="stopForm-{{.Cloudbrain.ID}}" style="margin-left:-1px;">
@@ -227,3 +235,6 @@

</div>
{{template "base/footer" .}}
<script>
console.log({{.Tasks}})
</script>

+ 6
- 23
templates/repo/cloudbrain/benchmark/new.tmpl View File

@@ -76,19 +76,10 @@
{{.i18n.Tr "repo.modelarts.evaluate_job.new_job"}}
</h4>
<div class="ui attached segment">
<input type="hidden" name="benchmarkMode" value="{{.benchmarkMode}}">

<!-- <form class="ui form">
<div class="required unite min_title inline field">
<label style="font-weight: normal;">评测场景</label>
<div class="ui blue small menu compact selectcloudbrain">
<a class="active item alogrithm_benchmark" href="javascript:void(0)">算法评测</a>
<a class="item model_benchmark" href="javascript:void(0)">模型评测</a>
</div>
</div>
</form> -->
<!-- equal width -->
{{if eq .benchmarkMode "model"}}
<form class="ui form model_form" action="{{.Link}}" method="post">
<form class="ui form model_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="update">
<div class="required unite min_title inline field">
@@ -129,10 +120,7 @@
<a id="benchmark_model_example" href="https://git.openi.org.cn/yult/snn4imagenet">查看样例</a>
</div>
<div id="images-new-cb">
</div>
{{template "custom/select_dataset_train" .}}
<div class="required unite min_title inline field" style="margin-top:2rem;">
@@ -143,7 +131,6 @@
{{end}}
</select>
</div>
<div class="inline unite min_title field">
<button class="ui create_train_job green button">
{{.i18n.Tr "repo.cloudbrain.new"}}
@@ -153,7 +140,7 @@
</div>
</form>
{{else}}
<form class="ui form alogrithm_form" action="{{.Link}}" method="post">
<form class="ui form alogrithm_form" action="{{.Link}}?benchmarkMode=alogrithm" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="update">
<input type="hidden" name="job_type" value="BENCHMARK">
@@ -183,8 +170,6 @@
{{end}}
</select>
</div>
<div class="required unite inline min_title fields" style="width: 90%;">
<div class="required eight wide field">
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}</label>
@@ -206,13 +191,9 @@
</select>
</div>
</div>
<div id="images-new-cb">
</div>
<div class="required unite min_title inline field">
<label style="font-weight: normal;">{{.i18n.Tr "cloudbrain.resource_specification"}}</label>
<select id="cloudbrain_resource_spec" class="ui search dropdown" placeholder="{{.i18n.Tr "cloudbrain.select_specification"}}" style='width:385px' name="resource_spec_id">
@@ -332,7 +313,9 @@

document.onreadystatechange = function() {
if (document.readyState === "complete") {
setChildType();
if($('input[name=benchmarkMode]').val()==='alogrithm'){
setChildType();
}
}
}



Loading…
Cancel
Save