@@ -1,4 +1,5 @@ | |||||
{{template "base/head" .}} | {{template "base/head" .}} | ||||
<div class="alert"></div> | |||||
<div id="images"></div> | <div id="images"></div> | ||||
<!-- 确认模态框 --> | <!-- 确认模态框 --> | ||||
<div id="deletemodel"> | <div id="deletemodel"> | ||||
@@ -54,7 +54,7 @@ | |||||
<a class="active item model_benchmark" | <a class="active item model_benchmark" | ||||
href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | ||||
<a class="item aisafety_benchmark" | <a class="item aisafety_benchmark" | ||||
href="{{.RepoLink}}/modelsafety/create_gpu">模型安全评测</a> | |||||
href="{{.RepoLink}}/modelsafety/create_gpu">{{.i18n.Tr "modelsafety.model_security_evaluation"}}</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
@@ -173,7 +173,7 @@ | |||||
<a class="item model_benchmark" | <a class="item model_benchmark" | ||||
href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | ||||
<a class="item aisafety_benchmark" | <a class="item aisafety_benchmark" | ||||
href="{{.RepoLink}}/modelsafety/create_gpu">模型安全评测</a> | |||||
href="{{.RepoLink}}/modelsafety/create_gpu">{{.i18n.Tr "modelsafety.model_security_evaluation"}}</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -305,7 +305,7 @@ | |||||
<a class="item model_benchmark" | <a class="item model_benchmark" | ||||
href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | href="{{.Link}}?benchmarkMode=model">{{.i18n.Tr "repo.cloudbrain.benchmark.model"}}</a> | ||||
<a class="active item aisafety_benchmark" | <a class="active item aisafety_benchmark" | ||||
href="{{.RepoLink}}/modelsafety/create_gpu">模型安全评测</a> | |||||
href="{{.RepoLink}}/modelsafety/create_gpu">{{.i18n.Tr "modelsafety.model_security_evaluation"}}</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -311,7 +311,7 @@ | |||||
<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}}" | <div id="repo-desc" data-IsAdmin="{{.Permission.IsAdmin}}" | ||||
data-IsArchived="{{.Repository.IsArchived}}"> | data-IsArchived="{{.Repository.IsArchived}}"> | ||||
<h4 id="about-desc" class="ui header">简介</h4> | |||||
<h4 id="about-desc" class="ui header"></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}} | ||||
@@ -363,15 +363,15 @@ | |||||
<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">{{.i18n.Tr "repo.computing.all"}} {{svg "octicon-chevron-right" 16}}</a> --> | |||||
<a class="membersmore text grey" | <a class="membersmore text grey" | ||||
href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">全部 | |||||
href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">{{.i18n.Tr "repo.computing.all"}} | |||||
{{svg "octicon-chevron-right" 16}}</a> | {{svg "octicon-chevron-right" 16}}</a> | ||||
</div> | </div> | ||||
</h4> | </h4> | ||||
@@ -3,9 +3,9 @@ | |||||
<div class="row git-user-content"> | <div class="row git-user-content"> | ||||
<h3 class="ui header"> | <h3 class="ui header"> | ||||
<div class="ui breadcrumb"> | <div class="ui breadcrumb"> | ||||
<a class="section" :href="url_code">代码</a> | |||||
<a class="section" :href="url_code">{{$i18n['code']}}</a> | |||||
<div class="divider"> / </div> | <div class="divider"> / </div> | ||||
<div class="active section" >贡献者 ({{totalNum}})</div> | |||||
<div class="active section" >{{$i18n['contributors']}} ({{totalNum}})</div> | |||||
</div> | </div> | ||||
</h3> | </h3> | ||||
<div class="ui horizontal relaxed list"> | <div class="ui horizontal relaxed list"> | ||||
@@ -76,6 +76,7 @@ watch: { | |||||
}, | }, | ||||
created(){ | created(){ | ||||
this.$i18n = window.i18n; | |||||
const url = window.location.pathname; | const url = window.location.pathname; | ||||
this.url = url; | this.url = url; | ||||
let strIndex = this.url.indexOf("contributors") | let strIndex = this.url.indexOf("contributors") | ||||
@@ -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">{{$i18n['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="$i18n['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="$i18n['introduction']" prop="desc"> | |||||
<el-input v-model="info.desc" type="textarea" :placeholder="$i18n['please_enter_the_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://openi.pcl.ac.cn)"></el-input> | |||||
<el-form-item :label="$i18n['homePage']" prop="index_web" > | |||||
<el-input v-model="info.index_web" :placeholder="`${$i18n['homePage']}(eg: https://openi.pcl.ac.cn)`"></el-input> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -147,6 +147,7 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
this.$i18n = window.i18n; | |||||
this.getIsSigned(); | this.getIsSigned(); | ||||
} | } | ||||
@@ -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="$i18n['searchOrCreateTopics']"> | |||||
</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>标签 | |||||
{{$i18n['clickOrEnterToAdd']}}<b class="user-add-label-text">{{input.toLowerCase()}}</b>{{$i18n['topic']}} | |||||
</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"> | ||||
@@ -98,7 +98,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.$i18n['noTopics']}</span>`) | |||||
}else{ | }else{ | ||||
$('#repo-topics1').children('span').remove() | $('#repo-topics1').children('span').remove() | ||||
} | } | ||||
@@ -264,7 +264,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.$i18n['noTopics']}</span>`) | |||||
}else{ | }else{ | ||||
$('#repo-topics1').children('span').remove() | $('#repo-topics1').children('span').remove() | ||||
} | } | ||||
@@ -386,12 +386,12 @@ 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.$i18n['noTopics']}</span>`) | |||||
} | } | ||||
this.changeValue() | this.changeValue() | ||||
} , | } , | ||||
created(){ | created(){ | ||||
this.$i18n = window.i18n; | |||||
this.initTopics(); | this.initTopics(); | ||||
this.input='' | this.input='' | ||||
@@ -450,7 +450,7 @@ export default { | |||||
onHidden: function () { | onHidden: function () { | ||||
if (flag == false) { | if (flag == false) { | ||||
$(".alert") | $(".alert") | ||||
.html("您已取消操作") | |||||
.html(_this.i18n['canceled_operation']) | |||||
.removeClass("alert-success") | .removeClass("alert-success") | ||||
.addClass("alert-danger") | .addClass("alert-danger") | ||||
.show() | .show() | ||||
@@ -458,7 +458,7 @@ export default { | |||||
.fadeOut(); | .fadeOut(); | ||||
} else { | } else { | ||||
$(".alert") | $(".alert") | ||||
.html("删除成功") | |||||
.html(_this.i18n['successfully_deleted']) | |||||
.removeClass("alert-danger") | .removeClass("alert-danger") | ||||
.addClass("alert-success") | .addClass("alert-success") | ||||
.show() | .show() | ||||
@@ -15,8 +15,8 @@ | |||||
<div slot="footer" class="dialog-footer"> | <div slot="footer" class="dialog-footer"> | ||||
<button class="ui button" @click="deleteDialog = false">{{"取消"}}</button> | |||||
<button class="ui green button" @click="deleteCallback.call(vmContext,deleteParam)">{{"确定"}}</button> | |||||
<button class="ui button" @click="deleteDialog = false">{{$i18n['cancel']}}</button> | |||||
<button class="ui green button" @click="deleteCallback.call(vmContext,deleteParam)">{{$i18n['confirm']}}</button> | |||||
<!-- <el-button size="small" style="font-size: 1rem;padding: .78571429em 1.5em .78571429em;border-radius: .28571429rem;" @click="deleteDialog = false">{{"取消"}}</el-button> | <!-- <el-button size="small" style="font-size: 1rem;padding: .78571429em 1.5em .78571429em;border-radius: .28571429rem;" @click="deleteDialog = false">{{"取消"}}</el-button> | ||||
<el-button size="small" style="background-color: #21ba45;color: #fff;font-size: 1rem;padding: .78571429em 1.5em .78571429em;border-radius: .28571429rem;" @click="deleteCallback.call(vmContext,deleteParam)">{{"确定"}}</el-button> --> | <el-button size="small" style="background-color: #21ba45;color: #fff;font-size: 1rem;padding: .78571429em 1.5em .78571429em;border-radius: .28571429rem;" @click="deleteCallback.call(vmContext,deleteParam)">{{"确定"}}</el-button> --> | ||||
</div> | </div> | ||||
@@ -71,6 +71,7 @@ export default { | |||||
}, | }, | ||||
}, | }, | ||||
created() { | created() { | ||||
this.$i18n = window.i18n; | |||||
this.deleteDialog = this.value; | this.deleteDialog = this.value; | ||||
} | } | ||||
}; | }; | ||||
@@ -3,27 +3,27 @@ | |||||
<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>{{$i18n['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="$i18n['cloudeBrainMirror']['public_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">{{$i18n['cloudeBrainMirror']['platform_recommendations']}}</el-checkbox> | |||||
</div> | </div> | ||||
</el-col> | </el-col> | ||||
<el-col :span="4" | <el-col :span="4" | ||||
><div style="visibility: hidden">TODO</div></el-col | |||||
><div style="visibility: hidden"></div></el-col | |||||
> | > | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -33,7 +33,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -46,7 +46,7 @@ | |||||
:header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
label="镜像Tag" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_tag']" | |||||
min-width="19%" | min-width="19%" | ||||
align="left" | align="left" | ||||
prop="tag" | prop="tag" | ||||
@@ -65,7 +65,7 @@ | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
label="镜像描述" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_description']" | |||||
min-width="28%" | min-width="28%" | ||||
align="left" | align="left" | ||||
prop="description" | prop="description" | ||||
@@ -86,7 +86,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="cloudbrainType" | prop="cloudbrainType" | ||||
label="可用集群" | |||||
:label="$i18n['cloudeBrainMirror']['available_clusters']" | |||||
min-width="10%" | min-width="10%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -96,7 +96,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="creator" | prop="creator" | ||||
label="创建者" | |||||
:label="$i18n['cloudeBrainMirror']['creator']" | |||||
min-width="8%" | min-width="8%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -121,7 +121,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="updatedUnix" | prop="updatedUnix" | ||||
label="创建时间" | |||||
:label="$i18n['cloudeBrainMirror']['creation_time']" | |||||
align="center" | align="center" | ||||
min-width="14%" | min-width="14%" | ||||
> | > | ||||
@@ -129,7 +129,7 @@ | |||||
{{ scope.row.updatedUnix | transformTimestamp }} | {{ scope.row.updatedUnix | transformTimestamp }} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column align="center" min-width="21%" label="操作"> | |||||
<el-table-column align="center" min-width="21%" :label="$i18n['cloudeBrainMirror']['operation']"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<div | <div | ||||
style=" | style=" | ||||
@@ -171,7 +171,7 @@ | |||||
<span | <span | ||||
style="padding: 0 1rem; color: #0366d6; cursor: pointer" | style="padding: 0 1rem; color: #0366d6; cursor: pointer" | ||||
@click="copyUrl(scope.row.place)" | @click="copyUrl(scope.row.place)" | ||||
>复制地址</span | |||||
>{{$i18n['cloudeBrainMirror']['copy_address']}}</span | |||||
> | > | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -199,16 +199,16 @@ | |||||
<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">{{$i18n['cloudeBrainMirror']['platform_recommendations']}}</el-checkbox> | |||||
</div> | </div> | ||||
</el-col> | </el-col> | ||||
<el-col :span="4" | <el-col :span="4" | ||||
><div style="visibility: hidden">TODO</div></el-col | |||||
><div style="visibility: hidden"></div></el-col | |||||
> | > | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -218,7 +218,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -227,7 +227,7 @@ | |||||
<el-empty :image-size="200"></el-empty> | <el-empty :image-size="200"></el-empty> | ||||
</template> | </template> | ||||
</el-tab-pane> | </el-tab-pane> | ||||
<el-tab-pane label="我的镜像" name="second" v-loading="loadingCustom"> | |||||
<el-tab-pane :label="$i18n['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"> | ||||
@@ -239,7 +239,7 @@ | |||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -249,7 +249,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -262,7 +262,7 @@ | |||||
:header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
label="镜像Tag" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_tag']" | |||||
min-width="19%" | min-width="19%" | ||||
align="left" | align="left" | ||||
prop="tag" | prop="tag" | ||||
@@ -287,7 +287,7 @@ | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
label="镜像描述" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_description']" | |||||
min-width="27%" | min-width="27%" | ||||
align="left" | align="left" | ||||
prop="description" | prop="description" | ||||
@@ -308,7 +308,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="cloudbrainType" | prop="cloudbrainType" | ||||
label="可用集群" | |||||
:label="$i18n['cloudeBrainMirror']['available_clusters']" | |||||
min-width="9%" | min-width="9%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -318,7 +318,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="isPrivate" | prop="isPrivate" | ||||
label="状态" | |||||
:label="$i18n['cloudeBrainMirror']['state']" | |||||
min-width="10%" | min-width="10%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -333,14 +333,14 @@ | |||||
<span | <span | ||||
v-if="scope.row.isPrivate" | v-if="scope.row.isPrivate" | ||||
style="color: rgb(250, 140, 22)" | style="color: rgb(250, 140, 22)" | ||||
>私有</span | |||||
>{{$i18n['cloudeBrainMirror']['private']}}</span | |||||
> | > | ||||
<span v-else style="color: rgb(19, 194, 141)">公开</span> | |||||
<span v-else style="color: rgb(19, 194, 141)">{{$i18n['cloudeBrainMirror']['public']}}</span> | |||||
<el-tooltip | <el-tooltip | ||||
v-if="scope.row.status === 0" | v-if="scope.row.status === 0" | ||||
class="item" | class="item" | ||||
effect="dark" | effect="dark" | ||||
content="镜像提交中..." | |||||
:content="$i18n['cloudeBrainMirror']['mirror_committed']" | |||||
placement="top" | placement="top" | ||||
> | > | ||||
<i class="CREATING" style="margin-left: 0.3rem"></i> | <i class="CREATING" style="margin-left: 0.3rem"></i> | ||||
@@ -350,7 +350,7 @@ | |||||
v-if="scope.row.status === 2" | v-if="scope.row.status === 2" | ||||
class="item" | class="item" | ||||
effect="dark" | effect="dark" | ||||
content="检测提交镜像是否大小超过20G!" | |||||
:content="$i18n['cloudeBrainMirror']['check_exceeds_20g']" | |||||
placement="top" | placement="top" | ||||
> | > | ||||
<i class="FAILED" style="margin-left: 0.3rem"></i> | <i class="FAILED" style="margin-left: 0.3rem"></i> | ||||
@@ -360,7 +360,7 @@ | |||||
v-if="scope.row.status === 1" | v-if="scope.row.status === 1" | ||||
class="item" | class="item" | ||||
effect="dark" | effect="dark" | ||||
content="镜像提交成功" | |||||
:content="$i18n['cloudeBrainMirror']['mirror_submitted']" | |||||
placement="top" | placement="top" | ||||
> | > | ||||
<i class="SUCCEEDED" style="margin-left: 0.3rem"></i> | <i class="SUCCEEDED" style="margin-left: 0.3rem"></i> | ||||
@@ -370,7 +370,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="updatedUnix" | prop="updatedUnix" | ||||
label="创建时间" | |||||
:label="$i18n['cloudeBrainMirror']['creation_time']" | |||||
align="center" | align="center" | ||||
min-width="14%" | min-width="14%" | ||||
> | > | ||||
@@ -378,7 +378,7 @@ | |||||
{{ scope.row.updatedUnix | transformTimestamp }} | {{ scope.row.updatedUnix | transformTimestamp }} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column align="center" min-width="21%" label="操作"> | |||||
<el-table-column align="center" min-width="21%" :label="$i18n['cloudeBrainMirror']['operation']"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<div | <div | ||||
style=" | style=" | ||||
@@ -412,24 +412,24 @@ | |||||
<span | <span | ||||
style="padding: 0 1rem; color: #0366d6; cursor: pointer" | style="padding: 0 1rem; color: #0366d6; cursor: pointer" | ||||
@click="copyUrl(scope.row.place)" | @click="copyUrl(scope.row.place)" | ||||
>复制地址</span | |||||
>{{$i18n['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 | |||||
{{$i18n['cloudeBrainMirror']['more']}}<i | |||||
class="el-icon-arrow-down el-icon--right" | class="el-icon-arrow-down el-icon--right" | ||||
></i> | ></i> | ||||
</span> | </span> | ||||
<el-dropdown-menu slot="dropdown"> | <el-dropdown-menu slot="dropdown"> | ||||
<el-dropdown-item | <el-dropdown-item | ||||
@click.native="eidtImage(scope.row.id)" | @click.native="eidtImage(scope.row.id)" | ||||
>编辑</el-dropdown-item | |||||
>{{$i18n['cloudeBrainMirror']['edit']}}</el-dropdown-item | |||||
> | > | ||||
<el-dropdown-item | <el-dropdown-item | ||||
style="color: red" | style="color: red" | ||||
@click.native="deleteImage(scope.row.id)" | @click.native="deleteImage(scope.row.id)" | ||||
>删除</el-dropdown-item | |||||
>{{$i18n['cloudeBrainMirror']['delete']}}</el-dropdown-item | |||||
> | > | ||||
</el-dropdown-menu> | </el-dropdown-menu> | ||||
</el-dropdown> | </el-dropdown> | ||||
@@ -459,15 +459,15 @@ | |||||
<template v-else> | <template v-else> | ||||
<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 style="visibility: hidden">TODO</div> | |||||
<div style="visibility: hidden"></div> | |||||
</el-col> | </el-col> | ||||
<el-col :span="4" | <el-col :span="4" | ||||
><div style="visibility: hidden">TODO</div></el-col | |||||
><div style="visibility: hidden"></div></el-col | |||||
> | > | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -477,7 +477,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -486,19 +486,19 @@ | |||||
<el-empty :image-size="200"></el-empty> | <el-empty :image-size="200"></el-empty> | ||||
</template> | </template> | ||||
</el-tab-pane> | </el-tab-pane> | ||||
<el-tab-pane label="我收藏的镜像" name="third"> | |||||
<el-tab-pane :label="$i18n['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"> | ||||
<div style="visibility: hidden">TODO</div> | |||||
<div style="visibility: hidden"></div> | |||||
</el-col> | </el-col> | ||||
<el-col :span="4" | <el-col :span="4" | ||||
><div style="visibility: hidden">TODO</div></el-col | |||||
><div style="visibility: hidden"></div></el-col | |||||
> | > | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -508,7 +508,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -521,7 +521,7 @@ | |||||
:header-cell-style="tableHeaderStyle" | :header-cell-style="tableHeaderStyle" | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
label="镜像Tag" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_tag']" | |||||
min-width="19%" | min-width="19%" | ||||
align="left" | align="left" | ||||
prop="tag" | prop="tag" | ||||
@@ -540,7 +540,7 @@ | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
label="镜像描述" | |||||
:label="$i18n['cloudeBrainMirror']['mirror_description']" | |||||
min-width="28%" | min-width="28%" | ||||
align="left" | align="left" | ||||
prop="description" | prop="description" | ||||
@@ -561,7 +561,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="cloudbrainType" | prop="cloudbrainType" | ||||
label="可用集群" | |||||
:label="$i18n['cloudeBrainMirror']['available_clusters']" | |||||
min-width="10%" | min-width="10%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -571,7 +571,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="creator" | prop="creator" | ||||
label="创建者" | |||||
:label="$i18n['cloudeBrainMirror']['creator']" | |||||
min-width="8%" | min-width="8%" | ||||
align="center" | align="center" | ||||
> | > | ||||
@@ -596,7 +596,7 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="updatedUnix" | prop="updatedUnix" | ||||
label="创建时间" | |||||
:label="$i18n['cloudeBrainMirror']['creation_time']" | |||||
align="center" | align="center" | ||||
min-width="14%" | min-width="14%" | ||||
> | > | ||||
@@ -604,7 +604,7 @@ | |||||
{{ scope.row.updatedUnix | transformTimestamp }} | {{ scope.row.updatedUnix | transformTimestamp }} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column align="center" min-width="21%" label="操作"> | |||||
<el-table-column align="center" min-width="21%" :label="$i18n['cloudeBrainMirror']['operation']"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<div | <div | ||||
style=" | style=" | ||||
@@ -639,7 +639,7 @@ | |||||
<span | <span | ||||
style="padding: 0 1rem; color: #0366d6; cursor: pointer" | style="padding: 0 1rem; color: #0366d6; cursor: pointer" | ||||
@click="copyUrl(scope.row.place)" | @click="copyUrl(scope.row.place)" | ||||
>复制地址</span | |||||
>{{$i18n['cloudeBrainMirror']['copy_address']}}</span | |||||
> | > | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -667,15 +667,15 @@ | |||||
<template v-else> | <template v-else> | ||||
<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 style="visibility: hidden">TODO</div> | |||||
<div style="visibility: hidden"></div> | |||||
</el-col> | </el-col> | ||||
<el-col :span="4" | <el-col :span="4" | ||||
><div style="visibility: hidden">TODO</div></el-col | |||||
><div style="visibility: hidden"></div></el-col | |||||
> | > | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<div> | <div> | ||||
<el-input | <el-input | ||||
placeholder="搜镜像Tag/描述/标签..." | |||||
:placeholder="$i18n['cloudeBrainMirror']['placeholder']" | |||||
v-model="search" | v-model="search" | ||||
class="input-with-select" | class="input-with-select" | ||||
@keyup.enter.native="searchName()" | @keyup.enter.native="searchName()" | ||||
@@ -685,7 +685,7 @@ | |||||
slot="append" | slot="append" | ||||
icon="el-icon-search" | icon="el-icon-search" | ||||
@click="searchName()" | @click="searchName()" | ||||
>搜索</el-button | |||||
>{{$i18n['cloudeBrainMirror']['search']}}</el-button | |||||
> | > | ||||
</el-input> | </el-input> | ||||
</div> | </div> | ||||
@@ -859,7 +859,7 @@ export default { | |||||
onHidden: function () { | onHidden: function () { | ||||
if (flag == false) { | if (flag == false) { | ||||
$(".alert") | $(".alert") | ||||
.html("您已取消操作") | |||||
.html(_this.$i18n['canceled_operation']) | |||||
.removeClass("alert-success") | .removeClass("alert-success") | ||||
.addClass("alert-danger") | .addClass("alert-danger") | ||||
.show() | .show() | ||||
@@ -867,7 +867,7 @@ export default { | |||||
.fadeOut(); | .fadeOut(); | ||||
} else { | } else { | ||||
$(".alert") | $(".alert") | ||||
.html("删除成功") | |||||
.html(_this.$i18n['successfully_deleted']) | |||||
.removeClass("alert-danger") | .removeClass("alert-danger") | ||||
.addClass("alert-success") | .addClass("alert-success") | ||||
.show() | .show() | ||||
@@ -921,7 +921,7 @@ export default { | |||||
document.execCommand("Copy"); | document.execCommand("Copy"); | ||||
cInput.remove(); | cInput.remove(); | ||||
$("body").toast({ | $("body").toast({ | ||||
message: "复制成功!", | |||||
message: this.$i18n['cloudeBrainMirror']['copy_succeeded'], | |||||
showProgress: "bottom", | showProgress: "bottom", | ||||
showIcon: "check circle", | showIcon: "check circle", | ||||
class: "info", | class: "info", | ||||
@@ -954,9 +954,9 @@ export default { | |||||
}, | }, | ||||
transformPravite(val) { | transformPravite(val) { | ||||
if (val) { | if (val) { | ||||
return "私有"; | |||||
return this.$i18n['cloudeBrainMirror']['private']; | |||||
} else { | } else { | ||||
return "公开"; | |||||
return this.$i18n['cloudeBrainMirror']['public']; | |||||
} | } | ||||
}, | }, | ||||
transformTimestamp(timestamp) { | transformTimestamp(timestamp) { | ||||
@@ -989,6 +989,7 @@ export default { | |||||
}, | }, | ||||
mounted() {}, | mounted() {}, | ||||
created() { | created() { | ||||
this.$i18n = window.i18n; | |||||
const params = new URLSearchParams(location.search); | const params = new URLSearchParams(location.search); | ||||
if (params.has("type") && params.get("type") == "myimage") { | if (params.has("type") && params.get("type") == "myimage") { | ||||
this.activeName = "second"; | this.activeName = "second"; | ||||
@@ -6,33 +6,33 @@ | |||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="ui form ignore-dirty"> | <div class="ui form ignore-dirty"> | ||||
<div class="ui fluid action input"> | <div class="ui fluid action input"> | ||||
<input type="text" placeholder="搜镜像Tag/描述/标签..." v-model="search" | |||||
<input type="text" :placeholder="$i18n['cloudeBrainMirror']['placeholder']" v-model="search" | |||||
@keyup.enter="searchName()"> | @keyup.enter="searchName()"> | ||||
<button class="ui blue button" @click="searchName()">搜索</button> | |||||
<button class="ui blue button" @click="searchName()">{{$i18n['cloudeBrainMirror']['search']}}</button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="ui ten wide column" style="margin: 1rem 0;"> | <div class="ui ten wide column" style="margin: 1rem 0;"> | ||||
<el-checkbox v-model="checked" style="padding: 0.5rem 1rem;">仅显示平台推荐</el-checkbox> | |||||
<el-checkbox v-model="checked" style="padding: 0.5rem 1rem;">{{$i18n['cloudeBrainMirror']['platform_recommendations']}}</el-checkbox> | |||||
<el-dropdown @command="handleCommand" trigger="click" | <el-dropdown @command="handleCommand" trigger="click" | ||||
style="border: 1px solid rgba(34,36,38,.15);border-radius: 4px;padding: 0.5rem 1rem;"> | style="border: 1px solid rgba(34,36,38,.15);border-radius: 4px;padding: 0.5rem 1rem;"> | ||||
<span class="el-dropdown-link"> | <span class="el-dropdown-link"> | ||||
{{dropdownPrivate}}<i class="el-icon-caret-bottom el-icon--right"></i> | {{dropdownPrivate}}<i class="el-icon-caret-bottom el-icon--right"></i> | ||||
</span> | </span> | ||||
<el-dropdown-menu slot="dropdown"> | <el-dropdown-menu slot="dropdown"> | ||||
<el-dropdown-item :command="{label:'全部',private:''}">全部</el-dropdown-item> | |||||
<el-dropdown-item :command="{label:'公开',private:false}">公开</el-dropdown-item> | |||||
<el-dropdown-item :command="{label:'私有',private:true}">私有</el-dropdown-item> | |||||
<el-dropdown-item :command="{label:$i18n['all'],private:''}">{{$i18n['all']}}</el-dropdown-item> | |||||
<el-dropdown-item :command="{label:$i18n['cloudeBrainMirror']['public'],private:false}">{{$i18n['cloudeBrainMirror']['public']}}</el-dropdown-item> | |||||
<el-dropdown-item :command="{label:$i18n['cloudeBrainMirror']['private'],private:true}">{{$i18n['cloudeBrainMirror']['private']}}</el-dropdown-item> | |||||
</el-dropdown-menu> | </el-dropdown-menu> | ||||
</el-dropdown> | </el-dropdown> | ||||
</div> | </div> | ||||
<div class="ui six wide column right aligned" style="margin: 1rem 0;"> | <div class="ui six wide column right aligned" style="margin: 1rem 0;"> | ||||
<a class="ui blue small button" href="/admin/images/commit_image">创建云脑镜像</a> | |||||
<a class="ui blue small button" href="/admin/images/commit_image">{{$i18n['cloudeBrainMirror']['create_cloud_brain_mirror']}}</a> | |||||
</div> | </div> | ||||
<div class="ui sixteen wide column" style="padding: 0;overflow-x: auto;"> | <div class="ui sixteen wide column" style="padding: 0;overflow-x: auto;"> | ||||
<el-table :data="tableDataCustom" style="width: 100%;min-width:1700px;" :header-cell-style="tableHeaderStyle"> | <el-table :data="tableDataCustom" style="width: 100%;min-width:1700px;" :header-cell-style="tableHeaderStyle"> | ||||
<el-table-column label="镜像Tag" min-width="19%" align="left" prop="tag"> | |||||
<el-table-column :label="$i18n['cloudeBrainMirror']['mirror_tag']" min-width="19%" align="left" prop="tag"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<div style="display: flex;align-items: center;"> | <div style="display: flex;align-items: center;"> | ||||
<a class="text-over image_title" :title="scope.row.tag">{{ scope.row.tag }}</a> | <a class="text-over image_title" :title="scope.row.tag">{{ scope.row.tag }}</a> | ||||
@@ -42,7 +42,7 @@ | |||||
</div> | </div> | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column label="镜像描述" min-width="28%" align="left" prop="description"> | |||||
<el-table-column :label="$i18n['cloudeBrainMirror']['mirror_description']" min-width="28%" align="left" prop="description"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<div class="image_desc" :title="scope.row.description">{{ scope.row.description}} | <div class="image_desc" :title="scope.row.description">{{ scope.row.description}} | ||||
</div> | </div> | ||||
@@ -53,18 +53,18 @@ | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="cloudbrainType" label="可用集群" min-width="10%" align="center"> | |||||
<el-table-column prop="cloudbrainType" :label="$i18n['cloudeBrainMirror']['available_clusters']" min-width="10%" align="center"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
{{scope.row.cloudbrainType | transformType}} | {{scope.row.cloudbrainType | transformType}} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="isPrivate" label="状态" min-width="8%" align="center"> | |||||
<el-table-column prop="isPrivate" :label="$i18n['cloudeBrainMirror']['state']" min-width="8%" align="center"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">私有</span> | |||||
<span v-else style="color: rgb(19, 194, 141);">公开</span> | |||||
<span v-if="scope.row.isPrivate" style="color: rgb(250, 140, 22);">{{$i18n['cloudeBrainMirror']['private']}}</span> | |||||
<span v-else style="color: rgb(19, 194, 141);">{{$i18n['cloudeBrainMirror']['public']}}</span> | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="creator" label="创建者" min-width="7%" align="center"> | |||||
<el-table-column prop="creator" :label="$i18n['cloudeBrainMirror']['creator']" min-width="7%" align="center"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
<a v-if="scope.row.userName||scope.row.relAvatarLink" | <a v-if="scope.row.userName||scope.row.relAvatarLink" | ||||
:href="'/' + scope.row.userName" :title="scope.row.userName"> | :href="'/' + scope.row.userName" :title="scope.row.userName"> | ||||
@@ -75,12 +75,12 @@ | |||||
</a> | </a> | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="updatedUnix" label="创建时间" align="center" min-width="13%"> | |||||
<el-table-column prop="updatedUnix" :label="$i18n['cloudeBrainMirror']['creation_time']" align="center" min-width="13%"> | |||||
<template slot-scope="scope"> | <template slot-scope="scope"> | ||||
{{scope.row.updatedUnix | transformTimestamp}} | {{scope.row.updatedUnix | transformTimestamp}} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column align="center" min-width="23%" label="操作"> | |||||
<el-table-column align="center" min-width="23%" :label="$i18n['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;"> | ||||
<div | <div | ||||
@@ -95,22 +95,22 @@ | |||||
</div> | </div> | ||||
<span style="padding: 0 1rem;color: rgb(250, 140, 22);cursor:pointer;" | <span style="padding: 0 1rem;color: rgb(250, 140, 22);cursor:pointer;" | ||||
v-if="scope.row.type==5" | v-if="scope.row.type==5" | ||||
@click="unSetRecommend(scope.$index,scope.row.id)">取消推荐</span> | |||||
@click="unSetRecommend(scope.$index,scope.row.id)">{{$i18n['cloudeBrainMirror']['cancel_recommendation']}}</span> | |||||
<span style="padding: 0 1rem;color: rgb(19, 194, 141);cursor:pointer;" | <span style="padding: 0 1rem;color: rgb(19, 194, 141);cursor:pointer;" | ||||
v-if="scope.row.type!==5 && !scope.row.isPrivate" | v-if="scope.row.type!==5 && !scope.row.isPrivate" | ||||
@click="setRecommend(scope.$index,scope.row.id)">设为推荐</span> | |||||
@click="setRecommend(scope.$index,scope.row.id)">{{$i18n['cloudeBrainMirror']['set_as_recommended']}}</span> | |||||
<span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" | <span style="padding: 0 1rem;color:#0366d6;cursor:pointer;" | ||||
@click="copyUrl(scope.row.place)">复制地址</span> | |||||
@click="copyUrl(scope.row.place)">{{$i18n['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> | |||||
{{$i18n['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 @click.native="eidtImage(scope.row.id)">{{$i18n['cloudeBrainMirror']['edit']}} | |||||
</el-dropdown-item> | </el-dropdown-item> | ||||
<el-dropdown-item style="color: red;" | <el-dropdown-item style="color: red;" | ||||
@click.native="deleteImage(scope.row.id)">删除</el-dropdown-item> | |||||
@click.native="deleteImage(scope.row.id)">{{$i18n['cloudeBrainMirror']['delete']}}</el-dropdown-item> | |||||
</el-dropdown-menu> | </el-dropdown-menu> | ||||
</el-dropdown> | </el-dropdown> | ||||
</div> | </div> | ||||
@@ -205,9 +205,9 @@ | |||||
}, | }, | ||||
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.$i18n['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.$i18n['successfully_deleted']).removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
@@ -269,9 +269,9 @@ | |||||
}, | }, | ||||
transformPravite(val) { | transformPravite(val) { | ||||
if (val) { | if (val) { | ||||
return "私有" | |||||
return this.$i18n['cloudeBrainMirror']['private']; | |||||
} else { | } else { | ||||
return "公开" | |||||
return this.$i18n['cloudeBrainMirror']['public']; | |||||
} | } | ||||
}, | }, | ||||
transformTimestamp(timestamp) { | transformTimestamp(timestamp) { | ||||
@@ -298,7 +298,8 @@ | |||||
this.getImageListCustom() | this.getImageListCustom() | ||||
}, | }, | ||||
created() { | created() { | ||||
this.$i18n = window.i18n; | |||||
this.dropdownPrivate = this.$i18n['all']; | |||||
} | } | ||||
}; | }; | ||||
@@ -115,6 +115,53 @@ export const i18nVue = { | |||||
modify:"修改", | modify:"修改", | ||||
about:"约", | about:"约", | ||||
count:"个", | count:"个", | ||||
all:"全部", | |||||
introduction: '简介', | |||||
edit_repository_information: '编辑仓库信息', | |||||
please_enter_the_content: '请输入内容', | |||||
homePage: '主页', | |||||
cancel: '取消', | |||||
confirm: '确定', | |||||
contributors: '贡献者', | |||||
code: '代码', | |||||
searchOrCreateTopics: '搜索或创建标签', | |||||
clickOrEnterToAdd: '点击或回车添加', | |||||
topic: '标签', | |||||
topics: '标签', | |||||
noTopics: '暂无标签', | |||||
createTopicsTips: '标签名必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符', | |||||
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:'更多', | |||||
copy_succeeded: '复制成功!', | |||||
cancel_recommendation: '取消推荐', | |||||
set_as_recommended: '设为推荐', | |||||
create_cloud_brain_mirror: '创建云脑镜像', | |||||
}, | |||||
}, | }, | ||||
US: { | US: { | ||||
computer_vision: "computer vision", | computer_vision: "computer vision", | ||||
@@ -236,5 +283,52 @@ export const i18nVue = { | |||||
modify:"Modify", | modify:"Modify", | ||||
about:"About", | about:"About", | ||||
count:"", | count:"", | ||||
all:"All", | |||||
introduction: 'Introduction', | |||||
edit_repository_information: 'Edit repository information', | |||||
please_enter_the_content: 'Please enter the content', | |||||
homePage: 'Home page', | |||||
cancel: 'Cancel', | |||||
confirm: 'Confirm', | |||||
contributors: 'Contributors', | |||||
code: 'Code', | |||||
searchOrCreateTopics: 'Search or create topics', | |||||
clickOrEnterToAdd: 'Click or enter to add', | |||||
topic: 'Topic', | |||||
topics: 'Topics', | |||||
noTopics: 'No topics', | |||||
createTopicsTips: 'The topic name must start with Chinese, letters or numbers, can contain hyphens (-), and cannot exceed 35 characters in length', | |||||
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', | |||||
copy_succeeded: 'Copy succeeded!', | |||||
cancel_recommendation: 'Cancel recommendation', | |||||
set_as_recommended: 'Set as recommended', | |||||
create_cloud_brain_mirror: 'Create cloud brain mirror', | |||||
}, | |||||
}, | }, | ||||
}; | }; |