Browse Source

fix issue

pull/1839/head
zhoupzh 3 years ago
parent
commit
c5d72621e5
6 changed files with 19 additions and 40 deletions
  1. +2
    -1
      semantic.json
  2. +4
    -4
      templates/repo/cloudbrain/benchmark/show.tmpl
  3. +0
    -28
      templates/repo/cloudbrain/image/edit.tmpl
  4. +0
    -5
      templates/repo/cloudbrain/image/submit.tmpl
  5. +2
    -1
      web_src/js/components/images/selectImages.vue
  6. +11
    -1
      web_src/js/features/images.js

+ 2
- 1
semantic.json View File

@@ -56,6 +56,7 @@
"tab", "tab",
"table", "table",
"text", "text",
"transition"
"transition",
"toast"
] ]
} }

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

@@ -281,7 +281,7 @@ td, th {
</tr> </tr>
<tr class="ti-no-ng-animate"> <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80"> <td class="ti-no-ng-animate ti-text-form-label text-width80">
{{.i18n.Tr "cloudbrain.mirror"}}
{{$.i18n.Tr "cloudbrain.mirror"}}
</td> </td>


<td class="ti-text-form-content"> <td class="ti-text-form-content">
@@ -292,7 +292,7 @@ td, th {
</tr> </tr>
<tr class="ti-no-ng-animate"> <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80"> <td class="ti-no-ng-animate ti-text-form-label text-width80">
{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_type"}}
</td> </td>


@@ -314,7 +314,7 @@ td, th {


<tr class="ti-no-ng-animate"> <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80"> <td class="ti-no-ng-animate ti-text-form-label text-width80">
{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_train"}}
</td> </td>


<td class="ti-text-form-content"> <td class="ti-text-form-content">
@@ -325,7 +325,7 @@ td, th {
</tr> </tr>
<tr class="ti-no-ng-animate"> <tr class="ti-no-ng-animate">
<td class="ti-no-ng-animate ti-text-form-label text-width80"> <td class="ti-no-ng-animate ti-text-form-label text-width80">
{{.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
{{$.i18n.Tr "repo.cloudbrain.benchmark.evaluate_test"}}
</td> </td>


<td class="ti-text-form-content"> <td class="ti-text-form-content">


+ 0
- 28
templates/repo/cloudbrain/image/edit.tmpl View File

@@ -92,31 +92,3 @@
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}
<script>
console.log({{$.Link}},{{$.PageFrom}},{{$.Image}})
console.log({{.Image.IsPrivate}})

let url_href = {{$.Link}}
function submitImage(){
console.log($('#form_image').serialize())
$.ajax({
url:url_href,
type:'POST',
data:$('#form_image').serialize(),
success:function(res){
console.log("res",res)
},
error: function(xhr){
// 隐藏 loading
// 只有请求不正常(状态码不为200)才会执行
// $('.ui.error.message').text(xhr.responseText)
// $('.ui.error.message').css('display','block')
},
complete:function(xhr){
// $("#mask").css({"display":"none","z-index":"1"})
}
})
}


</script>

+ 0
- 5
templates/repo/cloudbrain/image/submit.tmpl View File

@@ -102,8 +102,3 @@
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

<script>

$('.ui.positive.message').text('保存镜像成功').show().delay(1500).fadeOut();
</script>

+ 2
- 1
web_src/js/components/images/selectImages.vue View File

@@ -4,7 +4,8 @@
<label v-if="benchmarkNew" style="font-weight: normal;">镜像</label> <label v-if="benchmarkNew" style="font-weight: normal;">镜像</label>
<label v-else>镜像</label> <label v-else>镜像</label>
<span v-if="benchmarkNew">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span v-if="benchmarkNew">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<input type="text" name="image" :value="imageAddress" placeholder="选择镜像或输入镜像地址">
<input v-if="benchmarkNew" type="text" name="image" :value="imageAddress" style="width: 45%;" placeholder="选择镜像或输入镜像地址">
<input v-else type="text" name="image" :value="imageAddress" placeholder="选择镜像或输入镜像地址">
<el-button type="text" @click="dialogVisible = true" icon="el-icon-plus">选择镜像</el-button> <el-button type="text" @click="dialogVisible = true" icon="el-icon-plus">选择镜像</el-button>
<el-dialog <el-dialog
title="选择镜像" title="选择镜像"


+ 11
- 1
web_src/js/features/images.js View File

@@ -82,7 +82,17 @@ export default async function initImage(){
if(link.indexOf('commit_image')===1){ if(link.indexOf('commit_image')===1){
$('.ui.positive.message').text('保存镜像成功').show().delay(1500).fadeOut(); $('.ui.positive.message').text('保存镜像成功').show().delay(1500).fadeOut();
}else{ }else{
$('.ui.positive.message').text('提交镜像成功').show().delay(1500).fadeOut();
$('body')
.toast({
class: 'success',
message: 'Did you notice any difference ?',
transition: {
showMethod : 'zoom',
showDuration : 10000,
hideMethod : 'fade',
hideDuration : 10000
}
})
} }
if(location.href.indexOf('imageAdmin')!==-1){ if(location.href.indexOf('imageAdmin')!==-1){


Loading…
Cancel
Save