Skip to content

Commit

Permalink
fix: 文件恢复后更新生成版本按钮状态--bug=131345207 (#3538)
Browse files Browse the repository at this point in the history
* fix: 文件恢复后更新生成版本按钮状态

* fix: 客户端查询表格展示设置添加最后一次拉取时间

* fix: 客户端查询表格横向滚动展示问题

* fix: 选择载入版本文案调整
  • Loading branch information
Yuikill committed Sep 25, 2024
1 parent 5cd9e2e commit 2ad19f7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
1 change: 0 additions & 1 deletion bcs-services/bcs-bscp/ui/src/i18n/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ export default {
'当前已有「未上线」版本': 'There is currently a "not online" version',
前往编辑: 'Go to edit',
创建版本: 'Create version',
选择载入脚本: 'Select load script',
'无效名称,只允许包含中文、英文、数字、下划线()、连字符(-)、空格,且必须以中文、英文、数字开头和结尾': 'Invalid name, only allowed to contain Chinese, English, numbers, underscores (), hyphens (-), spaces, and must start and end with Chinese, English, numbers',
编辑版本: 'Edited version',
脚本内容不能为空: 'Script content cannot be empty',
Expand Down
1 change: 0 additions & 1 deletion bcs-services/bcs-bscp/ui/src/i18n/zh-cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ export default {
'当前已有「未上线」版本': '当前已有「未上线」版本',
前往编辑: '前往编辑',
创建版本: '创建版本',
选择载入脚本: '选择载入脚本',
'无效名称,只允许包含中文、英文、数字、下划线()、连字符(-)、空格,且必须以中文、英文、数字开头和结尾': '无效名称,只允许包含中文、英文、数字、下划线()、连字符(-)、空格,且必须以中文、英文、数字开头和结尾',
编辑版本: '编辑版本',
脚本内容不能为空: '脚本内容不能为空',
Expand Down
19 changes: 16 additions & 3 deletions bcs-services/bcs-bscp/ui/src/views/space/client/search/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
<template #prepend>
<render-table-tip />
</template>
<bk-table-column :min-width="80" :width="80" :label="renderSelection" :show-overflow-tooltip="false">
<bk-table-column
:min-width="80"
fixed="left"
:width="80"
:label="renderSelection"
:show-overflow-tooltip="false">
<template #default="{ row }">
<across-check-box
:checked="isChecked(row)"
Expand Down Expand Up @@ -108,7 +113,7 @@
</template>
</bk-table-column>
<bk-table-column
v-if="selectedShowColumn.includes('online-status')"
v-if="selectedShowColumn.includes('pull-time')"
:label="t('最后一次拉取配置耗时')"
:width="200"
:sort="true">
Expand Down Expand Up @@ -428,7 +433,8 @@
settings.value.size = 'medium';
if (tableSet) {
const { checked, size } = JSON.parse(tableSet);
selectedShowColumn.value = checked;
const requiredChecked = settings.value.fields.filter((item) => item.disabled).map((item) => item.id);
selectedShowColumn.value = [...requiredChecked, ...checked];
settings.value.checked = checked;
settings.value.size = size;
}
Expand Down Expand Up @@ -479,6 +485,11 @@
id: 'pull-status',
disabled: true,
},
{
name: t('最后一次拉取配置耗时'),
id: 'pull-time',
disabled: true,
},
{
name: t('在线状态'),
id: 'online-status',
Expand Down Expand Up @@ -515,6 +526,7 @@
'label',
'current-version',
'pull-status',
'pull-time',
'online-status',
'first-connect-time',
'last-heartbeat-time',
Expand All @@ -532,6 +544,7 @@
'label',
'current-version',
'pull-status',
'pull-time',
'online-status',
'first-connect-time',
'last-heartbeat-time',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@confirm="handleLoadScript"
@closed="dialogShow = false">
<bk-form ref="formRef" form-type="vertical" :model="{ selectedScript }">
<bk-form-item :label="t('选择载入脚本')" required property="selectedScript">
<bk-form-item :label="t('选择载入版本')" required property="selectedScript">
<bk-select
v-model="selectedScript"
:loading="listLoading"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,14 @@
if (oldConfigIndex.value !== -1) {
tableGroupsData.value.find((group) => group.id === 0)!.configs.splice(oldConfigIndex.value, 1);
}
// 更新配置项数量
const existConfigCount = configList.value.filter((item) => item.file_state !== 'DELETE').length;
configStore.$patch((state) => {
state.conflictFileCount = conflictCount.value;
state.allConfigCount = configsCount.value + templatesCount.value;
state.allExistConfigCount = existConfigCount + templatesCount.value;
});
};
// 批量操作配置项后刷新配置项列表
Expand Down

0 comments on commit 2ad19f7

Please sign in to comment.