| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
c9f9227de3 | 云脑镜像增加国际化 | 4 years ago |
|
|
50719dcca9 | 解决冲突 | 4 years ago |
|
|
4fc2bf6501 | 国际化 | 4 years ago |
|
|
0baec6d053 | 修改国际化 | 4 years ago |
|
|
6e941c4d88 | 修改国际化 | 4 years ago |
|
|
90fb3e9daf | 国际化 | 4 years ago |
|
|
74c5595778 | 增加国际化 | 4 years ago |
|
|
68693ade8e | 国际化 | 4 years ago |
| @@ -309,6 +309,8 @@ robot = Robot | |||||
| federated_learning = Federated learning | federated_learning = Federated learning | ||||
| data_mining = Data mining | data_mining = Data mining | ||||
| RISC-V_development = RISC-V development | RISC-V_development = RISC-V development | ||||
| recommend_org_desc = These great organizations are using | |||||
| recommended_encyclopedia = Recommended encyclopedia | |||||
| [auth] | [auth] | ||||
| create_new_account = Register Account | create_new_account = Register Account | ||||
| @@ -878,6 +880,7 @@ search_dataset = Search Dataset Files | |||||
| unzip_tooltips = If it has not been decompressed for a long time, please check whether the compressed package has encrypted files or file errors | unzip_tooltips = If it has not been decompressed for a long time, please check whether the compressed package has encrypted files or file errors | ||||
| zip_failed = Decompression failed, please check whether the compressed package is encrypted or contact technical support | zip_failed = Decompression failed, please check whether the compressed package is encrypted or contact technical support | ||||
| dataset_desc = The description should not exceed 1024 characters | dataset_desc = The description should not exceed 1024 characters | ||||
| [repo] | [repo] | ||||
| owner = Owner | owner = Owner | ||||
| repo_name = Repository Name | repo_name = Repository Name | ||||
| @@ -963,6 +966,7 @@ image_delete_fail=Failed to delete image, please try again later. | |||||
| image_overwrite=You had submitted the same name image before, are you sure to overwrite the original image? | image_overwrite=You had submitted the same name image before, are you sure to overwrite the original image? | ||||
| download=Download | download=Download | ||||
| score=Score | score=Score | ||||
| all_contribute = All | |||||
| images.name = Image Tag | images.name = Image Tag | ||||
| images.name_placerholder = Please enter the image name | images.name_placerholder = Please enter the image name | ||||
| @@ -1000,6 +1004,14 @@ cloudbrain_jobname_err=Name must start with a lowercase letter or number,can inc | |||||
| cloudbrain_query_fail=Failed to query cloudbrain information. | cloudbrain_query_fail=Failed to query cloudbrain information. | ||||
| cloudbrain.mirror_tag = Mirror Tag | cloudbrain.mirror_tag = Mirror Tag | ||||
| cloudbrain.mirror_description = Mirror Description | cloudbrain.mirror_description = Mirror Description | ||||
| cloudbrain_task_result = Task Result | |||||
| cloudbrain_task_status = Status | |||||
| cloudbrain_task_hardware_information = Hardware Information | |||||
| cloudbrain_task_debug_info = Debug Info | |||||
| cloudbrain_task_platform = Platform | |||||
| cloudbrain_start_time = Start Time | |||||
| cloudbrain_end_time = End Time | |||||
| cloudbrain_exit_information = Exit Information | |||||
| record_begintime_get_err=Can not get the record begin time. | record_begintime_get_err=Can not get the record begin time. | ||||
| parameter_is_wrong=The input parameter is wrong. | parameter_is_wrong=The input parameter is wrong. | ||||
| @@ -1041,6 +1053,15 @@ modelarts.create_model = Create Model | |||||
| modelarts.model_label=Model Label | modelarts.model_label=Model Label | ||||
| modelarts.infer_dataset = Inference Dataset | modelarts.infer_dataset = Inference Dataset | ||||
| modelarts.task = Task Name | |||||
| modelarts.task_ details= Task Details | |||||
| modelarts.task_describe = Description | |||||
| modelarts.mirror_name = Mirror Name | |||||
| modelarts.dataset_download_URL = Dataset Download URL | |||||
| modelarts.create_time = Create Time | |||||
| modelarts.last_update_time = Last Update Time | |||||
| modelarts.mirror = Mirror | |||||
| modelarts.type = Type | |||||
| modelarts.train_job.basic_info=Basic Info | modelarts.train_job.basic_info=Basic Info | ||||
| modelarts.train_job.job_status=Job Status | modelarts.train_job.job_status=Job Status | ||||
| @@ -1105,6 +1126,12 @@ modelarts.infer_job.select_model = Select Model | |||||
| modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference. Py, case/main.py. | modelarts.infer_job.boot_file_helper=The startup file is the entry file for your program execution and must end in.py.Such as inference.py, main.py, example/inference. Py, case/main.py. | ||||
| modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. | modelarts.infer_job.tooltip = The model has been deleted and cannot be viewed. | ||||
| modelarts.train_job.choose_training_task = Choose a training task | |||||
| modelarts.train_job.model_version = Model Version | |||||
| modelarts.model_description = Model Description | |||||
| modelarts.canceled= You have canceled the operation | |||||
| modelarts.scrolled_bottom= You have scrolled to the bottom of the log | |||||
| modelarts.scrolled_top = You have scrolled to the top of the log | |||||
| debug_task_not_created = Debug task has not been created | debug_task_not_created = Debug task has not been created | ||||
| train_task_not_created = Train task has not been created | train_task_not_created = Train task has not been created | ||||
| @@ -1133,6 +1160,12 @@ model.manage.sava_model = Sava Model | |||||
| model.manage.model_manage = ModelManage | model.manage.model_manage = ModelManage | ||||
| model.manage.model_accuracy = Model Accuracy | model.manage.model_accuracy = Model Accuracy | ||||
| model_not_created = Model has not been created | |||||
| model_not_training_task = Training task: You have not created a training task, please create it first <a href="%s/modelarts/train-job">training task</a>. | |||||
| delete_model = Delete Model | |||||
| delete_model_issure = Are you sure you want to delete this model? Once this model is deleted, it cannot be recovered. | |||||
| select_version = Select Version | |||||
| template.items = Template Items | template.items = Template Items | ||||
| template.git_content = Git Content (Default Branch) | template.git_content = Git Content (Default Branch) | ||||
| template.git_hooks = Git Hooks | template.git_hooks = Git Hooks | ||||
| @@ -313,6 +313,8 @@ robot = 机器人 | |||||
| federated_learning = 联邦学习 | federated_learning = 联邦学习 | ||||
| data_mining = 数据挖掘 | data_mining = 数据挖掘 | ||||
| RISC-V_development = RISC-V开发 | RISC-V_development = RISC-V开发 | ||||
| recommend_org_desc = 这些优秀的组织正在使用 | |||||
| recommended_encyclopedia = 推荐百科 | |||||
| [auth] | [auth] | ||||
| create_new_account=注册帐号 | create_new_account=注册帐号 | ||||
| @@ -965,6 +967,7 @@ image_overwrite=您已经提交过相同名称的镜像,您确定要覆盖原 | |||||
| download=模型下载 | download=模型下载 | ||||
| score=评分 | score=评分 | ||||
| all_contribute = 全部 | |||||
| images.name = 镜像Tag | images.name = 镜像Tag | ||||
| images.name_placerholder = 请输入镜像Tag | images.name_placerholder = 请输入镜像Tag | ||||
| @@ -1002,6 +1005,15 @@ cloudbrain_jobname_err=只能以小写字母或数字开头且只包含小写字 | |||||
| cloudbrain_query_fail=查询云脑任务失败。 | cloudbrain_query_fail=查询云脑任务失败。 | ||||
| cloudbrain.mirror_tag = 镜像标签 | cloudbrain.mirror_tag = 镜像标签 | ||||
| cloudbrain.mirror_description = 镜像描述 | cloudbrain.mirror_description = 镜像描述 | ||||
| cloudbrain_task_result = 任务结果 | |||||
| cloudbrain_task_status = 状态 | |||||
| cloudbrain_task_hardware_information = 硬件信息 | |||||
| cloudbrain_task_debug_info = 调试信息 | |||||
| cloudbrain_task_platform = 平台 | |||||
| cloudbrain_start_time = 开始时间 | |||||
| cloudbrain_end_time = 结束时间 | |||||
| cloudbrain_exit_information = 退出信息 | |||||
| cloudbrain.exitinfo=退出信息 | cloudbrain.exitinfo=退出信息 | ||||
| cloudbrain.platform=平台 | cloudbrain.platform=平台 | ||||
| cloudbrain.endtime=结束时间 | cloudbrain.endtime=结束时间 | ||||
| @@ -1048,6 +1060,16 @@ modelarts.create_model=创建模型 | |||||
| modelarts.model_label=模型标签 | modelarts.model_label=模型标签 | ||||
| modelarts.infer_dataset = 推理数据集 | modelarts.infer_dataset = 推理数据集 | ||||
| modelarts.task = 任务名称 | |||||
| modelarts.task_details = 任务详情 | |||||
| modelarts.task_describe = 描述 | |||||
| modelarts.mirror_name = 镜像名称 | |||||
| modelarts.dataset_download_URL = 数据集下载地址 | |||||
| modelarts.create_time = 开始时间 | |||||
| modelarts.last_update_time = 最后更新时间 | |||||
| modelarts.mirror = 镜像 | |||||
| modelarts.type = 类型 | |||||
| modelarts.train_job.basic_info=基本信息 | modelarts.train_job.basic_info=基本信息 | ||||
| @@ -1116,6 +1138,12 @@ modelarts.infer_job.select_model = 选择模型 | |||||
| modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | modelarts.infer_job.boot_file_helper=启动文件是您程序执行的入口文件,必须是以.py结尾的文件。比如inference.py、main.py、example/inference.py、case/main.py。 | ||||
| modelarts.infer_job.tooltip = 该模型已删除,无法查看。 | modelarts.infer_job.tooltip = 该模型已删除,无法查看。 | ||||
| modelarts.train_job.choose_training_task = 选择训练任务 | |||||
| modelarts.train_job.model_version = 模型版本 | |||||
| modelarts.model_description = 模型描述 | |||||
| modelarts.canceled = 您已取消操作 | |||||
| modelarts.scrolled_bottom = 您已翻阅至日志底部 | |||||
| modelarts.scrolled_top = 您已翻阅至日志顶部 | |||||
| debug_task_not_created = 未创建过调试任务 | debug_task_not_created = 未创建过调试任务 | ||||
| train_task_not_created = 未创建过训练任务 | train_task_not_created = 未创建过训练任务 | ||||
| @@ -1144,6 +1172,12 @@ model.manage.sava_model = 保存模型 | |||||
| model.manage.model_manage = 模型管理 | model.manage.model_manage = 模型管理 | ||||
| model.manage.model_accuracy = 模型精度 | model.manage.model_accuracy = 模型精度 | ||||
| model_not_created = 未创建过模型 | |||||
| model_not_training_task = 训练任务:您还没创建过训练任务,请先创建<a href="%s/modelarts/train-job">训练任务</a>。 | |||||
| delete_model = 删除模型 | |||||
| delete_model_issure = 你确认删除该模型么?此模型一旦删除不可恢复。 | |||||
| select_version = 选择版本 | |||||
| template.items=模板选项 | template.items=模板选项 | ||||
| template.git_content=Git数据(默认分支) | template.git_content=Git数据(默认分支) | ||||
| template.git_hooks=Git 钩子 | template.git_hooks=Git 钩子 | ||||
| @@ -54,6 +54,7 @@ | |||||
| "vue": "2.6.11", | "vue": "2.6.11", | ||||
| "vue-bar-graph": "1.2.0", | "vue-bar-graph": "1.2.0", | ||||
| "vue-calendar-heatmap": "0.8.4", | "vue-calendar-heatmap": "0.8.4", | ||||
| "vue-i18n": "6.1.3", | |||||
| "vue-loader": "15.9.2", | "vue-loader": "15.9.2", | ||||
| "vue-router": "3.3.4", | "vue-router": "3.3.4", | ||||
| "vue-template-compiler": "2.6.11", | "vue-template-compiler": "2.6.11", | ||||
| @@ -21,7 +21,7 @@ | |||||
| <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | ||||
| <div class="ui language bottom floating slide up dropdown link item"> | <div class="ui language bottom floating slide up dropdown link item"> | ||||
| <i class="world icon"></i> | <i class="world icon"></i> | ||||
| <div class="text">{{.LangName}}</div> | |||||
| <div class="text" id="langName">{{.LangName}}</div> | |||||
| <div class="menu"> | <div class="menu"> | ||||
| {{range .AllLangs}} | {{range .AllLangs}} | ||||
| <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | ||||
| @@ -19,7 +19,7 @@ | |||||
| <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | ||||
| <div class="ui language bottom floating slide up dropdown link item"> | <div class="ui language bottom floating slide up dropdown link item"> | ||||
| <i class="world icon"></i> | <i class="world icon"></i> | ||||
| <div class="text">{{.LangName}}</div> | |||||
| <div class="text" id="langName">{{.LangName}}</div> | |||||
| <div class="menu"> | <div class="menu"> | ||||
| {{range .AllLangs}} | {{range .AllLangs}} | ||||
| <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | ||||
| @@ -12,4 +12,4 @@ | |||||
| padding-bottom: 53px; | padding-bottom: 53px; | ||||
| } | } | ||||
| </style> | |||||
| </style> | |||||
| @@ -228,4 +228,20 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | |||||
| {{template "base/footer" .}} | |||||
| <script type="mode"> | |||||
| import Vue from 'vue' | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| let text_langName = document.getElementById("menutext_2").innerText | |||||
| console.log("fjdhfdjhfjdhfdjhfdj:",text_langName) | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| </script> | |||||
| @@ -31,7 +31,7 @@ | |||||
| <div class="repos--seach repos--orgtop"> | <div class="repos--seach repos--orgtop"> | ||||
| <div class="ui container"> | <div class="ui container"> | ||||
| <p class="text grey">这些优秀的组织正在使用:</p> | |||||
| <p class="text grey">{{.i18n.Tr "explore.recommend_org_desc"}} :</p> | |||||
| <!-- Swiper --> | <!-- Swiper --> | ||||
| <div class="swiper-container"> | <div class="swiper-container"> | ||||
| <div class="swiper-wrapper"> | <div class="swiper-wrapper"> | ||||
| @@ -2,7 +2,7 @@ | |||||
| <div class="ui secondary pointing menu"> | <div class="ui secondary pointing menu"> | ||||
| <div class="active item"> | <div class="active item"> | ||||
| 推荐百科 | |||||
| {{.i18n.Tr "explore.recommended_encyclopedia"}} | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="ui relaxed list"> | <div class="ui relaxed list"> | ||||
| @@ -194,6 +194,89 @@ td, th { | |||||
| <div class="active section">{{.displayJobName}}</div> | <div class="active section">{{.displayJobName}}</div> | ||||
| </div> | </div> | ||||
| </h4> | </h4> | ||||
| <<<<<<< HEAD | |||||
| <div> | |||||
| <div class="ui yellow segment"> | |||||
| {{with .task}} | |||||
| <p>{{$.i18n.Tr "repo.cloudbrain_task" }}: {{.DisplayJobName}}</p> | |||||
| {{end}} | |||||
| </div> | |||||
| <div class="ui green segment"> | |||||
| <p>{{$.i18n.Tr "repo.cloudbrain_task_result"}}:</p> | |||||
| {{with .taskRes}} | |||||
| {{range .TaskStatuses}} | |||||
| <table class="ui celled striped table"> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td class="four wide"> {{$.i18n.Tr "repo.cloudbrain_task_status"}} </td> | |||||
| <td> {{.State}} </td> | |||||
| </tr> | |||||
| </tbody> | |||||
| </table> | |||||
| {{end}} | |||||
| {{end}} | |||||
| </div> | |||||
| <div class="ui blue segment"> | |||||
| {{with .result}} | |||||
| <table class="ui celled striped table"> | |||||
| <thead> | |||||
| <tr> <th colspan="2"> {{$.i18n.Tr "repo.cloudbrain_task_platform"}} </th> </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td class="four wide"> CPU </td> | |||||
| <td>{{.Resource.CPU}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> Memory </td> | |||||
| <td>{{.Resource.Memory}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> NvidiaComGpu </td> | |||||
| <td>{{.Resource.NvidiaComGpu}}</td> | |||||
| </tr> | |||||
| </tbody> | |||||
| </table> | |||||
| <table class="ui celled striped table"> | |||||
| <thead> | |||||
| <tr> <th colspan="2"> {{$.i18n.Tr "repo.cloudbrain_task_debug_info"}}</th> </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td class="four wide"> {{$.i18n.Tr "repo.cloudbrain_task_platform"}} </td> | |||||
| <td> {{.Platform}} </td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> {{$.i18n.Tr "repo.cloudbrain_start_time"}} </td> | |||||
| {{if not (eq $.task.StartTime 0)}} | |||||
| <td>{{TimeSinceUnix1 $.task.StartTime}}</td> | |||||
| {{else}} | |||||
| <td>无<td> | |||||
| {{end}} | |||||
| </tr> | |||||
| <tr> | |||||
| <td> {{$.i18n.Tr "repo.cloudbrain_end_time"}} </td> | |||||
| {{if not (eq $.task.EndTime 0)}} | |||||
| <td>{{TimeSinceUnix1 $.task.EndTime}}</td> | |||||
| {{else}} | |||||
| <td>无<td> | |||||
| {{end}} | |||||
| </tr> | |||||
| <tr> | |||||
| <td> ExitCode </td> | |||||
| <td>{{.JobStatus.AppExitCode}}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td> {{$.i18n.Tr "repo.cloudbrain_exit_information"}} </td> | |||||
| <td>{{.JobStatus.AppExitDiagnostics | nl2br}}</td> | |||||
| </tr> | |||||
| </tbody> | |||||
| </table> | |||||
| {{end}} | |||||
| </div> | |||||
| ======= | |||||
| {{range $k ,$v := .version_list_task}} | {{range $k ,$v := .version_list_task}} | ||||
| <div class="ui accordion border-according" id="accordion{{.VersionName}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> | <div class="ui accordion border-according" id="accordion{{.VersionName}}" data-repopath="{{$.RepoRelPath}}" data-jobid="{{.JobID}}" data-version="{{.VersionName}}"> | ||||
| <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}"> | <input type="hidden" id="jobId_input" name="jobId_input" value="{{.JobID}}"> | ||||
| @@ -468,6 +551,7 @@ td, th { | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| >>>>>>> wangjr_develop | |||||
| </div> | </div> | ||||
| {{end}} {{template "base/paginate" .}} | {{end}} {{template "base/paginate" .}} | ||||
| </div> | </div> | ||||
| @@ -256,7 +256,7 @@ | |||||
| </div> | </div> | ||||
| <div class="ui six wide tablet four wide computer column"> | <div class="ui six wide tablet four wide computer column"> | ||||
| <div id="repo-desc" data-IsAdmin= "{{.Permission.IsAdmin}}" data-IsArchived="{{.Repository.IsArchived}}" > | <div id="repo-desc" data-IsAdmin= "{{.Permission.IsAdmin}}" data-IsArchived="{{.Repository.IsArchived}}" > | ||||
| <h4 id="about-desc" class="ui header">简介</h4> | |||||
| <h4 id="about-desc" class="ui header"> {{ .i18n.Tr "repo.computing.Introduction"}}</h4> | |||||
| <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}"> | <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}"> | ||||
| <p> | <p> | ||||
| {{if .Repository.DescriptionHTML}} | {{if .Repository.DescriptionHTML}} | ||||
| @@ -322,14 +322,14 @@ | |||||
| <h4 class="ui header"> | <h4 class="ui header"> | ||||
| {{$lenCon := len .ContributorInfo}} | {{$lenCon := len .ContributorInfo}} | ||||
| {{if lt $lenCon 25 }} | {{if lt $lenCon 25 }} | ||||
| <strong>贡献者 ({{len .ContributorInfo}})</strong> | |||||
| <strong> {{.i18n.Tr "home.contributors"}} ({{len .ContributorInfo}})</strong> | |||||
| {{else}} | {{else}} | ||||
| <strong>贡献者 ({{len .ContributorInfo}}+)</strong> | |||||
| <strong> {{.i18n.Tr "home.contributors"}} ({{len .ContributorInfo}}+)</strong> | |||||
| {{end}} | {{end}} | ||||
| <div class="ui right"> | <div class="ui right"> | ||||
| <!-- <a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a> --> | <!-- <a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a> --> | ||||
| <a class="membersmore text grey" href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">全部 {{svg "octicon-chevron-right" 16}}</a> | |||||
| <a class="membersmore text grey" href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">{{.i18n.Tr "repo.all_contribute" }} {{svg "octicon-chevron-right" 16}}</a> | |||||
| </div> | </div> | ||||
| </h4> | </h4> | ||||
| <div class="ui members" id="contributorInfo"> | <div class="ui members" id="contributorInfo"> | ||||
| @@ -481,7 +481,7 @@ td, th { | |||||
| <div id="newmodel"> | <div id="newmodel"> | ||||
| <div class="ui modal second"> | <div class="ui modal second"> | ||||
| <div class="header" style="padding: 1rem;background-color: rgba(240, 240, 240, 100);"> | <div class="header" style="padding: 1rem;background-color: rgba(240, 240, 240, 100);"> | ||||
| <h4 id="model_header">导入新模型</h4> | |||||
| <h4 id="model_header">{{.i18n.Tr "repo.cloudbrain.model.manage.import_new_model"}}</h4> | |||||
| </div> | </div> | ||||
| <div class="content content-padding"> | <div class="content content-padding"> | ||||
| <form id="formId" method="POST" class="ui form"> | <form id="formId" method="POST" class="ui form"> | ||||
| @@ -492,31 +492,31 @@ td, th { | |||||
| <div class="two inline fields "> | <div class="two inline fields "> | ||||
| <div class="required ten wide field"> | <div class="required ten wide field"> | ||||
| <label style="margin-left: -23px;">选择训练任务</label> | |||||
| <label style="margin-left: -23px;"> {{.i18n.Tr "repo.modelarts.train_job.choose_training_task"}}</label> | |||||
| <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | <input type="hidden" class="width83" id="JobId" name="JobId" readonly required> | ||||
| <input class="width83" id="JobName" readonly required> | <input class="width83" id="JobName" readonly required> | ||||
| </div> | </div> | ||||
| <div class="required six widde field"> | <div class="required six widde field"> | ||||
| <label>版本</label> | |||||
| <label>{{.i18n.Tr "repo.model.manage.version"}} </label> | |||||
| <input class="width70" id="VersionName" name="VersionName" readonly required> | <input class="width70" id="VersionName" name="VersionName" readonly required> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="required inline field" id="modelname"> | <div class="required inline field" id="modelname"> | ||||
| <label>模型名称</label> | |||||
| <label>{{.i18n.Tr "repo.modelarts.model_name"}}</label> | |||||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | ||||
| </div> | </div> | ||||
| <div class="required inline field" id="verionname"> | <div class="required inline field" id="verionname"> | ||||
| <label>模型版本</label> | |||||
| <label>{{.i18n.Tr "repo.modelarts.model_version"}}</label> | |||||
| <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | ||||
| </div> | </div> | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label>模型标签</label> | |||||
| <label>{{.i18n.Tr "repo.modelarts.model_label"}}</label> | |||||
| <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | ||||
| </div> | </div> | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label for="description">模型描述</label> | |||||
| <label for="description"> {{.i18n.Tr "repo.modelarts.model_description"}}</label> | |||||
| <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | ||||
| </div> | </div> | ||||
| @@ -706,7 +706,7 @@ td, th { | |||||
| }, | }, | ||||
| onHidden: function() { | onHidden: function() { | ||||
| if (flag == false) { | if (flag == false) { | ||||
| $('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| $('.alert').html("{{.i18n.Tr "repo.modelarts.canceled"}}").removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -861,7 +861,7 @@ td, th { | |||||
| let end_line = $(`#log${version_name} input[name=end_line]`).val() | let end_line = $(`#log${version_name} input[name=end_line]`).val() | ||||
| $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${end_line}&lines=50&order=desc`, (data) => { | $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${end_line}&lines=50&order=desc`, (data) => { | ||||
| if (data.Lines == 0){ | if (data.Lines == 0){ | ||||
| $(`.message${version_name} #header`).text('您已翻阅至日志底部') | |||||
| $(`.message${version_name} #header`).text("{{.i18n.Tr "repo.modelarts.scrolled_bottom"}}") | |||||
| $(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| $(`.message${version_name}`).css('display', 'none') | $(`.message${version_name}`).css('display', 'none') | ||||
| @@ -884,7 +884,7 @@ td, th { | |||||
| let start_line = $(`#log${version_name} input[name=start_line]`).val() | let start_line = $(`#log${version_name} input[name=start_line]`).val() | ||||
| $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${start_line}&lines=50&order=asc`, (data) => { | $.get(`/api/v1/repos/${userName}/${repoPath}/modelarts/train-job/${jobID}/log?version_name=${version_name}&base_line=${start_line}&lines=50&order=asc`, (data) => { | ||||
| if (data.Lines == 0){ | if (data.Lines == 0){ | ||||
| $(`.message${version_name} #header`).text('您已翻阅至日志顶部') | |||||
| $(`.message${version_name} #header`).text("{{.i18n.Tr "repo.modelarts.scrolled_top"}}") | |||||
| $(`.message${version_name}`).css('display', 'block') | $(`.message${version_name}`).css('display', 'block') | ||||
| setTimeout(function(){ | setTimeout(function(){ | ||||
| $(`.message${version_name}`).css('display', 'none') | $(`.message${version_name}`).css('display', 'none') | ||||
| @@ -29,15 +29,16 @@ | |||||
| {{if eq $.MODEL_COUNT 0}} | {{if eq $.MODEL_COUNT 0}} | ||||
| <div class="ui placeholder segment bgtask-none"> | <div class="ui placeholder segment bgtask-none"> | ||||
| <div class="ui icon header bgtask-header-pic"></div> | <div class="ui icon header bgtask-header-pic"></div> | ||||
| <div class="bgtask-content-header">未创建过模型</div> | |||||
| <div class="bgtask-content-header">{{$.i18n.Tr "repo.model_not_created"}}</div> | |||||
| <div class="bgtask-content"> | <div class="bgtask-content"> | ||||
| {{if $.RepoIsEmpty}} | {{if $.RepoIsEmpty}} | ||||
| <div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本;</a></div> | |||||
| <!-- <div class="bgtask-content-txt">代码版本:您还没有初始化代码仓库,请先<a href="{{.RepoLink}}">创建代码版本;</a></div> --> | |||||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
| {{end}} | {{end}} | ||||
| {{if eq $.TRAIN_COUNT 0}} | {{if eq $.TRAIN_COUNT 0}} | ||||
| <div class="bgtask-content-txt">训练任务:您还没创建过训练任务,请先创建<a href="{{.RepoLink}}/modelarts/train-job">训练任务</a>。</div> | |||||
| <div class="bgtask-content-txt">{{$.i18n.Tr "repo.repo_not_initialized" .RepoLink | Safe}}</div> | |||||
| {{end}} | {{end}} | ||||
| <div class="bgtask-content-txt">使用说明:可以参考启智AI协作平台<a href="https://git.openi.org.cn/zeizei/OpenI_Learning">小白训练营课程。</a></div> | |||||
| <div class="bgtask-content-txt"> {{$.i18n.Tr "repo.platform_instructions" .RepoLink | Safe}} </a></div> | |||||
| </div> | </div> | ||||
| <div style="display: none;"> | <div style="display: none;"> | ||||
| @@ -71,11 +72,11 @@ | |||||
| <div id="deletemodel"> | <div id="deletemodel"> | ||||
| <div class="ui basic modal first"> | <div class="ui basic modal first"> | ||||
| <div class="ui icon header"> | <div class="ui icon header"> | ||||
| <i class="trash icon"></i> 删除模型 | |||||
| <i class="trash icon"></i> {{$.i18n.Tr "repo.delete_model"}} | |||||
| </div> | </div> | ||||
| <div class="content"> | <div class="content"> | ||||
| <p>你确认删除该模型么?此模型一旦删除不可恢复。</p> | |||||
| <p> {{$.i18n.Tr "repo.delete_model_issure"}} </p> | |||||
| </div> | </div> | ||||
| <div class="actions"> | <div class="actions"> | ||||
| <div class="ui red basic inverted cancel button"> | <div class="ui red basic inverted cancel button"> | ||||
| @@ -101,20 +102,20 @@ | |||||
| <input type="hidden" name="_csrf" value=""> | <input type="hidden" name="_csrf" value=""> | ||||
| <div class="two inline fields "> | <div class="two inline fields "> | ||||
| <div class="required ten wide field"> | <div class="required ten wide field"> | ||||
| <label style="margin-left: -23px;">选择训练任务</label> | |||||
| <label style="margin-left: -23px;"> {{$.i18n.Tr "repo.modelarts.train_job.choose_training_task"}} </label> | |||||
| <div class="ui dropdown selection search width83 loading" id="choice_model"> | <div class="ui dropdown selection search width83 loading" id="choice_model"> | ||||
| <input type="hidden" id="JobId" name="JobId" required> | <input type="hidden" id="JobId" name="JobId" required> | ||||
| <div class="default text">选择训练任务</div> | |||||
| <div class="default text">{{$.i18n.Tr "repo.modelarts.train_job.choose_training_task"}}</div> | |||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="job-name"> | <div class="menu" id="job-name"> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="required six widde field"> | <div class="required six widde field"> | ||||
| <label>版本</label> | |||||
| <label> {{$.i18n.Tr "repo.modelarts.version"}} </label> | |||||
| <div class="ui dropdown selection search width70" id="choice_version"> | <div class="ui dropdown selection search width70" id="choice_version"> | ||||
| <input type="hidden" id="VersionName" name="VersionName" required> | <input type="hidden" id="VersionName" name="VersionName" required> | ||||
| <div class="default text">选择版本</div> | |||||
| <div class="default text"> {{$.i18n.Tr "repo.select_version"}} </div> | |||||
| <i class="dropdown icon"></i> | <i class="dropdown icon"></i> | ||||
| <div class="menu" id="job-version"> | <div class="menu" id="job-version"> | ||||
| @@ -123,19 +124,19 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="required inline field" id="modelname"> | <div class="required inline field" id="modelname"> | ||||
| <label>模型名称</label> | |||||
| <label> {{$.i18n.Tr "repo.model.manage.model_name"}} </label> | |||||
| <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | <input style="width: 45%;" id="name" name="Name" required maxlength="25" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> | ||||
| </div> | </div> | ||||
| <div class="required inline field" id="verionname"> | <div class="required inline field" id="verionname"> | ||||
| <label>模型版本</label> | |||||
| <label> {{$.i18n.Tr "repo.modelarts.train_job.model_version"}} </label> | |||||
| <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | <input style="width: 45%;" id="version" name="Version" value="" readonly required maxlength="255"> | ||||
| </div> | </div> | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label>模型标签</label> | |||||
| <label> {{$.i18n.Tr "repo.modelarts.model_label"}} </label> | |||||
| <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | <input style="width: 83%;margin-left: 7px;" id="label" name="Label" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.label_place"}}'> | ||||
| </div> | </div> | ||||
| <div class="inline field"> | <div class="inline field"> | ||||
| <label for="description">模型描述</label> | |||||
| <label for="description"> {{$.i18n.Tr "repo.modelarts.model_descriptionl"}} </label> | |||||
| <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | <textarea style="width: 83%;margin-left: 7px;" id="Description" name="Description" rows="3" maxlength="255" placeholder='{{.i18n.Tr "repo.modelarts.train_job.new_place"}}' onchange="this.value=this.value.substring(0, 255)" onkeydown="this.value=this.value.substring(0, 255)" onkeyup="this.value=this.value.substring(0, 256)"></textarea> | ||||
| </div> | </div> | ||||
| @@ -173,7 +174,7 @@ | |||||
| .modal({ | .modal({ | ||||
| centered: false, | centered: false, | ||||
| onShow:function(){ | onShow:function(){ | ||||
| $('#model_header').text("导入新模型") | |||||
| $('#model_header').text( "{{.i18n.Tr "repo.model.manage.import_new_model"}}" ) | |||||
| $('input[name="Version"]').addClass('model_disabled') | $('input[name="Version"]').addClass('model_disabled') | ||||
| $('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"}) | $('.ui.dimmer').css({"background-color":"rgb(136, 136, 136,0.7)"}) | ||||
| $("#job-name").empty() | $("#job-name").empty() | ||||
| @@ -1,11 +1,11 @@ | |||||
| <template> | <template> | ||||
| <div class="ui container"> | <div class="ui container"> | ||||
| <div class="row git-user-content"> | |||||
| <div class="row git-user-content" > | |||||
| <h3 class="ui header"> | <h3 class="ui header"> | ||||
| <div class="ui breadcrumb"> | |||||
| <a class="section" :href="url_code">代码</a> | |||||
| <div class="ui breadcrumb" id ='contri'> | |||||
| <a class="section" :href="url_code"> {{$t('message.code')}}</a> | |||||
| <div class="divider"> / </div> | <div class="divider"> / </div> | ||||
| <div class="active section" >贡献者 ({{totalNum}})</div> | |||||
| <div class="active section" >{{$t('message.contributor')}} ({{totalNum}})</div> | |||||
| </div> | </div> | ||||
| </h3> | </h3> | ||||
| <div class="ui horizontal relaxed list"> | <div class="ui horizontal relaxed list"> | ||||
| @@ -36,63 +36,83 @@ | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | |||||
| <script type="text/javascript"> | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | |||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | |||||
| export default { | |||||
| data() { | |||||
| return { | |||||
| url:'', | |||||
| url_infor:'', | |||||
| href_:'', | |||||
| contributors_list:[], | |||||
| contributors_list_page:[], | |||||
| currentPage:1, | |||||
| pageSize:50, | |||||
| totalNum:0, | |||||
| AppSubUrl:AppSubUrl | |||||
| }; | |||||
| }, | |||||
| methods: { | |||||
| export default { | |||||
| data() { | |||||
| return { | |||||
| url:'', | |||||
| url_infor:'', | |||||
| href_:'', | |||||
| contributors_list:[], | |||||
| contributors_list_page:[], | |||||
| currentPage:1, | |||||
| pageSize:50, | |||||
| totalNum:0, | |||||
| AppSubUrl:AppSubUrl, | |||||
| }; | |||||
| }, | |||||
| methods: { | |||||
| getContributorsList(){ | |||||
| this.$axios.get(this.url+'/list?'+this.url_infor).then((res)=>{ | |||||
| this.contributors_list = res.data.contributor_info | |||||
| this.totalNum = this.contributors_list.length | |||||
| this.contributors_list_page = this.contributors_list.slice(0,this.pageSize) | |||||
| }) | |||||
| }, | |||||
| handleCurrentChange(val){ | |||||
| this.contributors_list_page = this.contributors_list.slice((val-1)*this.pageSize,val*this.pageSize) | |||||
| }, | |||||
| getContributorsList(){ | |||||
| this.$axios.get(this.url+'/list?'+this.url_infor).then((res)=>{ | |||||
| this.contributors_list = res.data.contributor_info | |||||
| this.totalNum = this.contributors_list.length | |||||
| this.contributors_list_page = this.contributors_list.slice(0,this.pageSize) | |||||
| }) | |||||
| getLang(){ | |||||
| this.text_langName = document.getElementById("menutext_1").innerText | |||||
| if (this.text_langName == '简体中文'){ | |||||
| this.$i18n.locale = 'zh' | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (this.text_langName == 'English'){ | |||||
| this.$i18n.locale = 'en' | |||||
| locale.use(enLocale) | |||||
| } | |||||
| } | |||||
| }, | }, | ||||
| handleCurrentChange(val){ | |||||
| this.contributors_list_page = this.contributors_list.slice((val-1)*this.pageSize,val*this.pageSize) | |||||
| computed:{ | |||||
| }, | }, | ||||
| }, | |||||
| computed:{ | |||||
| }, | |||||
| watch: { | |||||
| watch: { | |||||
| }, | |||||
| created(){ | |||||
| const url = window.location.pathname; | |||||
| this.url = url; | |||||
| let strIndex = this.url.indexOf("contributors") | |||||
| this.url_code = this.url.substr(0,strIndex) | |||||
| this.href_ = window.location.href; | |||||
| let index = this.href_.indexOf("?") | |||||
| this.url_infor = this.href_.substring(index+1,this.href_.length) | |||||
| this.getContributorsList() | |||||
| }, | |||||
| }, | |||||
| created(){ | |||||
| console.log(this) | |||||
| const url = window.location.pathname; | |||||
| this.url = url; | |||||
| let strIndex = this.url.indexOf("contributors") | |||||
| this.url_code = this.url.substr(0,strIndex) | |||||
| this.href_ = window.location.href; | |||||
| let index = this.href_.indexOf("?") | |||||
| this.url_infor = this.href_.substring(index+1,this.href_.length) | |||||
| this.getContributorsList() | |||||
| // this.text_langName='' | |||||
| // this.getLang() | |||||
| }, | |||||
| updated(){ | |||||
| if(document.querySelectorAll('img[avatar]').length!==0){ | |||||
| window.LetterAvatar.transform() | |||||
| updated(){ | |||||
| if(document.querySelectorAll('img[avatar]').length!==0){ | |||||
| window.LetterAvatar.transform() | |||||
| } | |||||
| }, | |||||
| mounted(){ | |||||
| // this.getLang() | |||||
| } | } | ||||
| } | |||||
| }; | }; | ||||
| </script> | </script> | ||||
| @@ -1,13 +1,13 @@ | |||||
| <template> | <template> | ||||
| <div> | <div> | ||||
| <h4 id="about-desc" class="ui header desc-home">简介 | |||||
| <h4 id="about-desc" class="ui header desc-home">{{$t('message.introduction')}} | |||||
| <a class="edit-icon" v-if="IsPermit" id ="editBtn" href="javascript:void(0)" @click="editClick" > | <a class="edit-icon" v-if="IsPermit" id ="editBtn" href="javascript:void(0)" @click="editClick" > | ||||
| <i class="gray edit outline icon" style="margin-right: 0;"></i> | <i class="gray edit outline icon" style="margin-right: 0;"></i> | ||||
| </a> | </a> | ||||
| </h4> | </h4> | ||||
| <edit-dialog-cmpt | <edit-dialog-cmpt | ||||
| :vmContext="vmContext" | :vmContext="vmContext" | ||||
| dialogTitle="编辑仓库信息" | |||||
| :dialogTitle="$t('message.edit_repository_information')" | |||||
| v-model="editDataDialog" | v-model="editDataDialog" | ||||
| :deleteCallback="editDataFunc" | :deleteCallback="editDataFunc" | ||||
| :deleteLoading ="editDataListLoading" | :deleteLoading ="editDataListLoading" | ||||
| @@ -19,11 +19,11 @@ | |||||
| </div> | </div> | ||||
| <div slot="content"> | <div slot="content"> | ||||
| <el-form label-position="top" :model="info" :rules="rule" ref="ruleForm"> | <el-form label-position="top" :model="info" :rules="rule" ref="ruleForm"> | ||||
| <el-form-item label="简介" prop="desc"> | |||||
| <el-input v-model="info.desc" type="textarea" placeholder="请输入内容" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input> | |||||
| <el-form-item :label="$t('message.introduction')" prop="desc"> | |||||
| <el-input v-model="info.desc" type="textarea" :placeholder="$t('message.please_enter_content')" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input> | |||||
| </el-form-item> | </el-form-item> | ||||
| <el-form-item label="主页" prop="index_web" > | |||||
| <el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input> | |||||
| <el-form-item :label="$t('message.home')" prop="index_web" > | |||||
| <el-input v-model="info.index_web" :placeholder="$t('message.home_placeholder')"></el-input> | |||||
| </el-form-item> | </el-form-item> | ||||
| </el-form> | </el-form> | ||||
| </div> | </div> | ||||
| @@ -3,7 +3,7 @@ | |||||
| <div class="input-search"> | <div class="input-search"> | ||||
| <el-input v-model="input" clearable :autofocus="true" @input="changeValue" id="topics_input" @keyup.enter.native="postTopic" placeholder="搜索或创建标签"> | |||||
| <el-input v-model="input" clearable :autofocus="true" @input="changeValue" id="topics_input" @keyup.enter.native="postTopic" :placeholder="$t('message.search_or_create_tags')"> | |||||
| </el-input> | </el-input> | ||||
| <div class="scrolling-menu"> | <div class="scrolling-menu"> | ||||
| @@ -14,7 +14,7 @@ | |||||
| <div class="text">{{arr.topic_name.toLowerCase()}} </div> | <div class="text">{{arr.topic_name.toLowerCase()}} </div> | ||||
| </div> | </div> | ||||
| <div v-if="showInputValue" class="addition item-text" @click="postTopic"> | <div v-if="showInputValue" class="addition item-text" @click="postTopic"> | ||||
| 点击或回车添加<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签 | |||||
| {{$t('message.click_or_enter_to_add')}}<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签 | |||||
| </div> | </div> | ||||
| <div v-if="showAddTopic" class="item-text" @click="addPostTopic"> | <div v-if="showAddTopic" class="item-text" @click="addPostTopic"> | ||||
| <div class="icon-wrapper"> | <div class="icon-wrapper"> | ||||
| @@ -31,7 +31,9 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | ||||
| import $ from 'jquery' | import $ from 'jquery' | ||||
| @@ -98,7 +100,7 @@ export default { | |||||
| this.Post(data,topics) | this.Post(data,topics) | ||||
| this.$set(this.showInitTopic,item,false) | this.$set(this.showInitTopic,item,false) | ||||
| if(this.arrayTopics.length===0){ | if(this.arrayTopics.length===0){ | ||||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||||
| }else{ | }else{ | ||||
| $('#repo-topics1').children('span').remove() | $('#repo-topics1').children('span').remove() | ||||
| } | } | ||||
| @@ -264,7 +266,7 @@ export default { | |||||
| if(this.arrayTopics.length===0){ | if(this.arrayTopics.length===0){ | ||||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||||
| }else{ | }else{ | ||||
| $('#repo-topics1').children('span').remove() | $('#repo-topics1').children('span').remove() | ||||
| } | } | ||||
| @@ -342,6 +344,17 @@ export default { | |||||
| window.event.cancelBubble = true;//兼容IE | window.event.cancelBubble = true;//兼容IE | ||||
| } | } | ||||
| } | } | ||||
| }, | |||||
| getLang(){ | |||||
| this.text_langName = document.getElementById("menutext_1").innerText | |||||
| if (this.text_langName == '简体中文'){ | |||||
| this.$i18n.locale = 'zh' | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (this.text_langName == 'English'){ | |||||
| this.$i18n.locale = 'en' | |||||
| locale.use(enLocale) | |||||
| } | |||||
| } | } | ||||
| }, | }, | ||||
| computed:{ | computed:{ | ||||
| @@ -386,14 +399,17 @@ mounted() { | |||||
| }); | }); | ||||
| if(this.arrayTopics.length===0){ | if(this.arrayTopics.length===0){ | ||||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||||
| } | } | ||||
| this.changeValue() | |||||
| this.changeValue(); | |||||
| this.getLang() | |||||
| } , | } , | ||||
| created(){ | created(){ | ||||
| this.initTopics(); | this.initTopics(); | ||||
| this.input='' | |||||
| this.input=''; | |||||
| this.text_langName='' ; | |||||
| this.getLang() | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -0,0 +1,517 @@ | |||||
| <template> | |||||
| <div> | |||||
| <div class="header-wrapper"> | |||||
| <div class="ui container"> | |||||
| <el-row class="image_text"> | |||||
| <h1>{{$t('message.cloud_brain_mirror')}}</h1> | |||||
| </el-row> | |||||
| </div> | |||||
| </div> | |||||
| <div class="ui container" id="header"> | |||||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||||
| <el-tab-pane :label="$t('message.cloud_brain_mirror')"name="first" v-loading="loading"> | |||||
| <div class="ui sixteen wide column"> | |||||
| <div class="ui two column stackable grid"> | |||||
| <div class="column"> | |||||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}</el-button> | |||||
| </el-input> | |||||
| </div> | |||||
| <!-- <div class="column right aligned"> | |||||
| <el-dropdown> | |||||
| <span class="el-dropdown-link"> | |||||
| 排序<i class="el-icon-caret-bottom"></i> | |||||
| </span> | |||||
| <el-dropdown-menu slot="dropdown"> | |||||
| <el-dropdown-item>最早创建</el-dropdown-item> | |||||
| <el-dropdown-item>最新创建</el-dropdown-item> | |||||
| <el-dropdown-item divided>按镜像字母顺序排序</el-dropdown-item> | |||||
| <el-dropdown-item>按镜像字母逆序排序</el-dropdown-item> | |||||
| </el-dropdown-menu> | |||||
| </el-dropdown> | |||||
| </div> --> | |||||
| </div> | |||||
| </div> | |||||
| <el-row style="margin-top:15px;"> | |||||
| <el-table | |||||
| :data="tableData" | |||||
| style="width: 100%" | |||||
| :header-cell-style="tableHeaderStyle" | |||||
| :default-sort="{prop:'createtime',order:'descending'}"> | |||||
| <el-table-column | |||||
| :label="$t('message.mirror_name')" | |||||
| width="350" | |||||
| align="left" | |||||
| prop="name" | |||||
| sortable | |||||
| > | |||||
| <template slot-scope="scope"> | |||||
| <a class="text-over" style="cursor:default;color:#426290" :title="scope.row.name">{{ scope.row.name }}</a> | |||||
| </template> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| :label="$t('message.file_path_image_description')" | |||||
| width="450" | |||||
| align="left" | |||||
| > | |||||
| <template slot-scope="scope"> | |||||
| <el-tooltip class="item" effect="dark" :content="$t('message.click_Copy_file_path')" placement="top"> | |||||
| <a class="text-over" style="display:block;" @click="copyUrl(scope.row.place)">{{ scope.row.place }}</a> | |||||
| </el-tooltip> | |||||
| <span class="text-over" :title="scope.row.description | clearP">{{ scope.row.description | clearP}}</span> | |||||
| </template> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| prop="provider" | |||||
| :label="$t('message.provider')" | |||||
| width="120" | |||||
| align="left" | |||||
| sortable> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| prop="createtime" | |||||
| :label="$t('message.creation_time')" | |||||
| align="center" | |||||
| sortable> | |||||
| <template slot-scope="scope"> | |||||
| {{scope.row.createtime | transformTimestamp}} | |||||
| </template> | |||||
| </el-table-column> | |||||
| </el-table> | |||||
| </el-row> | |||||
| <div class="ui container" style="margin-top:50px;text-align:center"> | |||||
| <el-pagination | |||||
| background | |||||
| @size-change="handleSizeChange" | |||||
| @current-change="handleCurrentChange" | |||||
| :current-page="currentPage" | |||||
| :page-size="pageSize" | |||||
| :page-sizes="[5,10,20]" | |||||
| layout="total, sizes, prev, pager, next, jumper" | |||||
| :total="totalNum"> | |||||
| </el-pagination> | |||||
| </div> | |||||
| </el-tab-pane> | |||||
| <el-tab-pane :label="$t('message.custom_mirror_1')" name="second" v-loading="loading1"> | |||||
| <div class="ui sixteen wide column"> | |||||
| <div class="ui two column stackable grid"> | |||||
| <div class="column"> | |||||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button slot="append" id="success" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}</el-button> | |||||
| </el-input> | |||||
| </div> | |||||
| <!-- <div class="column right aligned"> | |||||
| <el-dropdown> | |||||
| <span class="el-dropdown-link"> | |||||
| 排序<i class="el-icon-caret-bottom"></i> | |||||
| </span> | |||||
| <el-dropdown-menu slot="dropdown"> | |||||
| <el-dropdown-item>最早创建</el-dropdown-item> | |||||
| <el-dropdown-item>最新创建</el-dropdown-item> | |||||
| <el-dropdown-item divided>按镜像字母顺序排序</el-dropdown-item> | |||||
| <el-dropdown-item>按镜像字母逆序排序</el-dropdown-item> | |||||
| </el-dropdown-menu> | |||||
| </el-dropdown> | |||||
| </div> --> | |||||
| </div> | |||||
| </div> | |||||
| <el-row style="margin-top:15px;"> | |||||
| <el-table | |||||
| :data="tableData1" | |||||
| style="width: 100%" | |||||
| :header-cell-style="tableHeaderStyle" | |||||
| :default-sort="{prop:'createtime',order:'descending'}"> | |||||
| <el-table-column | |||||
| :label="$t('message.mirror_name')" | |||||
| width="350" | |||||
| align="left" | |||||
| prop="name" | |||||
| sortable | |||||
| > | |||||
| <template slot-scope="scope"> | |||||
| <a class="text-over" :title="scope.row.name" style="cursor:default;color:#426290">{{ scope.row.name }}</a> | |||||
| </template> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| :label="$t('message.file_path_mirror_description')" | |||||
| width="450" | |||||
| align="left" | |||||
| > | |||||
| <template slot-scope="scope"> | |||||
| <el-tooltip class="item" effect="dark" :content="$t('message.click_Copy_file_path')" placement="top"> | |||||
| <a class="text-over" style="display:block;" @click="copyUrl(scope.row.place)">{{ scope.row.place }}</a> | |||||
| </el-tooltip> | |||||
| <span class="text-over" :title="scope.row.description | clearP">{{ scope.row.description | clearP }}</span> | |||||
| </template> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| prop="provider" | |||||
| :label="$t('message.provider')" | |||||
| width="120" | |||||
| align="left" | |||||
| sortable> | |||||
| </el-table-column> | |||||
| <el-table-column | |||||
| prop="createtime" | |||||
| :label="$t('message.creation_time')" | |||||
| align="center" | |||||
| sortable> | |||||
| <template slot-scope="scope"> | |||||
| {{scope.row.createtime | transformTimestamp}} | |||||
| </template> | |||||
| </el-table-column> | |||||
| </el-table> | |||||
| </el-row> | |||||
| <div class="ui container" style="margin-top:50px;text-align:center"> | |||||
| <el-pagination | |||||
| background | |||||
| @size-change="handleSizeChange1" | |||||
| @current-change="handleCurrentChange1" | |||||
| :current-page="currentPage1" | |||||
| :page-size="pageSize1" | |||||
| :page-sizes="[5,10,20]" | |||||
| layout="total, sizes, prev, pager, next, jumper" | |||||
| :total="totalNum1"> | |||||
| </el-pagination> | |||||
| </div> | |||||
| </el-tab-pane> | |||||
| <el-tab-pane :label="$t('message.public_mirror_2')" name="third"> | |||||
| <div class="ui sixteen wide column"> | |||||
| <div class="ui two column stackable grid"> | |||||
| <div class="column"> | |||||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select"> | |||||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}</el-button> | |||||
| </el-input> | |||||
| </div> | |||||
| <!-- <div class="column right aligned"> | |||||
| <el-dropdown> | |||||
| <span class="el-dropdown-link"> | |||||
| 排序<i class="el-icon-caret-bottom"></i> | |||||
| </span> | |||||
| <el-dropdown-menu slot="dropdown"> | |||||
| <el-dropdown-item>最早创建</el-dropdown-item> | |||||
| <el-dropdown-item>最新创建</el-dropdown-item> | |||||
| <el-dropdown-item divided>按镜像字母顺序排序</el-dropdown-item> | |||||
| <el-dropdown-item>按镜像字母逆序排序</el-dropdown-item> | |||||
| </el-dropdown-menu> | |||||
| </el-dropdown> | |||||
| </div> --> | |||||
| </div> | |||||
| </div> | |||||
| <el-empty :image-size="200"></el-empty> | |||||
| </el-tab-pane> | |||||
| <el-tab-pane :label="$t('message.custom_mirror_2')" name="fourth"> | |||||
| <div class="ui sixteen wide column"> | |||||
| <div class="ui two column stackable grid"> | |||||
| <div class="column"> | |||||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select"> | |||||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}</el-button> | |||||
| </el-input> | |||||
| </div> | |||||
| <!-- <div class="column right aligned"> | |||||
| <el-dropdown> | |||||
| <span class="el-dropdown-link"> | |||||
| 排序<i class="el-icon-caret-bottom"></i> | |||||
| </span> | |||||
| <el-dropdown-menu slot="dropdown"> | |||||
| <el-dropdown-item>最早创建</el-dropdown-item> | |||||
| <el-dropdown-item>最新创建</el-dropdown-item> | |||||
| <el-dropdown-item divided>按镜像字母顺序排序</el-dropdown-item> | |||||
| <el-dropdown-item>按镜像字母逆序排序</el-dropdown-item> | |||||
| </el-dropdown-menu> | |||||
| </el-dropdown> | |||||
| </div> --> | |||||
| </div> | |||||
| </div> | |||||
| <el-empty :image-size="200"></el-empty> | |||||
| </el-tab-pane> | |||||
| </el-tabs> | |||||
| </div> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | |||||
| export default { | |||||
| components: { | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| activeName: 'first', | |||||
| search:'', | |||||
| currentPage:1, | |||||
| pageSize:10, | |||||
| totalNum:0, | |||||
| params:{page:1,size:10,name:''}, | |||||
| tableData: [], | |||||
| loading:false, | |||||
| currentPage1:1, | |||||
| pageSize1:10, | |||||
| totalNum1:0, | |||||
| params1:{page:1,size:10,name:''}, | |||||
| tableData1: [], | |||||
| loading1:false, | |||||
| text_langName:'', | |||||
| }; | |||||
| }, | |||||
| methods: { | |||||
| handleClick(tab, event) { | |||||
| if(tab.name=="first"){ | |||||
| this.getImageList() | |||||
| } | |||||
| if(tab.name=="second"){ | |||||
| this.getImageList1() | |||||
| } | |||||
| }, | |||||
| tableHeaderStyle({row,column,rowIndex,columnIndex}){ | |||||
| if(rowIndex===0){ | |||||
| return 'background:#f5f5f6;color:#606266' | |||||
| } | |||||
| }, | |||||
| handleSizeChange(val){ | |||||
| this.params.size = val | |||||
| this.getImageList() | |||||
| }, | |||||
| handleCurrentChange(val){ | |||||
| this.params.page = val | |||||
| this.getImageList() | |||||
| }, | |||||
| handleSizeChange1(val){ | |||||
| this.params1.size = val | |||||
| this.getImageList1() | |||||
| }, | |||||
| handleCurrentChange1(val){ | |||||
| this.params1.page = val | |||||
| this.getImageList1() | |||||
| }, | |||||
| getImageList(){ | |||||
| this.loading = true | |||||
| this.$axios.get('/explore/images/public',{ | |||||
| params:this.params | |||||
| }).then((res)=>{ | |||||
| this.totalNum = res.data.count | |||||
| this.tableData = res.data.rows | |||||
| this.loading = false | |||||
| }) | |||||
| }, | |||||
| getImageList1(){ | |||||
| this.loading1 = true | |||||
| this.$axios.get('/explore/images/custom',{ | |||||
| params:this.params1 | |||||
| }).then((res)=>{ | |||||
| this.totalNum1 = res.data.count | |||||
| this.tableData1 = res.data.rows | |||||
| this.loading1 = false | |||||
| }) | |||||
| }, | |||||
| copyUrl(url){ | |||||
| const cInput = document.createElement('input') | |||||
| cInput.value = url | |||||
| document.body.appendChild(cInput) | |||||
| cInput.select() | |||||
| document.execCommand('Copy') | |||||
| cInput.remove() | |||||
| }, | |||||
| searchName(){ | |||||
| if(this.activeName=='first'){ | |||||
| this.params.name = this.search | |||||
| this.params.page = 1 | |||||
| this.getImageList() | |||||
| } | |||||
| if(this.activeName=='second'){ | |||||
| this.params1.name = this.search | |||||
| this.params1.page = 1 | |||||
| this.getImageList1() | |||||
| } | |||||
| }, | |||||
| getLang(){ | |||||
| this.text_langName = document.getElementById("menutext_1").innerText | |||||
| if (this.text_langName == '简体中文'){ | |||||
| this.$i18n.locale = 'zh' | |||||
| // locale.use(zhLocale) | |||||
| } | |||||
| else if (this.text_langName == 'English'){ | |||||
| this.$i18n.locale = 'en' | |||||
| // locale.use(enLocale) | |||||
| } | |||||
| } | |||||
| }, | |||||
| filters:{ | |||||
| clearP(value){ | |||||
| if(!value) return '' | |||||
| const reg = /\<\/?p\>/g; | |||||
| value = value.replace(reg,'') | |||||
| return value | |||||
| }, | |||||
| transformTimestamp(timestamp){ | |||||
| let a = new Date(timestamp).getTime(); | |||||
| const date = new Date(a); | |||||
| const Y = date.getFullYear() + '-'; | |||||
| const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; | |||||
| const D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' '; | |||||
| const h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':'; | |||||
| const m = (date.getMinutes() <10 ? '0'+date.getMinutes() : date.getMinutes()) + ':' ; | |||||
| const s = (date.getSeconds() <10 ? '0'+date.getSeconds() : date.getSeconds()) ; // 秒 | |||||
| const dateString = Y + M + D + h + m + s; | |||||
| // console.log('dateString', dateString); // > dateString 2021-07-06 14:23 | |||||
| return dateString; | |||||
| }, | |||||
| }, | |||||
| watch:{ | |||||
| search(val){ | |||||
| if(!val && this.activeName=='first'){ | |||||
| this.params.name = val | |||||
| this.getImageList() | |||||
| } | |||||
| if(!val && this.activeName=='second'){ | |||||
| this.params1.name = val | |||||
| this.getImageList1() | |||||
| } | |||||
| } | |||||
| }, | |||||
| mounted() { | |||||
| this.getImageList(), | |||||
| this.getLang() | |||||
| }, | |||||
| created() { | |||||
| this.text_langName='', | |||||
| this.getLang() | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style scoped> | |||||
| .header-wrapper { | |||||
| background-color: #f5f5f6; | |||||
| padding-top: 15px; | |||||
| } | |||||
| .image_text{ | |||||
| padding:25px 0 55px 0 ; | |||||
| } | |||||
| #header{ | |||||
| position: relative; | |||||
| top:-40px; | |||||
| } | |||||
| .el-dropdown-menu__item--divided{ | |||||
| border-top: 1px solid blue; | |||||
| } | |||||
| .el-table thead{ | |||||
| background-color: #f5f5f6; | |||||
| } | |||||
| /deep/ .el-tabs__item:hover{ | |||||
| color: #000; | |||||
| font-weight: 500; | |||||
| } | |||||
| /deep/ .el-tabs__item.is-active { | |||||
| color: #000; | |||||
| font-weight: 500; | |||||
| } | |||||
| /deep/ .el-tabs__active-bar{ | |||||
| background-color:#000 | |||||
| } | |||||
| /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { | |||||
| background-color: #5bb973; | |||||
| color: #FFF; | |||||
| } | |||||
| /deep/ .el-pagination.is-background .el-pager li.active { | |||||
| color: #fff; | |||||
| cursor: default; | |||||
| } | |||||
| /deep/ .el-pagination.is-background .el-pager li:hover { | |||||
| color: #5bb973; | |||||
| } | |||||
| /deep/ .el-pagination.is-background .el-pager li:not(.disabled):hover { | |||||
| color: #5bb973; | |||||
| } | |||||
| /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active:hover { | |||||
| background-color: #5bb973; | |||||
| color: #FFF; | |||||
| } | |||||
| /deep/ .el-pager li.active { | |||||
| color: #08C0B9; | |||||
| cursor: default; | |||||
| } | |||||
| /deep/ .el-pagination .el-pager li:hover { | |||||
| color: #08C0B9; | |||||
| } | |||||
| /deep/ .el-pagination .el-pager li:not(.disabled):hover { | |||||
| color: #08C0B9; | |||||
| } | |||||
| /* /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{ | |||||
| background-color: #5bb973; | |||||
| color: #000; | |||||
| } */ | |||||
| /* /deep/ .el-pager li:hover{ | |||||
| color: #000; | |||||
| } */ | |||||
| #success{ | |||||
| background-color: #5bb973; | |||||
| color: white; | |||||
| } | |||||
| .text-over{ | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| vertical-align: middle; | |||||
| white-space: nowrap; | |||||
| } | |||||
| </style> | |||||
| @@ -26,6 +26,13 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| /* eslint-disable eqeqeq */ | |||||
| // import Dropzone from 'dropzone/dist/dropzone.js'; | |||||
| // import 'dropzone/dist/dropzone.css' | |||||
| import SparkMD5 from 'spark-md5'; | import SparkMD5 from 'spark-md5'; | ||||
| import axios from 'axios'; | import axios from 'axios'; | ||||
| import qs from 'qs'; | import qs from 'qs'; | ||||
| @@ -530,7 +537,7 @@ export default { | |||||
| } | } | ||||
| const urls = []; // TODO const ? | const urls = []; // TODO const ? | ||||
| const etags = []; | const etags = []; | ||||
| console.log('上传分片...'); | |||||
| // console.log('上传分片...'); | |||||
| this.status = this.dropzoneParams.data('uploading'); | this.status = this.dropzoneParams.data('uploading'); | ||||
| loadNext(); | loadNext(); | ||||
| fileReader.onload = async (e) => { | fileReader.onload = async (e) => { | ||||
| @@ -543,10 +550,10 @@ export default { | |||||
| fileReader.abort(); | fileReader.abort(); | ||||
| currentChunk++; | currentChunk++; | ||||
| if (currentChunk < chunks) { | if (currentChunk < chunks) { | ||||
| console.log( | |||||
| `第${currentChunk}个分片上传完成, 开始第${currentChunk + | |||||
| 1}/${chunks}个分片上传` | |||||
| ); | |||||
| // console.log( | |||||
| // `第${currentChunk}个分片上传完成, 开始第${currentChunk + | |||||
| // 1}/${chunks}个分片上传` | |||||
| // ); | |||||
| this.progress = Math.ceil((currentChunk / chunks) * 100); | this.progress = Math.ceil((currentChunk / chunks) * 100); | ||||
| this.updateProgress(file, ((currentChunk / chunks) * 100).toFixed(2)); | this.updateProgress(file, ((currentChunk / chunks) * 100).toFixed(2)); | ||||
| this.status = `${this.dropzoneParams.data('uploading')} ${( | this.status = `${this.dropzoneParams.data('uploading')} ${( | ||||
| @@ -14,7 +14,7 @@ | |||||
| > | > | ||||
| <el-table-column | <el-table-column | ||||
| prop="Name" | prop="Name" | ||||
| label="模型名称" | |||||
| :label="$t('model.model_name')" | |||||
| align="left" | align="left" | ||||
| min-width="18%" | min-width="18%" | ||||
| > | > | ||||
| @@ -28,7 +28,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="Version" | prop="Version" | ||||
| label="版本" | |||||
| :label="$t('model.version')" | |||||
| align="center" | align="center" | ||||
| min-width="6.5%" | min-width="6.5%" | ||||
| > | > | ||||
| @@ -39,7 +39,7 @@ | |||||
| <el-table-column | <el-table-column | ||||
| prop="VersionCount" | prop="VersionCount" | ||||
| label="版本数" | |||||
| :label="$('model.version_number')" | |||||
| align="center" | align="center" | ||||
| min-width="7.5%" | min-width="7.5%" | ||||
| > | > | ||||
| @@ -50,7 +50,7 @@ | |||||
| <el-table-column | <el-table-column | ||||
| prop="Size" | prop="Size" | ||||
| label="模型大小" | |||||
| :label="$t('model.model_size')" | |||||
| align="center" | align="center" | ||||
| min-width="10.5%" | min-width="10.5%" | ||||
| > | > | ||||
| @@ -60,7 +60,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="EngineName" | prop="EngineName" | ||||
| label="AI引擎" | |||||
| :label="$t('model.AI_engine')" | |||||
| align="center" | align="center" | ||||
| min-width="8.5%" | min-width="8.5%" | ||||
| > | > | ||||
| @@ -70,7 +70,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="ComputeResource" | prop="ComputeResource" | ||||
| label="计算资源" | |||||
| :label="$t('model.computing_resources')" | |||||
| align="center" | align="center" | ||||
| min-width="10.5%" | min-width="10.5%" | ||||
| > | > | ||||
| @@ -80,7 +80,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="CreatedUnix" | prop="CreatedUnix" | ||||
| label="创建时间" | |||||
| :label="$t('model.creation_time')" | |||||
| align="center" | align="center" | ||||
| min-width="13.75%" | min-width="13.75%" | ||||
| > | > | ||||
| @@ -90,7 +90,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="UserName" | prop="UserName" | ||||
| label="创建者" | |||||
| :label="$t('model.creator')" | |||||
| align="center" | align="center" | ||||
| min-width="6.75%" | min-width="6.75%" | ||||
| > | > | ||||
| @@ -101,12 +101,12 @@ | |||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column label="操作" min-width="18%" align="center"> | |||||
| <el-table-column :label="$t('model.operate')" min-width="18%" align="center"> | |||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| <div class="space-around"> | <div class="space-around"> | ||||
| <a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">创建新版本</a> | |||||
| <a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">下载</a> | |||||
| <a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName)">删除</a> | |||||
| <a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">{{$t('model.create_version')}}</a> | |||||
| <a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">{{$t('modle.download')}}</a> | |||||
| <a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName)">{{$t('model.delete')}}</a> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| @@ -200,7 +200,7 @@ export default { | |||||
| .modal({ | .modal({ | ||||
| centered: false, | centered: false, | ||||
| onShow:function(){ | onShow:function(){ | ||||
| $('#model_header').text("创建模型新版本") | |||||
| $('#model_header').text(this.$t('model.create_version_model')) | |||||
| $('input[name="Name"]').addClass('model_disabled') | $('input[name="Name"]').addClass('model_disabled') | ||||
| $('input[name="Name"]').attr('readonly','readonly') | $('input[name="Name"]').attr('readonly','readonly') | ||||
| $('input[name="Version"]').addClass('model_disabled') | $('input[name="Version"]').addClass('model_disabled') | ||||
| @@ -339,9 +339,9 @@ export default { | |||||
| }, | }, | ||||
| onHidden: function() { | onHidden: function() { | ||||
| if (flag == false) { | if (flag == false) { | ||||
| $('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| $('.alert').html(this.$t('modle.canceled_operation')).removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| }else{ | }else{ | ||||
| $('.alert').html('删除成功').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||||
| $('.alert').html(this.$t('modle.successfully_deleted')).removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -0,0 +1,74 @@ | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| const en = { | |||||
| message: { | |||||
| code: 'code', | |||||
| contributor:'Contributor', | |||||
| introduction: 'Introduction', | |||||
| edit_repository_information: 'Edit repository information', | |||||
| please_enter_content: 'Please enter content', | |||||
| home: 'Home', | |||||
| home_placeholder:'home(eg: https://git.openi.org.cn)', | |||||
| search_or_create_tags: 'Search or create tags', | |||||
| click_or_enter_to_add: 'Click or enter to add', | |||||
| label: 'Label', | |||||
| No_label_yet: 'No label', | |||||
| cloud_brain_mirror: 'Cloud Brain Mirror', | |||||
| public_mirror_1: 'Public mirror (Cloud Brain 1)', | |||||
| enter_mirror_name_keyword: 'Please enter the image name keyword', | |||||
| search: 'Search', | |||||
| mirror_name: 'Mirror Name', | |||||
| file_path_mirror_description: 'File Path / Mirror Description', | |||||
| click_Copy_file_path: 'Click Copy File Path', | |||||
| provider: 'Provider', | |||||
| creation_time: 'Creation Time', | |||||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 1)', | |||||
| public_mirror_2: 'Public Mirror (Cloud Brain 2)', | |||||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 2)' | |||||
| }, | |||||
| model:{ | |||||
| model_name:'Model Name', | |||||
| version:'Version', | |||||
| version_number:'Version Number', | |||||
| model_size:'Model Size', | |||||
| AI_engine:'AI Engine', | |||||
| computing_resources:'Computing Resources', | |||||
| creation_time:'Creation Time', | |||||
| creator:'Creator', | |||||
| operate:'Operate', | |||||
| create_version:'Create a new version', | |||||
| download:'Download', | |||||
| delete:'Delete', | |||||
| create_version_model:'Create a new version of the model', | |||||
| canceled_operation:'You have canceled the operation', | |||||
| successfully_deleted:'Successfully deleted' | |||||
| }, | |||||
| cloudeBrainMirror:{ | |||||
| cloud_brain_mirror: 'Cloud Brain Mirror', | |||||
| public_mirror: 'Public Mirror', | |||||
| platform_recommendations:'Show platform recommendations only', | |||||
| placeholder: 'Search Mirror tag / description / tag ... ', | |||||
| search:'Search', | |||||
| mirror_tag:'Mirror Tag', | |||||
| mirror_description:'mirror_description ', | |||||
| available_clusters: 'Available clusters', | |||||
| creator: 'Creator', | |||||
| creation_time: 'Creation time', | |||||
| operation: 'Operation', | |||||
| copy_address: 'Copy address', | |||||
| my_mirror: 'My Mirror', | |||||
| state: 'State', | |||||
| private: 'Private', | |||||
| public: 'Public', | |||||
| mirror_committed: 'Mirror Committed...', | |||||
| check_exceeds_20g:'Check whether the size of the submitted image exceeds 20g!', | |||||
| mirror_submitted:'Image submitted successfully', | |||||
| edit: 'Edit', | |||||
| delete: 'Delete', | |||||
| my_favorite_mirror: 'My Favorite Mirror', | |||||
| more:'More', | |||||
| } | |||||
| } | |||||
| export default en; | |||||
| @@ -0,0 +1,82 @@ | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| const zh = { | |||||
| message: { | |||||
| code: '代码', | |||||
| contributor: '贡献者', | |||||
| introduction: '简介', | |||||
| edit_repository_information: '编辑仓库信息', | |||||
| please_enter_content: '请输入内容', | |||||
| home: '主页', | |||||
| home_placeholder:'主页(eg: https://git.openi.org.cn)', | |||||
| search_or_create_tags:'搜索或创建标签', | |||||
| click_or_enter_to_add: '点击或回车添加', | |||||
| label: '标签', | |||||
| No_label_yet: '暂无标签', | |||||
| cloud_brain_mirror: '云脑镜像', | |||||
| public_mirror_1: '公共镜像(云脑1)', | |||||
| enter_mirror_name_keyword: '请输入镜像名称关健词', | |||||
| search: '搜索', | |||||
| mirror_name: '镜像名称', | |||||
| file_path_mirror_description: '文件路径/镜像描述', | |||||
| click_Copy_file_path: '点击复制文件路径', | |||||
| provider: '提供者', | |||||
| creation_time: '创建时间', | |||||
| custom_mirror_1: '自定义镜像(云脑1)', | |||||
| public_mirror_2: '公共镜像(云脑2)', | |||||
| custom_mirror_2: '自定义镜像(云脑2)' | |||||
| }, | |||||
| model:{ | |||||
| model_name:'模型名称', | |||||
| version:'版本', | |||||
| version_number:'版本数', | |||||
| model_size:'模型大小', | |||||
| AI_engine:'AI引擎', | |||||
| computing_resources:'计算资源', | |||||
| creation_time:'创建时间', | |||||
| creator:'创建者', | |||||
| operate:'操作', | |||||
| create_version:'创建新版本', | |||||
| download:'下载', | |||||
| delete:'删除', | |||||
| create_version_model:'创建模型新版本', | |||||
| canceled_operation:'您已取消操作', | |||||
| successfully_deleted:'删除成功' | |||||
| }, | |||||
| cloudeBrainMirror:{ | |||||
| cloud_brain_mirror: '云脑镜像', | |||||
| public_mirror: '公开镜像', | |||||
| platform_recommendations:'仅显示平台推荐', | |||||
| placeholder: '搜镜像Tag/描述/标签...', | |||||
| search:'搜索', | |||||
| mirror_tag:'镜像Tag', | |||||
| mirror_description:'镜像描述', | |||||
| available_clusters: '可用集群', | |||||
| creator: '创建者', | |||||
| creation_time: '创建时间', | |||||
| operation: '操作', | |||||
| copy_address: '复制地址', | |||||
| my_mirror: '我的镜像', | |||||
| state: '状态', | |||||
| private: '私有', | |||||
| public: '公开', | |||||
| mirror_committed: '镜像提交中...', | |||||
| check_exceeds_20g:'检测提交镜像是否大小超过20G!', | |||||
| mirror_submitted:'镜像提交成功', | |||||
| edit: '编辑', | |||||
| delete: '删除', | |||||
| my_favorite_mirror: '我收藏的镜像', | |||||
| more:'更多', | |||||
| } | |||||
| } | |||||
| export default zh | |||||
| @@ -3,25 +3,25 @@ | |||||
| <div class="header-wrapper"> | <div class="header-wrapper"> | ||||
| <div class="ui container"> | <div class="ui container"> | ||||
| <el-row class="image_text"> | <el-row class="image_text"> | ||||
| <h1>云脑镜像</h1> | |||||
| <h1>{{$t('cloudeBrainMirror.cloud_brain_mirror')}}</h1> | |||||
| </el-row> | </el-row> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="ui container" id="header"> | <div class="ui container" id="header"> | ||||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | <el-tabs v-model="activeName" @tab-click="handleClick"> | ||||
| <el-tab-pane label="公开镜像" name="first" v-loading="loadingPublic"> | |||||
| <el-tab-pane :label="$t('cloudeBrainMirror.cloud_brain_mirror')" name="first" v-loading="loadingPublic"> | |||||
| <template v-if="tableDataPublic.length!==0"> | <template v-if="tableDataPublic.length!==0"> | ||||
| <el-row style="align-items: center;display: flex;"> | <el-row style="align-items: center;display: flex;"> | ||||
| <el-col :span="12"> | <el-col :span="12"> | ||||
| <div> | <div> | ||||
| <el-checkbox v-model="checked">仅显示平台推荐</el-checkbox> | |||||
| <el-checkbox v-model="checked">{{$t('cloudeBrainMirror.platform_recommendations')}}</el-checkbox> | |||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -34,7 +34,7 @@ | |||||
| :header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
| > | > | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像Tag" | |||||
| :label="$t('cloudeBrainMirror.mirror_tag')" | |||||
| min-width="19%" | min-width="19%" | ||||
| align="left" | align="left" | ||||
| prop="tag" | prop="tag" | ||||
| @@ -47,7 +47,7 @@ | |||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像描述" | |||||
| :label="$t('cloudeBrainMirror.mirror_description')" | |||||
| min-width="28%" | min-width="28%" | ||||
| align="left" | align="left" | ||||
| prop="description" | prop="description" | ||||
| @@ -62,7 +62,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="cloudbrainType" | prop="cloudbrainType" | ||||
| label="可用集群" | |||||
| :label="$t('cloudeBrainMirror.available_clusters')" | |||||
| min-width="10%" | min-width="10%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| @@ -72,7 +72,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="creator" | prop="creator" | ||||
| label="创建者" | |||||
| :label="$t('cloudeBrainMirror.creator')" | |||||
| min-width="8%" | min-width="8%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| @@ -84,7 +84,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="createdUnix" | prop="createdUnix" | ||||
| label="创建时间" | |||||
| :label="$t('cloudeBrainMirror.creation_time')" | |||||
| align="center" | align="center" | ||||
| min-width="14%" | min-width="14%" | ||||
| > | > | ||||
| @@ -95,7 +95,7 @@ | |||||
| <el-table-column | <el-table-column | ||||
| align="center" | align="center" | ||||
| min-width="21%" | min-width="21%" | ||||
| label="操作" | |||||
| :label="$t('cloudeBrainMirror.operation')" | |||||
| > | > | ||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| <div style="display: flex;justify-content: flex-end;align-items: center;"> | <div style="display: flex;justify-content: flex-end;align-items: center;"> | ||||
| @@ -103,7 +103,7 @@ | |||||
| <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke" :class='{stars_active:scope.row.isStar}'><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke" :class='{stars_active:scope.row.isStar}'><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | ||||
| <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | ||||
| </div> | </div> | ||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">复制地址</span> | |||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">{{$t('cloudeBrainMirror.copy_address')}}</span> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| @@ -126,14 +126,14 @@ | |||||
| <el-row style="align-items: center;display: flex;"> | <el-row style="align-items: center;display: flex;"> | ||||
| <el-col :span="12"> | <el-col :span="12"> | ||||
| <div> | <div> | ||||
| <el-checkbox v-model="checked">仅显示平台推荐</el-checkbox> | |||||
| <el-checkbox v-model="checked">{{$t('cloudeBrainMirror.platform_recommendations')}}</el-checkbox> | |||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -142,7 +142,7 @@ | |||||
| </template> | </template> | ||||
| </el-tab-pane> | </el-tab-pane> | ||||
| <el-tab-pane label="我的镜像" name="second" v-loading="loadingCustom"> | |||||
| <el-tab-pane :label="$t('cloudeBrainMirror.my_mirror')" name="second" v-loading="loadingCustom"> | |||||
| <template v-if="tableDataCustom.length!==0"> | <template v-if="tableDataCustom.length!==0"> | ||||
| <el-row style="align-items: center;display: flex;"> | <el-row style="align-items: center;display: flex;"> | ||||
| <el-col :span="12"> | <el-col :span="12"> | ||||
| @@ -153,8 +153,8 @@ | |||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -166,7 +166,7 @@ | |||||
| :header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
| > | > | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像Tag" | |||||
| :label="$t('cloudeBrainMirror.mirror_tag')" | |||||
| min-width="19%" | min-width="19%" | ||||
| align="left" | align="left" | ||||
| prop="tag" | prop="tag" | ||||
| @@ -180,7 +180,7 @@ | |||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像描述" | |||||
| :label="$t('cloudeBrainMirror.mirror_description')" | |||||
| min-width="27%" | min-width="27%" | ||||
| align="left" | align="left" | ||||
| prop="description" | prop="description" | ||||
| @@ -195,7 +195,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="cloudbrainType" | prop="cloudbrainType" | ||||
| label="可用集群" | |||||
| :label="$t('cloudeBrainMirror.available_clusters')" | |||||
| min-width="9%" | min-width="9%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| @@ -205,23 +205,23 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="isPrivate" | prop="isPrivate" | ||||
| label="状态" | |||||
| :label="$t('cloudeBrainMirror.state')" | |||||
| min-width="10%" | min-width="10%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| <div style="display:flex;align-items: center;justify-content: center;"> | <div style="display:flex;align-items: center;justify-content: center;"> | ||||
| <span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">私有</span> | |||||
| <span v-else style="color: rgb(19, 194, 141);">公开</span> | |||||
| <el-tooltip class="item" effect="dark" content="镜像提交中..." placement="top"> | |||||
| <span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">{{$t('cloudeBrainMirror.private')}}</span> | |||||
| <span v-else style="color: rgb(19, 194, 141);">{{$t('cloudeBrainMirror.public')}}</span> | |||||
| <el-tooltip class="item" effect="dark" :content= "$t('cloudeBrainMirror.mirror_committed')" placement="top"> | |||||
| <i v-if="scope.row.status===0" class="CREATING" style="margin-left:0.3rem"></i> | <i v-if="scope.row.status===0" class="CREATING" style="margin-left:0.3rem"></i> | ||||
| </el-tooltip> | </el-tooltip> | ||||
| <el-tooltip class="item" effect="dark" content="检测提交镜像是否大小超过20G!" placement="top"> | |||||
| <el-tooltip class="item" effect="dark" :content="$t('cloudeBrainMirror.check_exceeds_20g')" placement="top"> | |||||
| <i v-if="scope.row.status===2" class="FAILED" style="margin-left:0.3rem"></i> | <i v-if="scope.row.status===2" class="FAILED" style="margin-left:0.3rem"></i> | ||||
| </el-tooltip> | </el-tooltip> | ||||
| <el-tooltip class="item" effect="dark" content="镜像提交成功" placement="top"> | |||||
| <el-tooltip class="item" effect="dark" :content="$t('cloudeBrainMirror.mirror_submitted')" placement="top"> | |||||
| <i v-if="scope.row.status===1" class="SUCCEEDED" style="margin-left:0.3rem"></i> | <i v-if="scope.row.status===1" class="SUCCEEDED" style="margin-left:0.3rem"></i> | ||||
| </el-tooltip> | </el-tooltip> | ||||
| @@ -231,7 +231,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="createdUnix" | prop="createdUnix" | ||||
| label="创建时间" | |||||
| :label="$t('cloudeBrainMirror.creation_time')" | |||||
| align="center" | align="center" | ||||
| min-width="14%" | min-width="14%" | ||||
| > | > | ||||
| @@ -242,7 +242,7 @@ | |||||
| <el-table-column | <el-table-column | ||||
| align="center" | align="center" | ||||
| min-width="21%" | min-width="21%" | ||||
| label="操作" | |||||
| :label="$t('cloudeBrainMirror.operation')" | |||||
| > | > | ||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| <div style="display: flex;justify-content: flex-end;align-items: center;"> | <div style="display: flex;justify-content: flex-end;align-items: center;"> | ||||
| @@ -250,15 +250,15 @@ | |||||
| <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke"><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke"><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | ||||
| <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | ||||
| </div> | </div> | ||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">复制地址</span> | |||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">{{$t('cloudeBrainMirror.copy_address')}}</span> | |||||
| <div style="padding-left:1rem;cursor:pointer;"> | <div style="padding-left:1rem;cursor:pointer;"> | ||||
| <el-dropdown size="medium"> | <el-dropdown size="medium"> | ||||
| <span class="el-dropdown-link"> | <span class="el-dropdown-link"> | ||||
| 更多<i class="el-icon-arrow-down el-icon--right"></i> | |||||
| {{$t('cloudeBrainMirror.more')}} <i class="el-icon-arrow-down el-icon--right"></i> | |||||
| </span> | </span> | ||||
| <el-dropdown-menu slot="dropdown"> | <el-dropdown-menu slot="dropdown"> | ||||
| <el-dropdown-item @click.native="eidtImage(scope.row.id)">编辑</el-dropdown-item> | |||||
| <el-dropdown-item style="color: red;" @click.native="deleteImage(scope.row.id)">删除</el-dropdown-item> | |||||
| <el-dropdown-item @click.native="eidtImage(scope.row.id)">{{$t('cloudeBrainMirror.edit')}}</el-dropdown-item> | |||||
| <el-dropdown-item style="color: red;" @click.native="deleteImage(scope.row.id)"> {{$t('cloudeBrainMirror.delete')}} </el-dropdown-item> | |||||
| </el-dropdown-menu> | </el-dropdown-menu> | ||||
| </el-dropdown> | </el-dropdown> | ||||
| </div> | </div> | ||||
| @@ -290,8 +290,8 @@ | |||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -300,7 +300,7 @@ | |||||
| </template> | </template> | ||||
| </el-tab-pane> | </el-tab-pane> | ||||
| <el-tab-pane label="我收藏的镜像" name="third"> | |||||
| <el-tab-pane :label="$t('cloudeBrainMirror.my_favorite_mirror')" name="third"> | |||||
| <template v-if="tableDataStar.length!==0"> | <template v-if="tableDataStar.length!==0"> | ||||
| <el-row style="align-items: center;display: flex;"> | <el-row style="align-items: center;display: flex;"> | ||||
| <el-col :span="12"> | <el-col :span="12"> | ||||
| @@ -311,8 +311,8 @@ | |||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -325,7 +325,7 @@ | |||||
| :header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
| > | > | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像Tag" | |||||
| :label="$t('cloudeBrainMirror.mirror_tag')" | |||||
| min-width="19%" | min-width="19%" | ||||
| align="left" | align="left" | ||||
| prop="tag" | prop="tag" | ||||
| @@ -338,7 +338,7 @@ | |||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| label="镜像描述" | |||||
| :label="$t('cloudeBrainMirror.mirror_description')" | |||||
| min-width="28%" | min-width="28%" | ||||
| align="left" | align="left" | ||||
| prop="description" | prop="description" | ||||
| @@ -353,7 +353,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="cloudbrainType" | prop="cloudbrainType" | ||||
| label="可用集群" | |||||
| :label="$t('cloudeBrainMirror.available_clusters')" | |||||
| min-width="10%" | min-width="10%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| @@ -363,7 +363,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="creator" | prop="creator" | ||||
| label="创建者" | |||||
| :label="$t('cloudeBrainMirror.creator')" | |||||
| min-width="8%" | min-width="8%" | ||||
| align="center" | align="center" | ||||
| > | > | ||||
| @@ -375,7 +375,7 @@ | |||||
| </el-table-column> | </el-table-column> | ||||
| <el-table-column | <el-table-column | ||||
| prop="createdUnix" | prop="createdUnix" | ||||
| label="创建时间" | |||||
| :label="$t('cloudeBrainMirror.creation_time')" | |||||
| align="center" | align="center" | ||||
| min-width="14%" | min-width="14%" | ||||
| > | > | ||||
| @@ -386,7 +386,7 @@ | |||||
| <el-table-column | <el-table-column | ||||
| align="center" | align="center" | ||||
| min-width="21%" | min-width="21%" | ||||
| label="操作" | |||||
| :label="$t('cloudeBrainMirror.operation')" | |||||
| > | > | ||||
| <template slot-scope="scope"> | <template slot-scope="scope"> | ||||
| <div style="display: flex;justify-content: flex-end;align-items: center;"> | <div style="display: flex;justify-content: flex-end;align-items: center;"> | ||||
| @@ -394,7 +394,7 @@ | |||||
| <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke stars_active"><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | <svg width="1.4em" height="1.4em" viewBox="0 0 32 32" class="heart-stroke stars_active"><path d="M4.4 6.54c-1.761 1.643-2.6 3.793-2.36 6.056.24 2.263 1.507 4.521 3.663 6.534a29110.9 29110.9 0 0010.296 9.633l10.297-9.633c2.157-2.013 3.424-4.273 3.664-6.536.24-2.264-.599-4.412-2.36-6.056-1.73-1.613-3.84-2.29-6.097-1.955-1.689.25-3.454 1.078-5.105 2.394l-.4.319-.398-.319c-1.649-1.316-3.414-2.143-5.105-2.394a7.612 7.612 0 00-1.113-.081c-1.838 0-3.541.694-4.983 2.038z"></path></svg> | ||||
| <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | <span style="line-height: 2;margin-left:0.3rem;">{{scope.row.numStars}}</span> | ||||
| </div> | </div> | ||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">复制地址</span> | |||||
| <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" @click="copyUrl(scope.row.place)">{{$t('cloudeBrainMirror.copy_address')}}</span> | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| </el-table-column> | </el-table-column> | ||||
| @@ -424,8 +424,8 @@ | |||||
| <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | <el-col :span="4"><div style="visibility: hidden;">TODO</div></el-col> | ||||
| <el-col :span="8"> | <el-col :span="8"> | ||||
| <div> | <div> | ||||
| <el-input placeholder="搜镜像Tag/描述/标签..." v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">搜索</el-button> | |||||
| <el-input :placeholder="$t('cloudeBrainMirror.placeholder')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('cloudeBrainMirror.search')}}</el-button> | |||||
| </el-input> | </el-input> | ||||
| </div> | </div> | ||||
| </el-col> | </el-col> | ||||
| @@ -587,9 +587,9 @@ export default { | |||||
| }, | }, | ||||
| onHidden: function() { | onHidden: function() { | ||||
| if (flag == false) { | if (flag == false) { | ||||
| $('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| $('.alert').html(this.$t('modle.canceled_operation')).removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||||
| }else{ | }else{ | ||||
| $('.alert').html('删除成功').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||||
| $('.alert').html(this.$t('modle.successfully_deleted')).removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||||
| } | } | ||||
| } | } | ||||
| }) | }) | ||||
| @@ -657,6 +657,17 @@ export default { | |||||
| } | } | ||||
| }, | }, | ||||
| getLang(){ | |||||
| this.text_langName = document.getElementById("menutext_1").innerText | |||||
| if (this.text_langName == '简体中文'){ | |||||
| this.$i18n.locale = 'zh' | |||||
| // locale.use(zhLocale) | |||||
| } | |||||
| else if (this.text_langName == 'English'){ | |||||
| this.$i18n.locale = 'en' | |||||
| // locale.use(enLocale) | |||||
| } | |||||
| }, | |||||
| }, | }, | ||||
| filters:{ | filters:{ | ||||
| transformType(val){ | transformType(val){ | ||||
| @@ -666,9 +677,9 @@ export default { | |||||
| }, | }, | ||||
| transformPravite(val){ | transformPravite(val){ | ||||
| if(val){ | if(val){ | ||||
| return "私有" | |||||
| return this.$t('cloudeBrainMirror.private') | |||||
| }else{ | }else{ | ||||
| return "公开" | |||||
| return this.$t('cloudeBrainMirror.public') | |||||
| } | } | ||||
| }, | }, | ||||
| transformTimestamp(timestamp){ | transformTimestamp(timestamp){ | ||||
| @@ -690,20 +701,24 @@ export default { | |||||
| this.getImageListPublic() | this.getImageListPublic() | ||||
| } | } | ||||
| }, | }, | ||||
| mounted() { | mounted() { | ||||
| this.getLang() | |||||
| }, | }, | ||||
| created() { | created() { | ||||
| const params = new URLSearchParams(location.search) | const params = new URLSearchParams(location.search) | ||||
| if(params.has('type')&¶ms.get('type')=='myimage'){ | |||||
| this.activeName = 'second' | |||||
| this.getImageListCustom() | |||||
| } | |||||
| else{ | |||||
| this.getImageListPublic() | |||||
| } | |||||
| } | |||||
| if(params.has('type')&¶ms.get('type')=='myimage'){ | |||||
| this.activeName = 'second' | |||||
| this.getImageListCustom() | |||||
| } | |||||
| else{ | |||||
| this.getImageListPublic() | |||||
| } | |||||
| this.getLang() | |||||
| }, | |||||
| }; | }; | ||||
| </script> | </script> | ||||
| @@ -2,6 +2,31 @@ import Images from '../components/images/Images.vue'; | |||||
| import adminImages from '../components/images/adminImages.vue'; | import adminImages from '../components/images/adminImages.vue'; | ||||
| import selectImages from '../components/images/selectImages.vue'; | import selectImages from '../components/images/selectImages.vue'; | ||||
| import Vue from 'vue'; | import Vue from 'vue'; | ||||
| // import ElementUI from 'element-ui'; | |||||
| import 'element-ui/lib/theme-chalk/index.css'; | |||||
| import VueI18n from 'vue-i18n'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en'; | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN'; | |||||
| // import locale from 'element-ui/lib/locale'; | |||||
| import Element from 'element-ui' | |||||
| import cn from '../components/i18n/lang/zh.js'; | |||||
| import en from '../components/i18n/lang/en.js'; | |||||
| Vue.use(VueI18n) | |||||
| const messages = { | |||||
| 'en':{...en,...enLocale} , | |||||
| 'zh': {...cn,...zhLocale}, | |||||
| } | |||||
| // Create VueI18n instance with options | |||||
| const i18n = new VueI18n({ | |||||
| locale: 'zh', // set locale | |||||
| messages, // set locale messages | |||||
| }) | |||||
| Vue.use(Element, { | |||||
| i18n: (key, value) => i18n.t(key, value) | |||||
| }) | |||||
| export default async function initImage(){ | export default async function initImage(){ | ||||
| function validate() { | function validate() { | ||||
| $("#form_image") | $("#form_image") | ||||
| @@ -183,7 +208,8 @@ export default async function initImage(){ | |||||
| } | } | ||||
| new Vue({ | new Vue({ | ||||
| el:el, | |||||
| el:el, | |||||
| i18n, | |||||
| render: h => h(Images) | render: h => h(Images) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -194,7 +220,8 @@ export default async function initImage(){ | |||||
| } | } | ||||
| new Vue({ | new Vue({ | ||||
| el:el, | |||||
| el:el, | |||||
| i18n, | |||||
| render: h => h(adminImages) | render: h => h(adminImages) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -205,7 +232,8 @@ export default async function initImage(){ | |||||
| } | } | ||||
| new Vue({ | new Vue({ | ||||
| el:el, | |||||
| el:el, | |||||
| i18n, | |||||
| render: h => h(selectImages) | render: h => h(selectImages) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -7,7 +7,8 @@ import './polyfills.js'; | |||||
| import './features/letteravatar.js' | import './features/letteravatar.js' | ||||
| import Vue from 'vue'; | import Vue from 'vue'; | ||||
| import ElementUI from 'element-ui'; | import ElementUI from 'element-ui'; | ||||
| import 'element-ui/lib/theme-chalk/index.css'; | |||||
| import 'element-ui/lib/theme-chalk/index.css'; | |||||
| import VueI18n from 'vue-i18n' | |||||
| import axios from 'axios'; | import axios from 'axios'; | ||||
| import qs from 'qs'; | import qs from 'qs'; | ||||
| import Cookies from 'js-cookie' | import Cookies from 'js-cookie' | ||||
| @@ -45,12 +46,52 @@ import initCloudrain from './features/cloudrbanin.js' | |||||
| import initImage from './features/images.js' | import initImage from './features/images.js' | ||||
| // import $ from 'jquery.js' | // import $ from 'jquery.js' | ||||
| //import VueI18n from 'vue-i18n' | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| import Element from 'element-ui' | |||||
| import cn from './components/i18n/lang/zh.js' | |||||
| import en from './components/i18n/lang/en.js' | |||||
| Vue.use(ElementUI); | Vue.use(ElementUI); | ||||
| Vue.prototype.$axios = axios; | Vue.prototype.$axios = axios; | ||||
| Vue.prototype.$Cookies = Cookies; | Vue.prototype.$Cookies = Cookies; | ||||
| Vue.prototype.qs = qs; | Vue.prototype.qs = qs; | ||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | ||||
| Vue.use(VueI18n) | |||||
| const messages = { | |||||
| 'en':{...en,...enLocale} , | |||||
| 'zh': {...cn,...zhLocale}, | |||||
| } | |||||
| // Create VueI18n instance with options | |||||
| const i18n = new VueI18n({ | |||||
| locale: 'zh', // set locale | |||||
| messages, // set locale messages | |||||
| }) | |||||
| Vue.use(Element, { | |||||
| i18n: (key, value) => i18n.t(key, value) | |||||
| }) | |||||
| function initGetlang(){ | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| i18n.locale = 'zh' | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| i18n.locale = 'en' | |||||
| locale.use(enLocale) | |||||
| } | |||||
| } | |||||
| initGetlang() | |||||
| Object.defineProperty(Vue.prototype, '$echarts', { | Object.defineProperty(Vue.prototype, '$echarts', { | ||||
| value: echarts | value: echarts | ||||
| }) | }) | ||||
| @@ -3652,6 +3693,7 @@ function initVueApp() { | |||||
| new Vue({ | new Vue({ | ||||
| delimiters: ['${', '}'], | delimiters: ['${', '}'], | ||||
| el, | el, | ||||
| i18n, | |||||
| data: { | data: { | ||||
| page:parseInt(new URLSearchParams(window.location.search).get('page')), | page:parseInt(new URLSearchParams(window.location.search).get('page')), | ||||
| searchLimit: Number( | searchLimit: Number( | ||||
| @@ -3697,6 +3739,7 @@ function initVueUploader() { | |||||
| new Vue({ | new Vue({ | ||||
| el: '#minioUploader', | el: '#minioUploader', | ||||
| i18n, | |||||
| components: {MinioUploader}, | components: {MinioUploader}, | ||||
| template: '<MinioUploader />' | template: '<MinioUploader />' | ||||
| }); | }); | ||||
| @@ -3711,6 +3754,7 @@ function initVueEditAbout() { | |||||
| new Vue({ | new Vue({ | ||||
| el: '#about-desc', | el: '#about-desc', | ||||
| i18n, | |||||
| render: h => h(EditAboutInfo) | render: h => h(EditAboutInfo) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -3833,6 +3877,7 @@ function initVueDataset() { | |||||
| new Vue({ | new Vue({ | ||||
| delimiters: ['${', '}'], | delimiters: ['${', '}'], | ||||
| el, | el, | ||||
| i18n, | |||||
| data: { | data: { | ||||
| suburl: AppSubUrl, | suburl: AppSubUrl, | ||||
| url:'', | url:'', | ||||
| @@ -4416,6 +4461,7 @@ function initVueEditTopic() { | |||||
| new Vue({ | new Vue({ | ||||
| el:'#topic_edit1', | el:'#topic_edit1', | ||||
| i18n, | |||||
| render:h=>h(EditTopics) | render:h=>h(EditTopics) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -4429,6 +4475,7 @@ function initVueContributors() { | |||||
| new Vue({ | new Vue({ | ||||
| el:'#Contributors', | el:'#Contributors', | ||||
| i18n, | |||||
| render:h=>h(Contributors) | render:h=>h(Contributors) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -4458,7 +4505,7 @@ function initVueModel() { | |||||
| new Vue({ | new Vue({ | ||||
| el: el, | el: el, | ||||
| i18n, | |||||
| render: h => h(Model) | render: h => h(Model) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -4470,7 +4517,7 @@ function initVueDataAnalysis() { | |||||
| new Vue({ | new Vue({ | ||||
| el: '#data_analysis', | el: '#data_analysis', | ||||
| i18n, | |||||
| render: h => h(DataAnalysis) | render: h => h(DataAnalysis) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -4481,6 +4528,7 @@ function initVueWxAutorize() { | |||||
| } | } | ||||
| new Vue({ | new Vue({ | ||||
| el:el, | el:el, | ||||
| i18n, | |||||
| render: h => h(WxAutorize) | render: h => h(WxAutorize) | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -4529,6 +4577,7 @@ function initFilterBranchTagDropdown(selector) { | |||||
| new Vue({ | new Vue({ | ||||
| delimiters: ['${', '}'], | delimiters: ['${', '}'], | ||||
| el: this, | el: this, | ||||
| i18n, | |||||
| data, | data, | ||||
| beforeMount() { | beforeMount() { | ||||