@@ -56,6 +56,7 @@ | |||||
"tab", | "tab", | ||||
"table", | "table", | ||||
"text", | "text", | ||||
"transition" | |||||
"transition", | |||||
"toast" | |||||
] | ] | ||||
} | } |
@@ -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"> | ||||
@@ -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> |
@@ -102,8 +102,3 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{{template "base/footer" .}} | {{template "base/footer" .}} | ||||
<script> | |||||
$('.ui.positive.message').text('保存镜像成功').show().delay(1500).fadeOut(); | |||||
</script> |
@@ -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"> </span> | <span v-if="benchmarkNew"> </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="选择镜像" | ||||
@@ -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){ | ||||