From b306e35a31ddb8b45d5aac47c96eac8e30829b91 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 24 Oct 2022 17:38:51 +0800 Subject: [PATCH] fix issue --- templates/custom/alert_cb.tmpl | 12 ++++++++++++ templates/repo/cloudbrain/new.tmpl | 1 + templates/repo/modelarts/notebook/new.tmpl | 14 +++++++++++++- web_src/js/features/cloudrbanin.js | 3 +++ web_src/less/_form.less | 15 +++++++++++---- 5 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 templates/custom/alert_cb.tmpl diff --git a/templates/custom/alert_cb.tmpl b/templates/custom/alert_cb.tmpl new file mode 100644 index 000000000..1e3ed5873 --- /dev/null +++ b/templates/custom/alert_cb.tmpl @@ -0,0 +1,12 @@ +{{if .NotStopTaskCount}} +
+ +
+ +
+
您已经有 同类任务 正在等待或运行中,请等待任务结束再创建
+
可以在 “个人中心 > 云脑任务” 查看您所有的云脑任务
+
+
+
+{{end}} \ No newline at end of file diff --git a/templates/repo/cloudbrain/new.tmpl b/templates/repo/cloudbrain/new.tmpl index fb7ccbed1..48cadf278 100755 --- a/templates/repo/cloudbrain/new.tmpl +++ b/templates/repo/cloudbrain/new.tmpl @@ -28,6 +28,7 @@ + {{template "custom/alert_cb" .}}
{{.CsrfTokenHtml}} diff --git a/templates/repo/modelarts/notebook/new.tmpl b/templates/repo/modelarts/notebook/new.tmpl index 0ada241bc..4eaaf3cd4 100755 --- a/templates/repo/modelarts/notebook/new.tmpl +++ b/templates/repo/modelarts/notebook/new.tmpl @@ -15,6 +15,8 @@

+ + {{template "custom/alert_cb" .}} {{.CsrfTokenHtml}}

@@ -178,8 +180,18 @@ document.getElementById("mask").style.display = "none" } } + $('select.dropdown') + .dropdown(); - + $(function() { + $("#cloudbrain_job_type").change(function() { + if ($(this).val() == 'BENCHMARK') { + $(".cloudbrain_benchmark").show(); + } else { + $(".cloudbrain_benchmark").hide(); + } + }) + }) $(document).ready(function(){ $(document).keydown(function(event){ if(event.keyCode==13){ diff --git a/web_src/js/features/cloudrbanin.js b/web_src/js/features/cloudrbanin.js index 698523d11..657ca1381 100644 --- a/web_src/js/features/cloudrbanin.js +++ b/web_src/js/features/cloudrbanin.js @@ -575,3 +575,6 @@ function AdaminSearchControll() { } userSearchControll(); AdaminSearchControll(); +$(".message .close").on("click", function () { + $(this).closest(".message").transition("fade"); +}); diff --git a/web_src/less/_form.less b/web_src/less/_form.less index e41c428c8..d481d1cee 100644 --- a/web_src/less/_form.less +++ b/web_src/less/_form.less @@ -1,8 +1,8 @@ .form { .help { color: #999999; - padding-top: .6em; - + padding-top: 0.6em; + display: inline-block; } } @@ -109,7 +109,7 @@ @media screen and (max-height: 575px) { #rc-imageselect, .g-recaptcha { - transform: scale(.77); + transform: scale(0.77); transform-origin: 0 0; } } @@ -141,7 +141,7 @@ } } - input[type=number] { + input[type="number"] { -moz-appearance: textfield; } @@ -157,6 +157,13 @@ &.new.repo, &.new.migrate, &.new.fork { + .ui.message { + @media only screen and (min-width: 768px) { + width: 800px !important; + } + margin: 0 auto; + margin-bottom: 1rem; + } #create-page-form; form {