Skip to content

Commit

Permalink
feat(frontend): 集群、实例补充字段 TencentBlueKing#7813
Browse files Browse the repository at this point in the history
  • Loading branch information
royalpioneer authored and hLinx committed Dec 5, 2024
1 parent 61bbb6c commit 7e4d349
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 33 deletions.
3 changes: 2 additions & 1 deletion dbm-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"@blueking/login-modal": "^1.0.5",
"@blueking/notice-component": "2.0.5",
"@blueking/sub-saas": "0.0.0-beta.6",
"@blueking/table": "^0.0.1-beta.17",
"@blueking/table": "^0.0.1-beta.18",
"@blueking/vxe-table": "^4.8.0-beta.7.7",
"@icon-cool/bk-icon-bk-biz-components": "0.0.4",
"@vueuse/core": "^11.0.3",
"axios": "^1.7.7",
Expand Down
3 changes: 1 addition & 2 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3621,7 +3621,6 @@
"变更前": "变更前",
"变更后": "变更后",
"不变": "不变",
"权限:新增n个,删除m个": "权限 : 新增 {0} 个,删除 {1} 个",
"权限类型": "权限类型",
"提交失败": "提交失败",
"编辑时只能单个,且不能有分隔符": "编辑时只能单个,且不能有分隔符",
Expand Down Expand Up @@ -3747,7 +3746,6 @@
"共n个_查看更多": "共 {0} 个,查看更多",
"待继续": "待继续",
"操作:": "操作:",
"冷/热节点": "冷/热节点",
"集群 ID": "集群 ID",
"指定 DB 名": "指定 DB 名",
"变更类型:": "变更类型:",
Expand Down Expand Up @@ -3777,5 +3775,6 @@
"目标Proxy实例": "目标 Proxy 实例",
"全局超时时间:": "全局超时时间:",
"回档到指定时间:": "回档到指定时间:",
"权限:新增n个,删除m个": "权限:新增 {0} 个,删除 {1} 个",
"这行勿动!新增翻译请在上一行添加!": ""
}
4 changes: 4 additions & 0 deletions dbm-ui/frontend/src/services/model/hdfs/hdfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,8 @@ export default class Hdfs {
get isNew() {
return isRecentDays(this.create_at, 24);
}

get disasterToleranceLevelName() {
return ClusterAffinityMap[this.disaster_tolerance_level];
}
}
4 changes: 4 additions & 0 deletions dbm-ui/frontend/src/services/model/mysql/tendbha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,8 @@ export default class Tendbha {
get isNew() {
return isRecentDays(this.create_at, 24);
}

get disasterToleranceLevelName() {
return ClusterAffinityMap[this.disaster_tolerance_level];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
releate-url-query
:row-class="setRowClass"
row-hover="auto"
@clear-search="handleClearSearch" />
:show-settgings="false"
@clear-search="handleClearSearch"
@refresh="fetchData" />
</div>
<!-- 创建账户 -->
<AccountCreate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
{
label: t('访问入口'),
field: 'domain',
minWidth: 320,
minWidth: 300,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
{
label: t('访问入口'),
field: 'domain',
minWidth: 320,
minWidth: 300,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
{
label: t('访问入口'),
field: 'domain',
minWidth: 320,
minWidth: 280,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@
{
label: t('实例'),
minWidth: 300,
width: 300,
fixed: 'left',
field: 'instance',
showOverflowTooltip: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
{
label: t('访问入口'),
field: 'domain',
minWidth: 320,
minWidth: 280,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
label: t('主访问入口'),
field: 'master_domain',
fixed: 'left',
minWidth: 320,
minWidth: 280,
showOverflowTooltip: false,
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
label: t('实例'),
field: 'instance_address',
fixed: 'left',
width: 200,
minWidth: 200,
showOverflowTooltip: false,
render: ({ cell, data }: ColumnData) => (
<TextOverflowLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@
{
label: t('访问入口'),
field: 'domain',
minWidth: 320,
minWidth: 280,
fixed: 'left',
showOverflowTooltip: false,
renderHead: () => (
<RenderHeadCopy
hasSelected={hasSelected.value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@
field: 'instance_address',
fixed: 'left',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: RedisInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down Expand Up @@ -207,7 +206,6 @@
label: t('集群名称'),
field: 'cluster_name',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: RedisInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
field: 'instance_address',
fixed: 'left',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: RedisInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down Expand Up @@ -212,7 +211,6 @@
label: t('集群名称'),
field: 'cluster_name',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: RedisInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
{
label: t('主访问入口'),
field: 'master_domain',
minWidth: 320,
minWidth: 280,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
{
label: t('访问入口'),
field: 'master_domain',
minWidth: 320,
minWidth: 280,
fixed: 'left',
renderHead: () => (
<RenderHeadCopy
Expand Down Expand Up @@ -490,7 +490,6 @@
label: t('集群名称'),
field: 'cluster_name',
minWidth: 200,
showOverflowTooltip: false,
renderHead: () => (
<RenderHeadCopy
hasSelected={hasSelected.value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@
label: t('主访问入口'),
field: 'master_domain',
fixed: 'left',
minWidth: 320,
showOverflowTooltip: false,
minWidth: 280,
renderHead: () => (
<RenderHeadCopy
hasSelected={hasSelected.value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
field: 'instance_address',
fixed: 'left',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: SqlServerHaInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down Expand Up @@ -212,7 +211,6 @@
label: t('集群名称'),
field: 'cluster_name',
minWidth: 200,
showOverflowTooltip: false,
render: ({ data }: { data: SqlServerHaInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@
field: 'instance',
fixed: 'left',
width: 200,
showOverflowTooltip: false,
render: ({ data }: IColumn) => (
<TextOverflowLayout>
{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@
label: t('主访问入口'),
field: 'master_domain',
fixed: 'left',
minWidth: 320,
showOverflowTooltip: false,
minWidth: 280,
renderHead: () => (
<RenderHeadCopy
hasSelected={hasSelected.value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
const settingChangeKey = ref(1);
const pagination = ref<{
count: number,
limit: number
limit: number,
remote: false
}[]>([]);
const formattedKeyword = computed(() => props.keyword
Expand Down Expand Up @@ -126,7 +127,7 @@
{
label: t('主访问入口'),
field: 'immute_domain',
width: 160,
width: 240,
render: ({ data }: { data: QuickSearchClusterDomainModel }) => (
<TextOverflowLayout>
{{
Expand Down Expand Up @@ -199,7 +200,7 @@
{
label: t('创建时间'),
field: 'create_at',
width: 150,
width: 240,
sort: true,
render: ({ data }: { data: QuickSearchClusterDomainModel }) => data.createAtDisplay || '--',
},
Expand Down Expand Up @@ -241,6 +242,8 @@
pagination.value = newRenderData.dataList.map(dataItem => ({
count: dataItem.dataList.length,
limit: 10,
current: 1,
remote: false,
}));
}, {
immediate: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
{
label: t('主访问入口'),
field: 'immute_domain',
width: 160,
width: 240,
render: ({ data }: { data: QuickSearchClusterNameModel }) => (
<TextOverflowLayout>
{{
Expand Down Expand Up @@ -189,7 +189,7 @@
{
label: t('创建时间'),
field: 'create_at',
width: 150,
width: 240,
sort: true,
render: ({ data }: { data: QuickSearchClusterNameModel }) => data.createAtDisplay || '--',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
{
label: t('主访问入口'),
field: 'cluster_domain',
width: 160,
width: 240,
render: ({ data }: { data: QuickSearchInstanceModel }) => (
<TextOverflowLayout>
{{
Expand Down

0 comments on commit 7e4d349

Please sign in to comment.