Skip to content

Commit a72fa96

Browse files
3octaveshLinx
authored andcommitted
feat(frontend): 新增redis迁移单据 #7784
1 parent 6ec684a commit a72fa96

File tree

43 files changed

+3785
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3785
-18
lines changed

dbm-ui/frontend/src/common/const/ticketTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export enum TicketTypes {
8282
REDIS_SCALE_UP = 'REDIS_SCALE_UP',
8383
REDIS_SCALE_UPDOWN = 'REDIS_SCALE_UPDOWN',
8484
REDIS_VERSION_UPDATE_ONLINE = 'REDIS_VERSION_UPDATE_ONLINE',
85+
REDIS_CLUSTER_INS_MIGRATE = 'REDIS_CLUSTER_INS_MIGRATE',
86+
REDIS_SINGLE_INS_MIGRATE = 'REDIS_SINGLE_INS_MIGRATE',
8587
}
8688
export enum TicketTypes {
8789
TENDBCLUSTER_APPLY = 'TENDBCLUSTER_APPLY',

dbm-ui/frontend/src/components/db-card-checkbox/CardCheckbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<template>
1515
<div
1616
v-bk-tooltips="{
17-
disabled: !disabled,
17+
disabled: !disabled || !disabledTooltips,
1818
content: disabledTooltips,
1919
}"
2020
class="card-checkbox"

dbm-ui/frontend/src/components/instance-selector/Index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
spec_id?: number;
149149
role: string;
150150
shard?: string;
151+
version?: string;
151152
}
152153
153154
export type InstanceSelectorValues<T> = Record<string, T[]>;

dbm-ui/frontend/src/components/instance-selector/components/common/manual-content-host/table/Index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
cluster_type: '',
103103
master_domain: data.related_clusters[0].immute_domain,
104104
bk_cloud_name: data.bk_cloud_name,
105+
related_clusters: data.related_clusters || [],
105106
related_instances: (data.related_instances || []).map(instanceItem => ({
106107
instance: instanceItem.instance,
107108
status: instanceItem.status

dbm-ui/frontend/src/components/instance-selector/components/common/manual-content/table/Index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
db_module_id: data.db_module_id,
8787
db_module_name: data.db_module_name,
8888
master_domain: data.master_domain,
89+
spec_config: data.spec_config
8990
});
9091
9192
const { t } = useI18n();

dbm-ui/frontend/src/components/instance-selector/components/mysql/useTopoData.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export function useTopoData<T extends Record<string, any>>(filterClusterId: Comp
6666
.getTopoList(params)
6767
.then((data) => {
6868
const countFn = currentInstance.proxy?.countFunc;
69-
7069
const formatData = data.map((item: T) => {
7170
let count = item.instance_count;
7271
if (role === 'slave') {

dbm-ui/frontend/src/components/instance-selector/components/redis-host/table/Index.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
type IValue,
5656
type PanelListType,
5757
} from '../../../Index.vue';
58+
import RenderInstance from '../../common/render-instance/Index.vue';
5859
import SerachBar from '../../common/SearchBar.vue';
5960
6061
import { useTableData } from './useTableData';
@@ -91,12 +92,17 @@
9192
cluster_id: data.related_clusters[0].id,
9293
port: 0,
9394
instance_address: '',
94-
cluster_type: '',
95+
cluster_type: data.cluster_type,
9596
master_domain: data.related_clusters[0].immute_domain,
9697
bk_cloud_name: data.bk_cloud_name,
98+
related_clusters: data.related_clusters || [],
9799
related_instances: (data.related_instances || []).map(instanceItem => ({
98100
instance: instanceItem.instance,
99-
status: instanceItem.status
101+
status: instanceItem.status,
102+
bk_cloud_id: instanceItem.bk_cloud_id,
103+
bk_host_id: instanceItem.bk_host_id,
104+
ip: instanceItem.ip,
105+
port: instanceItem.port,
100106
})),
101107
spec_config: data.spec_config,
102108
db_module_id: data.db_module_id,
@@ -212,6 +218,13 @@
212218
label: props.firsrColumn?.label ? props.firsrColumn.label : t('实例'),
213219
field: props.firsrColumn?.field ? props.firsrColumn.field : 'instance_address',
214220
},
221+
{
222+
label: t('关联实例'),
223+
field: 'related_instances',
224+
showOverflowTooltip: true,
225+
width: 200,
226+
render: ({ data }: DataRow) => <RenderInstance data={data.related_instances || []}></RenderInstance>,
227+
},
215228
{
216229
minWidth: 100,
217230
label: t('云区域'),
@@ -276,7 +289,7 @@
276289
field: item.field,
277290
disabled: firstColumnFieldId.value === item.field,
278291
})),
279-
checked: [firstColumnFieldId.value, 'bk_cloud_id', 'role', 'status', 'cloud_area', 'alive', 'host_name', 'os_name'],
292+
checked: [firstColumnFieldId.value, 'related_instances', 'bk_cloud_id', 'role', 'status', 'cloud_area', 'alive', 'host_name', 'os_name'],
280293
}))
281294
282295

dbm-ui/frontend/src/components/instance-selector/components/redis/table/Index.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@
105105
db_module_id: data.db_module_id,
106106
db_module_name: data.db_module_name,
107107
master_domain: data.master_domain,
108-
role: data.role
108+
role: data.role,
109+
spec_config: data.spec_config,
110+
related_clusters: data.related_clusters,
111+
version: data?.version || '',
109112
});
110113
111114
const { t } = useI18n();
@@ -224,6 +227,7 @@
224227
field: 'instance_role',
225228
showOverflowTooltip: true,
226229
filter: props.roleFilterList,
230+
render: ({ data }: DataRow) => data.instance_role || '--'
227231
},
228232
{
229233
label: t('实例状态'),

dbm-ui/frontend/src/components/instance-selector/components/redis/table/useTableData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function useTableData<T>(
8080
}
8181
if (clusterId?.value && clusterId.value !== currentBizId) {
8282
Object.assign(params, {
83-
cluster_ids: clusterId.value,
83+
cluster_id: clusterId.value,
8484
});
8585
}
8686
return params;

dbm-ui/frontend/src/components/render-table/columns/spec-display/Panel.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<template>
1515
<BkPopover
1616
height="0"
17-
placement="bottom"
17+
:placement="placement"
1818
:popover-delay="[100, 200]"
1919
theme="light"
2020
width="514">
@@ -86,6 +86,8 @@
8686
</BkPopover>
8787
</template>
8888
<script setup lang="ts">
89+
import { Popover } from 'bkui-vue';
90+
import type { ComponentProps } from 'vue-component-type-helpers';
8991
import { useI18n } from 'vue-i18n';
9092
9193
export interface SpecInfo {
@@ -114,6 +116,7 @@
114116
interface Props {
115117
data?: SpecInfo;
116118
hideQps?: boolean;
119+
placement?: ComponentProps<typeof Popover>['placement'];
117120
}
118121
119122
withDefaults(defineProps<Props>(), {
@@ -142,6 +145,7 @@
142145
],
143146
}),
144147
hideQps: false,
148+
placement: 'bottom',
145149
});
146150
147151
const { t } = useI18n();

0 commit comments

Comments
 (0)