Skip to content

Commit

Permalink
perf:优化插件管理菜单默认插件查询 TencentBlueKing#11142
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 22349
  • Loading branch information
useryuyu committed Oct 30, 2024
1 parent aa326b8 commit 6b1e8fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/frontend/devops-pipeline/src/views/list/atomManage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<span>{{ panel.label }}</span>
</template>
<bk-table
v-bkloading="{ isLoading: tableLoading }"
:data="atomList"
size="large"
:empty-text="$t('noData')"
Expand Down Expand Up @@ -245,6 +246,7 @@
list: []
},
isLoading: false,
tableLoading: false,
defaultPaging: {
current: 1,
count: 0,
Expand Down Expand Up @@ -308,6 +310,7 @@
fetchAtomList () {
const classifyCode = this.active === 'all' ? '' : this.active
this.tableLoading = true
return this.getInstallAtomList({
projectCode: this.projectId,
page: this.defaultPaging.current,
Expand All @@ -317,6 +320,7 @@
const data = res.data || {}
this.atomList = data.records || []
this.defaultPaging.count = data.count || 0
this.tableLoading = false
})
},
Expand Down Expand Up @@ -385,6 +389,10 @@
getInstallInfo (row) {
let des = this.$t('atomManage.installedAt')
if (row.default) des = this.$t('atomManage.createdAt')
if (row.installer === 'system') {
const info = this.$t('atomManage.systemPlugin')
return info
}
return `${row.installer} ${des} ${row.installTime}`
},
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@
"noRelatedPipeline": "No linked pipeline yet",
"all": "All",
"installedAt": "Installed at",
"createdAt": "Created at"
"createdAt": "Created at",
"systemPlugin": "system plugin"
},
"settings": {
"baseInfo": "Basic Information",
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@
"noRelatedPipeline": "暂无关联流水线",
"all": "所有",
"installedAt": "安装于",
"createdAt": "创建于"
"createdAt": "创建于",
"systemPlugin": "系统插件"
},
"settings": {
"baseInfo": "基本信息",
Expand Down

0 comments on commit 6b1e8fa

Please sign in to comment.