From e4ab1b4fc2482a9b85f81fc74e45fb8f9b6dae04 Mon Sep 17 00:00:00 2001 From: liuzx Date: Mon, 30 May 2022 11:43:42 +0800 Subject: [PATCH 1/4] fix-2139 --- routers/repo/modelarts.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index e099a19ff..95ca8df62 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -764,6 +764,7 @@ func trainJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModelArts ctx.Data["bootFile"] = form.BootFile ctx.Data["uuid"] = form.Attachment ctx.Data["branch_name"] = form.BranchName + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } @@ -954,6 +955,7 @@ func versionErrorDataPrepare(ctx *context.Context, form auth.CreateModelArtsTrai return err } ctx.Data["config_list"] = configList.ParaConfigs + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } @@ -2175,6 +2177,7 @@ func inferenceJobErrorNewDataPrepare(ctx *context.Context, form auth.CreateModel ctx.Data["model_version"] = form.ModelVersion ctx.Data["ckpt_name"] = form.CkptName ctx.Data["train_url"] = form.TrainUrl + ctx.Data["cloudbraintype"] = models.TypeCloudBrainTwo return nil } From d72f94943a3fc2ad1af000ff6ec6381157a4c8af Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 30 May 2022 16:26:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/repo/datasets/index.tmpl | 42 ++++++++++++++++++++++++---------- web_src/js/index.js | 46 ++++++++++++++++++++++++++++++++++---- web_src/less/openi.less | 16 +++++++------ 3 files changed, 81 insertions(+), 23 deletions(-) diff --git a/templates/repo/datasets/index.tmpl b/templates/repo/datasets/index.tmpl index 4cc84bbe8..74448406f 100755 --- a/templates/repo/datasets/index.tmpl +++ b/templates/repo/datasets/index.tmpl @@ -118,6 +118,20 @@ .diy-popper { max-width: 400px; } + + .ascending { + width: 0; + height: 0; + border: 5px solid transparent; + border-bottom-color: #c0c4cc; + } + + .descending { + width: 0; + height: 0; + border: 5px solid transparent; + border-top-color: #c0c4cc; + }
{{template "repo/header" .}} @@ -213,21 +227,24 @@
-
+
{{$.i18n.Tr "dataset.dataset_file_name"}} - - + +
+ style="width: 7.25% !important;cursor: pointer;"> {{$.i18n.Tr "repo.model.manage.size"}} - - + +
@@ -239,12 +256,13 @@
{{$.i18n.Tr "repo.cloudbrain_creator"}}
-
+
{{$.i18n.Tr "dataset.dataset_upload_time"}} - - + +
diff --git a/web_src/js/index.js b/web_src/js/index.js index b9e7165cf..bcc995836 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -4080,16 +4080,54 @@ function initVueDataset() { location.href = `${location.href}&sort=${dom}Asc` } else if (params.get('sort') === `${dom}Desc` || params.get('sort').indexOf(`${dom}`) === -1) { - params.delete('sort') - let asc = params.toString() + `&sort=${dom}Asc` + params.set("sort", `${dom}Asc`) + let asc = params.toString() location.search = asc } else { - params.delete('sort') - let desc = params.toString() + `&sort=${dom}Desc` + params.set("sort", `${dom}Desc`) + let desc = params.toString() location.search = desc } }, + sortIcon(dom, sort) { + const params = new URLSearchParams(location.search) + if (sort === "up") { + + if (params.toString() === '') { + location.href = `${location.href}?sort=${dom}Asc` + } + else if (!params.get('sort')) { + location.href = `${location.href}&sort=${dom}Asc` + } else if (params.get('sort').indexOf(`${dom}`) === -1) { + params.set("sort", `${dom}Asc`) + let asc = params.toString() + location.search = asc + } else { + params.delete('sort') + location.search = params.toString() + } + } + else if (sort === "down") { + if (params.toString() === '') { + location.href = `${location.href}?sort=${dom}Desc` + } + else if (!params.get('sort')) { + location.href = `${location.href}&sort=${dom}Desc` + } + else if (params.get('sort').indexOf(`${dom}`) === -1) { + params.set("sort", `${dom}Desc`) + let asc = params.toString() + location.search = asc + } else { + params.delete('sort') + location.search = params.toString() + } + + + } + + }, setPrivate(uuid, privateFlag, index) { const params = { _csrf: csrf, file: uuid, is_private: privateFlag } this.$axios.post('/attachments/private', this.qs.stringify(params)).then((res) => { diff --git a/web_src/less/openi.less b/web_src/less/openi.less index 40b55e012..5ff09544a 100644 --- a/web_src/less/openi.less +++ b/web_src/less/openi.less @@ -1079,17 +1079,19 @@ display: block; .row .sort-caret-up { position: absolute; top: 5px; - color: #c0c4cc; - font-size: 18px; + } .row .sort-caret-down { position: absolute; - bottom: 3px; - color: #c0c4cc; - font-size: 18px; + bottom: 5px; + + } + +.row .active-up-sort { + border-bottom-color: #409eff; } -.row .active-sort { - color: #409eff !important; + .row .active-down-sort { + border-top-color: #409eff; } \ No newline at end of file From 22cb0c6653e82484aff1055349508d8d6a3a47a2 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 30 May 2022 16:40:16 +0800 Subject: [PATCH 3/4] fix issue --- web_src/js/components/BrainAnalysis.vue | 141 +++++++++++++++++--------------- 1 file changed, 74 insertions(+), 67 deletions(-) diff --git a/web_src/js/components/BrainAnalysis.vue b/web_src/js/components/BrainAnalysis.vue index 4950c3241..69d02548a 100644 --- a/web_src/js/components/BrainAnalysis.vue +++ b/web_src/js/components/BrainAnalysis.vue @@ -1,86 +1,93 @@ - - - - + .btnLast { + line-height: 1.5; + margin: -3.5px; + border: 1px solid rgba(22, 132, 252, 100); + /* border-right: none; */ + background: #FFFF; + color: #1684FC; + width: 60px; + height: 30px; + border-radius: 0px 4px 4px 0px; + } + \ No newline at end of file From 629b68e961921950d3e5ab9bbada5ff4e9b3ed07 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Mon, 30 May 2022 18:05:57 +0800 Subject: [PATCH 4/4] fix issue --- web_src/js/index.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/web_src/js/index.js b/web_src/js/index.js index bcc995836..ed8fb3473 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -4093,19 +4093,18 @@ function initVueDataset() { sortIcon(dom, sort) { const params = new URLSearchParams(location.search) if (sort === "up") { - if (params.toString() === '') { location.href = `${location.href}?sort=${dom}Asc` } else if (!params.get('sort')) { location.href = `${location.href}&sort=${dom}Asc` - } else if (params.get('sort').indexOf(`${dom}`) === -1) { + } else if (params.get('sort') && params.get('sort').indexOf(`${dom}Asc`) !== -1) { + params.delete('sort') + location.search = params.toString() + } else { params.set("sort", `${dom}Asc`) let asc = params.toString() location.search = asc - } else { - params.delete('sort') - location.search = params.toString() } } else if (sort === "down") { @@ -4115,13 +4114,13 @@ function initVueDataset() { else if (!params.get('sort')) { location.href = `${location.href}&sort=${dom}Desc` } - else if (params.get('sort').indexOf(`${dom}`) === -1) { + else if (params.get('sort') && params.get('sort').indexOf(`${dom}Desc`) !== -1) { + params.delete('sort') + location.search = params.toString() + } else { params.set("sort", `${dom}Desc`) let asc = params.toString() location.search = asc - } else { - params.delete('sort') - location.search = params.toString() }