Browse Source

Merge branch 'fix-2392' of git.openi.org.cn:OpenI/aiforge into fix-2392

tags/v1.22.8.2^2
ychao_1983 3 years ago
parent
commit
1eeed8297f
20 changed files with 170 additions and 56 deletions
  1. +6
    -0
      models/cloudbrain.go
  2. +0
    -1
      models/repo.go
  3. +6
    -1
      options/locale/locale_en-US.ini
  4. +6
    -0
      options/locale/locale_zh-CN.ini
  5. +2
    -1
      routers/api/v1/repo/cloudbrain.go
  6. +1
    -1
      routers/api/v1/repo/cloudbrain_dashboard.go
  7. +41
    -2
      routers/repo/cloudbrain.go
  8. +1
    -1
      routers/repo/grampus.go
  9. +2
    -1
      routers/repo/setting.go
  10. +1
    -1
      templates/repo/cloudbrain/trainjob/show.tmpl
  11. +9
    -9
      templates/repo/datasets/index.tmpl
  12. +1
    -1
      templates/repo/datasets/reference.tmpl
  13. +1
    -1
      templates/repo/header.tmpl
  14. +1
    -1
      templates/repo/modelarts/notebook/show.tmpl
  15. +1
    -0
      templates/repo/modelarts/trainjob/version_new.tmpl
  16. +62
    -27
      web_src/js/components/dataset/referenceDataset.vue
  17. +0
    -3
      web_src/js/components/dataset/selectDataset.vue
  18. +1
    -1
      web_src/js/features/cloudbrainShow.js
  19. +27
    -3
      web_src/js/features/i18nVue.js
  20. +1
    -1
      web_src/js/index.js

+ 6
- 0
models/cloudbrain.go View File

@@ -1768,6 +1768,12 @@ func GetCloudbrainsNeededStopByRepoID(repoID int64) ([]*Cloudbrain, error) {
return cloudBrains, err
}

func GetCloudbrainsNeededDeleteByRepoID(repoID int64) ([]*Cloudbrain, error) {
cloudBrains := make([]*Cloudbrain, 0)
err := x.Where("repo_id=?", repoID).Find(&cloudBrains)
return cloudBrains, err
}

func GetCloudbrainsByDisplayJobName(repoID int64, jobType string, displayJobName string) ([]*Cloudbrain, error) {
cloudBrains := make([]*Cloudbrain, 0)
err := x.Cols("job_id", "job_name", "repo_id", "user_id", "job_type", "display_job_name").Where("repo_id=? AND job_type =? AND lower(display_job_name) = lower(?)", repoID, jobType, displayJobName).Find(&cloudBrains)


+ 0
- 1
models/repo.go View File

@@ -1788,7 +1788,6 @@ func DeleteRepository(doer *User, uid, repoID int64) error {

// Delete dataset attachment record and remove related files
deleteDatasetAttachmentByRepoId(sess, repoID)

if err = deleteBeans(sess,
&Access{RepoID: repo.ID},
&Action{RepoID: repo.ID},


+ 6
- 1
options/locale/locale_en-US.ini View File

@@ -260,7 +260,7 @@ page_dev_yunlao_desc3=China computing power network (C²NET) phase I can realize
page_dev_yunlao_desc4=Developers can freely select the corresponding computing resources according to the use needs, and can test the adaptability, performance, stability, etc. of the model in different hardware environments.
page_dev_yunlao_desc5=If your model requires more computing resources, you can also apply for it separately.
page_dev_yunlao_apply=Apply Separately
c2net_title=C²NET
c2net_title=China Computing Network
c2net_desc=The artificial intelligence computing power network promotion alliance has access to 11 intelligent computing centers, with a total scale of 1924p.
c2net_center=Center
search=Search
@@ -951,6 +951,11 @@ unzip_failed=Unzip Failed
unzip_stared=Unzipping
unzip_status=Unzip Status
collection_num=Collection Nums
current_dataset=Current Dataset
linked_dataset=Linked Dataset
unfavorite=Unfavorite
favorite=Favorite
disassociate=Disassociate
[repo]
owner = Owner
repo_name = Repository Name


+ 6
- 0
options/locale/locale_zh-CN.ini View File

@@ -957,6 +957,12 @@ unzip_failed=解压失败
unzip_stared=解压中
unzip_status=解压状态
collection_num=收藏数量
current_dataset=当前数据集
linked_dataset=关联数据集
unfavorite=取消收藏
favorite=收藏
disassociate=取消关联

[repo]
owner=拥有者
repo_name=项目名称


+ 2
- 1
routers/api/v1/repo/cloudbrain.go View File

@@ -378,6 +378,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) {
ctx.ServerError(err.Error(), err)
return
}

prefix := "/" + setting.CBCodePathPrefix + job.JobName + "/model"
files, err := storage.GetOneLevelAllObjectUnderDirMinio(setting.Attachment.Minio.Bucket, prefix, "")
if err != nil {
@@ -398,7 +399,7 @@ func CloudbrainDownloadLogFile(ctx *context.Context) {
ctx.ServerError("Get minio get SignedUrl failed", err)
return
}
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusMovedPermanently)
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect)
}
}



