Browse Source

Merge pull request 'OTHER状态筛选结果不对,增加brainscore、snn4imagenet类型的操作' (#1578) from fix-1477 into V20220228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1578
Reviewed-by: wangjr <wangjr@pcl.ac.cn>
pull/1588/head
zhoupzh 3 years ago
parent
commit
77a10bb9be
6 changed files with 15 additions and 7 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +1
    -0
      options/locale/locale_zh-CN.ini
  3. +3
    -3
      templates/admin/cloudbrain/list.tmpl
  4. +4
    -1
      templates/admin/cloudbrain/search.tmpl
  5. +4
    -1
      templates/repo/cloudbrain/benchmark/new.tmpl
  6. +2
    -2
      templates/repo/modelarts/inferencejob/new.tmpl

+ 1
- 0
options/locale/locale_en-US.ini View File

@@ -2353,6 +2353,7 @@ cloudbrain.all_computing_resources=All Computing Resources
cloudbrain.all_status=All Status
cloudbrain.download_report=Download Report
cloudbrain.cloudbrain_name=Cloudbrain Name
cloudbrain.search = Seach Task Name/Creter

hooks.desc = Webhooks automatically make HTTP POST requests to a server when certain openi events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the <a target="_blank" rel="noopener" href="https://docs.openi.io/en-us/webhooks/">webhooks guide</a>.
hooks.add_webhook = Add Default Webhook


+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -2362,6 +2362,7 @@ cloudbrain.all_computing_resources=全部计算资源
cloudbrain.all_status=全部状态
cloudbrain.download_report=下载此报告
cloudbrain.cloudbrain_name=云脑侧名称
cloudbrain.search = 搜索任务名称/创建者

hooks.desc=当某些 openi 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建项目中。参阅 <a target="_blank" rel="noopener" href="https://docs.openi.io/en-us/webhooks/">Web钩子指南</a> 获取更多内容。
hooks.add_webhook=新增默认Web钩子


+ 3
- 3
templates/admin/cloudbrain/list.tmpl View File

@@ -122,7 +122,7 @@
<span class="fitted">{{.JobName}}</span>
</div>
<div class="two wide column text center nowrap" style="width: 17.5%!important;">
{{if eq .JobType "DEBUG"}}
{{if eq .JobType "DEBUG" "SNN4IMAGENET" "BRAINSCORE"}}
<div class="ui compact buttons">
<form id="debugAgainForm-{{.JobID}}">
{{$.CsrfTokenHtml}}
@@ -140,7 +140,7 @@
{{end}}
<!-- 停止任务 -->
<div class="ui compact buttons">
{{if eq .JobType "DEBUG" "BENCHMARK"}}
{{if eq .JobType "DEBUG" "BENCHMARK" "SNN4IMAGENET" "BRAINSCORE"}}
<form id="stopForm-{{.JobID}}" style="margin-left:-1px;">
{{$.CsrfTokenHtml}}
<a style="padding: 0.5rem 1rem;" id="ai-stop-{{.JobID}}" class='ui basic ai_stop {{if eq .Status "KILLED" "FAILED" "START_FAILED" "KILLING" "COMPLETED" "SUCCEEDED" "STOPPED" "STOPPING"}}disabled {{else}} blue {{end}}button' data-repopath='{{AppSubUrl}}/{{.Repo.OwnerName}}/{{.Repo.Name}}{{if eq .ComputeResource "CPU/GPU"}}/cloudbrain{{else if eq .JobType "BENCHMARK" }}/cloudbrain/benchmark{{else if eq .ComputeResource "NPU" }}/modelarts/notebook{{end}}/{{.JobID}}/stop' data-jobid="{{.JobID}}">
@@ -306,7 +306,7 @@ function getParams(){
const params = new URLSearchParams(window.location.search)
let jobType = !params.get('jobType')? '{{.i18n.Tr "admin.cloudbrain.all_task_types"}}' : params.get('jobType')
let listType = !params.get('listType')? '{{.i18n.Tr "admin.cloudbrain.all_computing_resources"}}' : params.get('listType')
let jobStatus = !params.get('jobStatus')? '{{.i18n.Tr "admin.cloudbrain.all_status"}}' : params.get('jobStatus')
let jobStatus = !params.get('jobStatus')? '{{.i18n.Tr "admin.cloudbrain.all_status"}}' : params.get('jobStatus').toUpperCase()
const dropdownValueArray = [jobType,listType,jobStatus]
$('#adminCloud .default.text ').each(function(index,e){
$(e).text(dropdownValueArray[index])


+ 4
- 1
templates/admin/cloudbrain/search.tmpl View File

@@ -1,7 +1,7 @@
<div class="ui attached segment">
<form class="ui form ignore-dirty" style="max-width: 90%">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "admin.cloudbrain.search"}}..." autofocus>
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
@@ -16,6 +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>
</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;">
@@ -39,6 +41,7 @@
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=STOPPED" data-value="STOPPED">STOPPED</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=WAITING" data-value="WAITING">WAITING</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=COMPLETED" data-value="COMPLETED">COMPLETED</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=SUCCEEDED" data-value="SUCCEEDED">SUCCEEDED</a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=FAILED" data-value="FAILED">FAILED </a>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&jobType={{$.JobType}}&listType={{$.ListType}}&jobStatus=other" data-value="OTHER">OTHER</a>


+ 4
- 1
templates/repo/cloudbrain/benchmark/new.tmpl View File

@@ -49,6 +49,9 @@
text-align: center;
color: #C2C7CC;
}
.nowrapx {
white-space: nowrap !important;
}

</style>
<!-- <div class="ui page dimmer">
@@ -113,7 +116,7 @@
<div class="eight wide field" id="engine_name">
<input type="hidden" id="benchmark_child_types_id_hidden" name="benchmark_child_types_id_hidden" value="{{.benchmark_child_types_id_hidden}}">
<label style="font-weight: normal;white-space: nowrap;">{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_child_type"}}</label>
<select class="ui fluid selection dropdown nowrap" id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types_id">
<select class="ui fluid selection dropdown nowrapx" id="benchmark_child_types_id" style='width: 100%;' name="benchmark_child_types_id">
</select>
</div>
</div>


+ 2
- 2
templates/repo/modelarts/inferencejob/new.tmpl View File

@@ -27,7 +27,7 @@
}


.nowrap {
.nowrapx {
white-space: nowrap !important;
}
</style>
@@ -140,7 +140,7 @@
</select>
</div>
<div class="eight wide field" id="engine_name">
<select class="ui fluid selection dropdown nowrap" id="trainjob_engine_versions" name="engine_id" style="white-space: nowrap;">
<select class="ui fluid selection dropdown nowrapx" id="trainjob_engine_versions" name="engine_id" style="white-space: nowrap;!">
{{range .engine_versions}}
<option name="engine_id" value="{{.ID}}">{{.Value}}</option>
{{end}}


Loading…
Cancel
Save