From dda4052090ab8a29c080bf44cc3db3405606e426 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 8 Dec 2022 11:25:52 +0800 Subject: [PATCH] fix issue --- templates/repo/cloudbrain/new.tmpl | 2 +- templates/repo/grampus/notebook/gpu/new.tmpl | 2 +- templates/repo/grampus/notebook/npu/new.tmpl | 2 +- templates/repo/modelarts/notebook/new.tmpl | 2 +- web_src/js/features/cloudrbanin.js | 10 +++++++++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/templates/repo/cloudbrain/new.tmpl b/templates/repo/cloudbrain/new.tmpl index 63053a3ed..c5eaaa1ff 100755 --- a/templates/repo/cloudbrain/new.tmpl +++ b/templates/repo/cloudbrain/new.tmpl @@ -31,7 +31,7 @@

- {{.i18n.Tr "repo.modelarts.train_job.new"}} + {{.i18n.Tr "repo.modelarts.train_job.new_debug"}}

{{template "custom/alert_cb" .}}
diff --git a/templates/repo/grampus/notebook/gpu/new.tmpl b/templates/repo/grampus/notebook/gpu/new.tmpl index 4f002700a..943bdf60e 100644 --- a/templates/repo/grampus/notebook/gpu/new.tmpl +++ b/templates/repo/grampus/notebook/gpu/new.tmpl @@ -13,7 +13,7 @@

- {{.i18n.Tr "repo.modelarts.train_job.new"}} + {{.i18n.Tr "repo.modelarts.train_job.new_debug"}}

{{template "custom/alert_cb" .}}
diff --git a/templates/repo/grampus/notebook/npu/new.tmpl b/templates/repo/grampus/notebook/npu/new.tmpl index 517e1eb6f..986a71696 100644 --- a/templates/repo/grampus/notebook/npu/new.tmpl +++ b/templates/repo/grampus/notebook/npu/new.tmpl @@ -11,7 +11,7 @@

- {{.i18n.Tr "repo.modelarts.train_job.new"}} + {{.i18n.Tr "repo.modelarts.train_job.new_debug"}}

{{template "custom/alert_cb" .}}
diff --git a/templates/repo/modelarts/notebook/new.tmpl b/templates/repo/modelarts/notebook/new.tmpl index bf552fbcd..34d9a4cc6 100755 --- a/templates/repo/modelarts/notebook/new.tmpl +++ b/templates/repo/modelarts/notebook/new.tmpl @@ -13,7 +13,7 @@
{{template "custom/alert_cb" .}}

- {{.i18n.Tr "repo.modelarts.train_job.new"}} + {{.i18n.Tr "repo.modelarts.train_job.new_debug"}}

diff --git a/web_src/js/features/cloudrbanin.js b/web_src/js/features/cloudrbanin.js index 67166a67c..4f3176032 100644 --- a/web_src/js/features/cloudrbanin.js +++ b/web_src/js/features/cloudrbanin.js @@ -456,8 +456,16 @@ export default async function initCloudrain() { .text(debug_button) .css("margin", "0 1rem"); } - } else { + } else if (res.result_code == "-2") { $(".ui.modal.debug-again-alert").modal("show"); + } else { + $(".alert") + .html(res.error_msg) + .removeClass("alert-success") + .addClass("alert-danger") + .show() + .delay(2000) + .fadeOut(); } }, error: function (res) {