From 6549f6d08c88c5024bbe38ac74416305fd8d4247 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Tue, 9 Aug 2022 18:19:35 +0800 Subject: [PATCH] fix issue --- web_src/js/components/MinioUploader.vue | 2 +- web_src/js/features/cloudbrainShow.js | 17 ++++++++++++++++- web_src/js/features/cloudrbanin.js | 18 ------------------ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/web_src/js/components/MinioUploader.vue b/web_src/js/components/MinioUploader.vue index 3b9b9a8e1..cb1e6a8f9 100755 --- a/web_src/js/components/MinioUploader.vue +++ b/web_src/js/components/MinioUploader.vue @@ -720,7 +720,7 @@ export default { } .datast-upload-progress .dataset-name { text-align: right; - width: 120px; + width: 200px; margin-right: 1rem; } .datast-upload-progress .dataset-progress { diff --git a/web_src/js/features/cloudbrainShow.js b/web_src/js/features/cloudbrainShow.js index b4b56bd8f..381aead3f 100644 --- a/web_src/js/features/cloudbrainShow.js +++ b/web_src/js/features/cloudbrainShow.js @@ -197,7 +197,22 @@ export default async function initCloudrainSow() { $(".log-info .log_bottom").trigger("click"); e.stopPropagation(); }); - + $(".stop-show-version").click(function (e) { + const ID = this.dataset.jobid; + const repoPath = this.dataset.repopath; + const version_name = this.dataset.version; + const url = `/api/v1/repos/${repoPath}/${ID}/stop_version`; + $.post(url, { version_name: version_name }, (data) => { + if (data.StatusOK === 0) { + $(`#${version_name}-stop`).removeClass("blue"); + $(`#${version_name}-stop`).addClass("disabled"); + refreshStatusShow(version_name, ID, repoPath); + } + }).fail(function (err) { + console.log(err); + }); + e.stopPropagation(); + }); function refreshStatusShow(version_name, ID, repoPath) { $.get( `/api/v1/repos/${repoPath}/${ID}?version_name=${version_name}`, diff --git a/web_src/js/features/cloudrbanin.js b/web_src/js/features/cloudrbanin.js index 892d2ab41..a2275f7ad 100644 --- a/web_src/js/features/cloudrbanin.js +++ b/web_src/js/features/cloudrbanin.js @@ -329,24 +329,6 @@ export default async function initCloudrain() { console.log(err); }); } - - $(".stop-show-version").click(function (e) { - const ID = this.dataset.jobid; - const repoPath = this.dataset.repopath; - const version_name = this.dataset.version; - const url = `/api/v1/repos/${repoPath}/${ID}/stop_version`; - $.post(url, { version_name: version_name }, (data) => { - if (data.StatusOK === 0) { - $(`#${version_name}-stop`).removeClass("blue"); - $(`#${version_name}-stop`).addClass("disabled"); - refreshStatusShow(version_name, ID, repoPath); - } - }).fail(function (err) { - console.log(err); - }); - e.stopPropagation(); - }); - function refreshStatus(version_name, ID, repoPath) { const url = `/api/v1/repos/${repoPath}/${ID}/?version_name${version_name}`; $.get(url, (data) => {