+ 1
- 1
routers/api/v1/repo/cloudbrain_dashboard.go View File

@@ -764,7 +764,7 @@ func GetCloudbrainsDetailData(ctx *context.Context) {

taskDetail.WaitTime = repo.GetCloudbrainWaitTime(ciTasks[i].Cloudbrain)

if ciTasks[i].Cloudbrain.DeletedAt != nilTime {
if ciTasks[i].Cloudbrain.DeletedAt != nilTime || ciTasks[i].Repo == nil {
taskDetail.IsDelete = true
} else {
taskDetail.IsDelete = false


+ 41
- 2
routers/repo/cloudbrain.go View File

@@ -1245,6 +1245,15 @@ func StopJobsByRepoID(repoID int64) {
StopJobs(cloudBrains)
}

func DeleteJobsByRepoID(repoID int64) {
cloudBrains, err := models.GetCloudbrainsNeededDeleteByRepoID(repoID)
if err != nil {
log.Warn("Failed to get cloudBrain info", err)
return
}
DeleteJobs(cloudBrains)
}

/**

*/
@@ -1280,6 +1289,36 @@ func StopJobs(cloudBrains []*models.Cloudbrain) {
}
}

func DeleteJobs(cloudBrains []*models.Cloudbrain) {
for _, taskInfo := range cloudBrains {
err := models.DeleteJob(taskInfo)
if err != nil {
log.Warn("Failed to DeleteJob:", err)
return
}
if taskInfo.Type == models.TypeCloudBrainOne {
cloudbrain.DelCloudBrainJob(taskInfo.JobName)
DeleteCloudbrainJobStorage(taskInfo.JobName, models.TypeCloudBrainOne)
}
if taskInfo.Type == models.TypeCloudBrainTwo {
if taskInfo.JobType == string(models.JobTypeTrain) || taskInfo.JobType == string(models.JobTypeInference) {

modelarts.DelTrainJob(taskInfo.JobID)
DeleteJobStorage(taskInfo.JobName)
}
if taskInfo.JobType == string(models.JobTypeDebug) {
modelarts.DelNotebook2(taskInfo.JobID)
}
}
if taskInfo.Type == models.TypeC2Net {
if taskInfo.JobType == string(models.JobTypeTrain) {
cloudbrain.DelCloudBrainJob(taskInfo.JobName)
DeleteCloudbrainJobStorage(taskInfo.JobName, models.TypeCloudBrainOne)
}
}
}
}

func retry(attempts int, sleep time.Duration, f func() error) (err error) {
for i := 0; i < attempts; i++ {
if i > 0 {
@@ -1347,7 +1386,7 @@ func deleteCloudbrainJob(ctx *context.Context) error {
return err
}

deleteJobStorage(task.JobName, models.TypeCloudBrainOne)
DeleteCloudbrainJobStorage(task.JobName, models.TypeCloudBrainOne)

return nil
}
@@ -1734,7 +1773,7 @@ func mkPathAndReadMeFile(path string, text string) error {
return nil
}

func deleteJobStorage(jobName string, cloudbrainType int) error {
func DeleteCloudbrainJobStorage(jobName string, cloudbrainType int) error {
//delete local
localJobPath := setting.JobPath + jobName
err := os.RemoveAll(localJobPath)


+ 1
- 1
routers/repo/grampus.go View File

@@ -637,7 +637,7 @@ func deleteGrampusJob(ctx *context.Context) error {
if task.ComputeResource == models.NPUResource {
storageType = models.TypeCloudBrainTwo
}
deleteJobStorage(task.JobName, storageType)
DeleteCloudbrainJobStorage(task.JobName, storageType)

return nil
}


+ 2
- 1
routers/repo/setting.go View File

@@ -504,7 +504,8 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
return
}
log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name)
go StopJobsByRepoID(repo.ID)
// go StopJobsByRepoID(repo.ID)
go DeleteJobsByRepoID(repo.ID)

ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success"))
ctx.Redirect(ctx.Repo.Owner.DashboardLink())


+ 1
- 1
templates/repo/cloudbrain/trainjob/show.tmpl View File

@@ -499,7 +499,7 @@
<div>
<a id="{{.VersionName}}-log-down"
class='{{if $.canDownload}}ti-download-file{{else}}disabled{{end}}'
href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/train-job/{{.JobID}}/download_log_file">
href="/api/v1/repos/{{$.RepoRelPath}}/cloudbrain/{{.ID}}/download_log_file">
<i class="ri-download-cloud-2-line"></i>
<span style="margin-left: 0.3rem;">{{$.i18n.Tr "repo.modelarts.download_log"}}</span>
</a>


+ 9
- 9
templates/repo/datasets/index.tmpl View File

@@ -157,8 +157,8 @@
<div class="ui mobile reversed stackable grid">
<div class="row">
<div class="ui blue small menu compact selectcloudbrain">
<a class="active item" href="{{.RepoLink}}/datasets">当前数据集</a>
<a class="item" href="{{.RepoLink}}/datasets/reference_datasets">关联数据集</a>
<a class="active item" href="{{.RepoLink}}/datasets">{{$.i18n.Tr "dataset.current_dataset"}}</a>
<a class="item" href="{{.RepoLink}}/datasets/reference_datasets">{{$.i18n.Tr "dataset.linked_dataset"}}</a>
</div>
</div>
<div class="row" style="align-items: center;">
@@ -169,20 +169,20 @@
{{if $.IsSigned}}
<button v-if="star_active" class="ui mini basic button" style="display: flex;align-items: center;padding: 0.5rem;border: #888888;border-top-right-radius: 0;border-bottom-right-radius: 0;margin-right: -1px;" @click="postStar({{.dataset.ID}},'{{.Link}}')">
<i class="ri-heart-fill" style="color: #FA8C16;"></i>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">取消收藏</span>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">{{$.i18n.Tr "dataset.unfavorite"}}</span>
</button>
<button v-else class="ui mini basic button" style="display: flex;align-items: center;padding:0.5rem;border: #888888;border-top-right-radius: 0;border-bottom-right-radius: 0;margin-right: -1px;" @click="postStar({{.dataset.ID}},'{{.Link}}')">
<i class="ri-heart-line" ></i>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">收藏</span>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">{{$.i18n.Tr "dataset.favorite"}}</span>
</button>
{{else}}
<button v-if="star_active" class="ui mini basic button" style="display: flex;align-items: center;padding: 0.5rem;border: #888888;border-top-right-radius: 0;border-bottom-right-radius: 0;margin-right: -1px;">
<i class="ri-heart-fill" ></i>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">取消收藏</span>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">{{$.i18n.Tr "dataset.unfavorite"}}</span>
</button>
<button v-else class="ui mini basic button" style="display: flex;align-items: center;padding:0.5rem;border: #888888;border-top-right-radius: 0;border-bottom-right-radius: 0;margin-right: -1px;">
<i class="ri-heart-line" style="color: #FA8C16;"></i>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">收藏</span>
<span style="margin-left: 0.3rem;font-size: 0.7rem;">{{$.i18n.Tr "dataset.favorite"}}</span>
</button>
{{end}}
</div>
@@ -402,11 +402,11 @@
<div class="ui stackable grid">
<div class="row" style="justify-content: space-between">
<div class="ui blue small menu compact selectcloudbrain">
<a class="active item" href="{{.RepoLink}}/datasets">当前数据集</a>
<a class="item" href="{{.RepoLink}}/datasets/reference_datasets">关联数据集</a>
<a class="active item" href="{{.RepoLink}}/datasets">{{$.i18n.Tr "dataset.current_dataset"}}</a>
<a class="item" href="{{.RepoLink}}/datasets/reference_datasets">{{$.i18n.Tr "dataset.linked_dataset"}}</a>
</div>
{{if $.CanWrite}}
<a class="ui green button" href="{{.RepoLink}}/datasets/create">创建数据集</a>
<a class="ui green button" href="{{.RepoLink}}/datasets/create">{{$.i18n.Tr "dataset.new_dataset"}}</a>
{{end}}
</div>
</div>


+ 1
- 1
templates/repo/datasets/reference.tmpl View File

@@ -2,7 +2,7 @@

<div class="repository">
{{template "repo/header" .}}
<div class="reference-dataset" data-repolink="{{.RepoLink}}" data-canwrite="{{.CanWrite}}" data-is-sign="{{$.IsSigned}}"></div>
<div class="reference-dataset" data-repolink="{{.RepoLink}}" data-canwrite="{{.CanWrite}}" data-is-sign="{{$.IsSigned}}" data-max-reference-num="{{.MaxReferenceDatasetNum}}" data-address="{{IsShowDataSetOfCurrentRepo $.Repository.ID}}"></div>
<div id="reference-dataset"></div>
</div>
{{template "base/footer" .}}

+ 1
- 1
templates/repo/header.tmpl View File

@@ -138,7 +138,7 @@
{{end}}

{{if .Permission.CanRead $.UnitTypeDatasets}}
<a class="{{if .PageIsDataset}}active{{end}} item" href="{{.RepoLink}}{{if IsShowDataSetOfCurrentRepo $.Repository.ID}}/datasets{{else}}/datasets/reference_datasets{{end}}">
<a class="{{if .PageIsDataset}}active{{end}} item" id="header-dataset" href="{{.RepoLink}}{{if IsShowDataSetOfCurrentRepo $.Repository.ID}}/datasets{{else}}/datasets/reference_datasets{{end}}">
<svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/></svg>
{{.i18n.Tr "datasets"}}
</a>


+ 1
- 1
templates/repo/modelarts/notebook/show.tmpl View File

@@ -441,7 +441,7 @@
<tr>
<td style="word-wrap: break-word;word-break: break-all;"><a href="{{.RepositoryLink}}" target="_blank">{{.DatasetName}}</a></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="{{.DatasetDownloadLink}}">复制链接</a></td>
<td class="center aligned"><a class="ui poping up clipboard" id="clipboard-btn1" 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>
{{end}}
</tbody>


+ 1
- 0
templates/repo/modelarts/trainjob/version_new.tmpl View File

@@ -160,6 +160,7 @@
<div id="select-multi-dataset">

</div>
<span class="tooltips" style="margin-left: 11.5rem;margin-bottom: 1rem;"></span>
<div class="inline unite min_title field">
<label style="font-weight: normal;">{{.i18n.Tr "repo.modelarts.train_job.run_parameter"}}</label>
<span id="add_run_para" style="margin-left: 0.5rem;cursor:pointer;color: rgba(3, 102, 214, 100);font-size: 14px;line-height: 26px;font-family: SourceHanSansSC-medium;"><i class="plus square outline icon"></i>{{.i18n.Tr "repo.modelarts.train_job.add_run_parameter"}}</span>


+ 62
- 27
web_src/js/components/dataset/referenceDataset.vue View File

@@ -133,7 +133,7 @@
justify-content: center;
margin: 0 1rem;
"
title="引用次数"
:title="i18n.citations"
>
<i class="ri-link"></i>
<span
@@ -147,7 +147,7 @@
</span>
<span
style="display: flex; align-items: center; flex: 1"
title="下载次数"
:title="i18n.downloads"
>
<i class="ri-download-line"></i>
<span
@@ -198,16 +198,16 @@
</div>
<div class="ui placeholder segment bgtask-none">
<div class="ui icon header bgtask-header-pic"></div>
<div class="bgtask-content-header">还未关联过数据集</div>
<div class="bgtask-content-header">{{ i18n.not_link_dataset }}</div>
<div class="bgtask-content">
<div class="bgtask-content-txt">
您可以通过单击新建关联数据集按钮,将平台上公开数据集展示在这里。
{{ i18n.no_link_dataset_tips1 }}
</div>
<div class="bgtask-content-txt">
使用说明可以参考启智AI协作平台<a
href="https://git.openi.org.cn/zeizei/OpenI_Learning"
>小白训练营课程</a
>
{{ i18n.dataset_instructions_for_use
}}<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">{{
i18n.dataset_camp_course
}}</a>
</div>
</div>
</div>
@@ -262,9 +262,17 @@
class="select-data-title"
style="display: flex; align-items: end"
><span class="ref-data-title">
{{ item.Title }}
</span></el-checkbox
>
<span
style="overflow: hidden; text-overflow: ellipsis"
>
{{ item.Title }}
</span>
<img
v-if="item.Recommend"
src="/img/jian.svg"
style="margin-left: 0.5rem"
/> </span
></el-checkbox>
<a
class="select-data-title select-data-href"
:href="`/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`"
@@ -386,6 +394,8 @@ export default {
loadingPublicPage: false,
canWrite: true,
isSigned: false,
maxReferenceNum: 20,
isCurrentUrl: true,
};
},
methods: {
@@ -402,7 +412,7 @@ export default {
this.selectDatasetArray = [];
},
gotoDataset(item) {
location.href = `/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`;
window.open(`/${item.Repo.OwnerName}/${item.Repo.Name}/datasets`);
},
currentChange(page) {
this.paramsPublics.page = page;
@@ -422,17 +432,20 @@ export default {
.delete(url)
.then((res) => {
if (res.data.Code === 0) {
this.$message.success(`取消${name}关联数据集成功!`);
this.$message.success(this.i18n.cancel_link_dataset.format(name));
let index = this.datasetList.findIndex((item) => {
return item.ID === id;
});
this.datasetList.splice(index, 1);
if (this.datasetList.length === 0) {
this.showFlag = false;
}
} else {
this.$message.error(res.data.Message);
}
})
.catch((err) => {
this.$message.error(`取消关联数据集失败!`);
this.$message.error(this.i18n.dataset_link_failed);
console.log(err);
});
},
@@ -441,12 +454,19 @@ export default {
this.dialogVisible = false;
},
changeCheckbox(checked, item) {
console.log(this.checkList);
// if (this.checkList.length > 10) {
// this.checkList.splice(10, 1);
// this.$message.error("关联超过20个数据集");
// return;
// }
if (this.checkList.length > this.maxReferenceNum) {
this.checkList.pop();
this.$message.error(
this.i18n.dataset_over_nums.format(this.maxReferenceNum)
);
return;
}
if (this.checkList.length === this.maxReferenceNum && !checked) {
this.$message.error(
this.i18n.dataset_over_nums.format(this.maxReferenceNum)
);
return;
}
if (checked) {
this.selectDatasetArray.push({ ID: item.ID, Title: item.Title });
} else {
@@ -499,7 +519,6 @@ export default {
this.loadingLinkPage = true;
let url = `${this.repoLink}/datasets/reference_datasets_data`;
this.$axios.get(url).then((res) => {
console.log(res);
this.loadingLinkPage = false;
if (!res.data) {
this.showFlag = false;
@@ -527,8 +546,10 @@ export default {
});
},
submitReferDataset() {
if (this.checkList.length > 20) {
this.$message.error("关联超过20个数据集");
if (this.checkList.length > this.maxReferenceNum) {
this.$message.error(
this.i18n.dataset_over_nums.format(this.maxReferenceNum)
);
return;
}
let url = `${this.repoLink}/datasets/reference_datasets`;
@@ -543,14 +564,14 @@ export default {
.post(url, data)
.then((res) => {
if (res.data.Code === 0) {
this.$message.success(`关联数据集成功!`);
this.$message.success(this.i18n.dataset_link_success);
this.getSelectDatasetList();
} else {
this.$message.error(res.data.Message);
}
})
.catch((err) => {
this.$message.error(`关联数据集失败!`);
this.$message.error(this.i18n.dataset_link_failed);
console.log(err);
});
},
@@ -577,6 +598,17 @@ export default {
this.searchName();
}
},
showFlag(val) {
if (!val || this.isCurrentUrl) {
document
.getElementById("header-dataset")
.setAttribute("href", this.repoLink + "/datasets");
} else {
document
.getElementById("header-dataset")
.setAttribute("href", this.repoLink + "/datasets/reference_datasets");
}
},
},
mounted() {
this.getSelectDatasetList();
@@ -585,6 +617,8 @@ export default {
this.repoLink = $(".reference-dataset").data("repolink") || "";
this.canWrite = $(".reference-dataset").data("canwrite");
this.isSigned = $(".reference-dataset").data("is-sign");
this.maxReferenceNum = $(".reference-dataset").data("max-reference-num");
this.isCurrentUrl = $(".reference-dataset").data("address");
if (document.documentElement.attributes["lang"].nodeValue == "en-US") {
this.i18n = this.$locale.US;
} else {
@@ -661,8 +695,9 @@ export default {
font-size: 18px;
color: #454545;
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: baseline;
max-width: 100%;
}
.select-data-href {
text-align: right;


+ 0
- 3
web_src/js/components/dataset/selectDataset.vue View File

@@ -971,9 +971,6 @@ export default {
mounted() {
this.type = $(".cloudbrain-type").data("cloudbrain-type");
this.repoLink = $(".cloudbrain-type").data("repo-link");

console.log("this.repolink", this.repoLink);

if ($(".cloudbrain-type").data("dataset-uuid")) {
this.hasSelectDatasetList = $(".cloudbrain-type")
.data("dataset-uuid")


+ 1
- 1
web_src/js/features/cloudbrainShow.js View File

@@ -419,7 +419,7 @@ export default async function initCloudrainSow() {
html += "</a>";
html += "</span>";
html += "</td>";
html += "<td class='message seven wide'>";
html += "<td class='message1 seven wide'>";
if (data.Dirs[i].IsDir) {
html += "<span class='truncate has-emoji'></span>";
} else {


web_src/js/features/datsetCate.js → web_src/js/features/i18nVue.js View File

@@ -43,9 +43,20 @@ export const i18nVue = {
favorite: "收藏",
disassociate: "取消关联",
public_dataset: "公开数据集",
selected_data_file: "已选数据文件",
selected_data_file: "已选数据",
sure: "确定",
search_dataset: "搜数据集名称/描述...",
citations: "引用次数",
downloads: "下载次数",
not_link_dataset: "还未关联过数据集",
no_link_dataset_tips1:
"您可以通过单击新建关联数据集按钮,将平台上公开数据集展示在这里。",
dataset_instructions_for_use: "使用说明:可以参考启智AI协作平台",
dataset_camp_course: "小白训练营课程",
dataset_link_success: "关联数据集成功!",
dataset_link_failed: "关联数据集失败!",
dataset_over_nums: "关联超过?个数据集",
cancel_link_dataset: "取消?关联数据集成功!",
},
US: {
computer_vision: "computer vision",
@@ -92,8 +103,21 @@ export const i18nVue = {
favorite: "Favorite",
disassociate: "Disassociate",
public_dataset: "Public Dataset",
selected_data_file: "Selected Data File",
sure: "Sure",
selected_data_file: "Selected DataSets",
sure: "Ok",
search_dataset: "Search dataset name/description ...",
citations: "Citations",
downloads: "Downloads",
not_link_dataset: "No datasets have been associated yet",
no_link_dataset_tips1:
"You can display public datasets on the platform here by clicking the New Linked Dataset button.",

dataset_instructions_for_use:
"Instructions for use: You can refer to Qizhi AI Collaboration Platform ",
dataset_camp_course: "Newcomer Training Camp Course",
dataset_link_success: "Linked dataset succeeded!",
dataset_link_failed: "Linked dataset Failed!",
dataset_over_nums: "Linked over ? datasets!",
cancel_link_dataset: "Cancel ? Linked dataset succeeded!",
},
};

+ 1
- 1
web_src/js/index.js View File

@@ -51,7 +51,7 @@ import referenceDataset from "./components/dataset/referenceDataset.vue";
import router from "./router/index.js";
import { Message } from "element-ui";

import { i18nVue } from "./features/datsetCate.js";
import { i18nVue } from "./features/i18nVue.js";

Vue.use(ElementUI);
Vue.prototype.$axios = axios;


Loading…
Cancel
Save