| @@ -3077,3 +3077,5 @@ TRAIN = TRAIN | |||||
| INFERENCE = INFERENCE | INFERENCE = INFERENCE | ||||
| BENCHMARK = BENCHMARK | BENCHMARK = BENCHMARK | ||||
| brain_area = Brain Area | brain_area = Brain Area | ||||
| error.dataset_select = dataset select error:the count exceed the limit or has same name | |||||
| @@ -3094,3 +3094,4 @@ INFERENCE = 推理任务 | |||||
| BENCHMARK = 评测任务 | BENCHMARK = 评测任务 | ||||
| brain_area = 脑区 | brain_area = 脑区 | ||||
| error.dataset_select = 数据集选择错误:数量超过限制或者有同名数据集 | |||||
| @@ -265,7 +265,7 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | ||||
| cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
| ctx.RenderWithErr("GetDatasetInfo failed", tpl, &form) | |||||
| ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tpl, &form) | |||||
| return | return | ||||
| } | } | ||||
| @@ -2040,7 +2040,7 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | ||||
| cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
| ctx.RenderWithErr("GetDatasetInfo failed", tplCloudBrainBenchmarkNew, &form) | |||||
| ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tplCloudBrainBenchmarkNew, &form) | |||||
| return | return | ||||
| } | } | ||||
| @@ -2168,7 +2168,7 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm) | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | log.Error("GetDatasetInfo failed: %v", err, ctx.Data["MsgID"]) | ||||
| cloudBrainNewDataPrepare(ctx) | cloudBrainNewDataPrepare(ctx) | ||||
| ctx.RenderWithErr("GetDatasetInfo failed", tpl, &form) | |||||
| ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tpl, &form) | |||||
| return | return | ||||
| } | } | ||||
| @@ -1001,7 +1001,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm) | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"]) | log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"]) | ||||
| trainJobErrorNewDataPrepare(ctx, form) | trainJobErrorNewDataPrepare(ctx, form) | ||||
| ctx.RenderWithErr("GetDatasetInfo error", tplModelArtsTrainJobNew, &form) | |||||
| ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tplModelArtsTrainJobNew, &form) | |||||
| return | return | ||||
| } | } | ||||
| @@ -1280,7 +1280,7 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"]) | log.Error("GetDatasetInfo failed:%v", err, ctx.Data["MsgID"]) | ||||
| versionErrorDataPrepare(ctx, form) | versionErrorDataPrepare(ctx, form) | ||||
| ctx.RenderWithErr("GetDatasetInfo error", tplModelArtsTrainJobVersionNew, &form) | |||||
| ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tplModelArtsTrainJobVersionNew, &form) | |||||
| return | return | ||||
| } | } | ||||
| @@ -27,7 +27,8 @@ | |||||
| .width85 { | .width85 { | ||||
| width: 85% !important; | width: 85% !important; | ||||
| margin-left: 4.5rem !important; | |||||
| margin-left: 10.5rem !important; | |||||
| align-items: center; | |||||
| } | } | ||||
| .width81 { | .width81 { | ||||
| @@ -444,9 +444,9 @@ | |||||
| <tbody> | <tbody> | ||||
| {{range $.datasetDownload}} | {{range $.datasetDownload}} | ||||
| <tr> | <tr> | ||||
| <td style="word-wrap: break-word;word-break: break-all;" class="center aligned"><a>{{.DatasetName}}</a></td> | |||||
| <td style="word-wrap: break-word;word-break: break-all;" class="center aligned"><a style="cursor: default;">{{.DatasetName}}</a></td> | |||||
| <td style="word-wrap: break-word;word-break: break-all;">{{.DatasetDownloadLink}}</td> | <td style="word-wrap: break-word;word-break: break-all;">{{.DatasetDownloadLink}}</td> | ||||
| <td class="center aligned"><a class="ui poping up clipboard" id="clipboard-btn" data-original="{{$.i18n.Tr "repo.copy_link"}}" data-success="{{$.i18n.Tr "repo.copy_link_success"}}" data-error="{{$.i18n.Tr "repo.copy_link_error"}}" data-content="{{$.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-text="asdasd">复制链接</a></td> | |||||
| <td class="center aligned"><a class="ui poping up clipboard" id="clipboard-btn" data-original="{{$.i18n.Tr "repo.copy_link"}}" data-success="{{$.i18n.Tr "repo.copy_link_success"}}" data-error="{{$.i18n.Tr "repo.copy_link_error"}}" data-content="{{$.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-text="{{.DatasetDownloadLink}}">复制链接</a></td> | |||||
| </tr> | </tr> | ||||
| {{end}} | {{end}} | ||||
| </tbody> | </tbody> | ||||
| @@ -22,7 +22,8 @@ | |||||
| } | } | ||||
| .width85{ | .width85{ | ||||
| width: 85% !important; | width: 85% !important; | ||||
| margin-left: 4.5rem !important; | |||||
| margin-left: 10.5rem !important; | |||||
| align-items: center; | |||||
| } | } | ||||
| .width81{ | .width81{ | ||||
| margin-left: 1.5rem; | margin-left: 1.5rem; | ||||
| @@ -74,7 +74,7 @@ | |||||
| ></i> | ></i> | ||||
| <input | <input | ||||
| type="text" | type="text" | ||||
| placeholder="搜数据集名称..." | |||||
| placeholder="搜数据集名称/描述..." | |||||
| v-model="search" | v-model="search" | ||||
| @keyup.enter="searchName" | @keyup.enter="searchName" | ||||
| /> | /> | ||||
| @@ -618,7 +618,10 @@ export default { | |||||
| methods: { | methods: { | ||||
| openDataset() { | openDataset() { | ||||
| this.dialogVisible = true; | this.dialogVisible = true; | ||||
| this.confirmFlag = false; | |||||
| if (!this.confirmDatasetList) { | |||||
| this.confirmFlag = false; | |||||
| } | |||||
| this.getCurrentRepoDataset(); | this.getCurrentRepoDataset(); | ||||
| }, | }, | ||||
| handleClick(tab, event) { | handleClick(tab, event) { | ||||
| @@ -651,7 +654,8 @@ export default { | |||||
| console.log("111111111111"); | console.log("111111111111"); | ||||
| if ( | if ( | ||||
| this.selectDatasetArray.some((item) => { | this.selectDatasetArray.some((item) => { | ||||
| return item.label === data.label; | |||||
| console.log(item.label.split(".")[0], data.label.split(".")[0]); | |||||
| return item.label.split(".")[0] === data.label.split(".")[0]; | |||||
| }) | }) | ||||
| ) { | ) { | ||||
| this.$refs[data.ref].setChecked(data.id, false, false); | this.$refs[data.ref].setChecked(data.id, false, false); | ||||