Skip to content

Commit

Permalink
feat(frontend): 单据管理迭代_1125 #7190
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 24748
  • Loading branch information
JustaCattt committed Nov 25, 2024
1 parent 803794c commit 6c9b9a6
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbm-ui/frontend/src/common/const/ticketTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export enum TicketTypes {
REDIS_SCALE_DOWN = 'REDIS_SCALE_DOWN',
REDIS_SCALE_UP = 'REDIS_SCALE_UP',
REDIS_SCALE_UPDOWN = 'REDIS_SCALE_UPDOWN',
REDIS_SLOTS_MIGRATE = 'REDIS_SLOTS_MIGRATE',
REDIS_VERSION_UPDATE_ONLINE = 'REDIS_VERSION_UPDATE_ONLINE',
}
export enum TicketTypes {
Expand Down Expand Up @@ -141,6 +140,7 @@ export enum TicketTypes {
MONGODB_REPLICASET_APPLY = 'MONGODB_REPLICASET_APPLY', // MongoDB 副本集部署申请
MONGODB_TEMPORARY_DESTROY = 'MONGODB_TEMPORARY_DESTROY', // mongo 临时集群销毁
MONGODB_FULL_BACKUP = 'MONGODB_FULL_BACKUP', // mongo 全库备份
MONGODB_INSTANCE_DEINSTALL = 'MONGODB_INSTANCE_DEINSTALL', // mongo 实例下架
}
export enum TicketTypes {
SQLSERVER_SINGLE_APPLY = 'SQLSERVER_SINGLE_APPLY', // sqlserver单节点部署
Expand All @@ -165,6 +165,7 @@ export enum TicketTypes {
SQLSERVER_FULL_MIGRATE = 'SQLSERVER_FULL_MIGRATE', // sqlserver 全量迁移
SQLSERVER_INCR_MIGRATE = 'SQLSERVER_INCR_MIGRATE', // sqlserver 增量迁移
SQLSERVER_BUILD_DB_SYNC = 'SQLSERVER_BUILD_DB_SYNC', // DB建立同步
SQLSERVER_MODIFY_STATUS = 'SQLSERVER_MODIFY_STATUS', // SQLServer 修改故障实例状态
}

export enum TicketTypes {
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -3740,5 +3740,6 @@
"检查主从数据校验结果:": "检查主从数据校验结果:",
"备份源:": "备份源:",
"新从库主机": "新从库主机",
"故障实例IP": "故障实例IP",
"这行勿动!新增翻译请在上一行添加!": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export * from './enable';
export * from './excelAuthorize';
export * from './execScriptApply';
export * from './fullBackup';
export * from './instanceDeinstall';
export * from './reduceMongos';
export * from './reduceShardNodes';
export * from './removeNs';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { DetailBase } from '../common';

export interface InstanceDeinstall extends DetailBase {
infos: {
ip: string;
port: number;
role: string;
domain: string;
bk_cloud_id: number;
}[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from './haApply';
export * from './importSqlFile';
export * from './masterFailOver';
export * from './masterSlaveSwitch';
export * from './modifyStatus';
export * from './reset';
export * from './restoreLocalSlave';
export * from './restoreSlave';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { DetailBase, DetailClusters } from '../common';

export interface ModifyStatus extends DetailBase {
clusters: DetailClusters;
infos: {
cluster_id: number;
ip_list: string[];
}[];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available.
*
* Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License athttps://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
-->

<template>
<BkTable
:data="ticketDetails.details.infos"
show-overflow-tooltip>
<BkTableColumn
field="domain"
:label="t('集群')" />
<BkTableColumn
field="role"
:label="t('角色')" />
<BkTableColumn :label="t('实例')">
<template #default="{ data }: { data: RowData }">
{{ `${data.ip}:${data.port}` }}
</template>
</BkTableColumn>
</BkTable>
</template>
<script setup lang="ts">
import BkTable from 'bkui-vue/lib/table';
import { useI18n } from 'vue-i18n';

import TicketModel, { type Mongodb } from '@services/model/ticket/ticket';

import { TicketTypes } from '@common/const';

interface Props {
ticketDetails: TicketModel<Mongodb.InstanceDeinstall>;
}

type RowData = Props['ticketDetails']['details']['infos'][number];

defineProps<Props>();

defineOptions({
name: TicketTypes.MONGODB_INSTANCE_DEINSTALL,
inheritAttrs: false,
});

const { t } = useI18n();
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available.
*
* Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License athttps://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
-->

<template>
<BkTable
:data="ticketDetails.details.infos"
show-overflow-tooltip>
<BkTableColumn :label="t('集群')">
<template #default="{ data }: { data: RowData }">
{{ ticketDetails.details.clusters[data.cluster_id].immute_domain }}
</template>
</BkTableColumn>
<BkTableColumn :label="t('故障实例IP')">
<template #default="{ data }: { data: RowData }">
{{ data.ip_list.join(',') }}
</template>
</BkTableColumn>
</BkTable>
</template>
<script setup lang="ts">
import BkTable from 'bkui-vue/lib/table';
import { useI18n } from 'vue-i18n';

import TicketModel, { type Sqlserver } from '@services/model/ticket/ticket';

import { TicketTypes } from '@common/const';

interface Props {
ticketDetails: TicketModel<Sqlserver.ModifyStatus>;
}

type RowData = Props['ticketDetails']['details']['infos'][number];

defineProps<Props>();

defineOptions({
name: TicketTypes.SQLSERVER_MODIFY_STATUS,
inheritAttrs: false,
});

const { t } = useI18n();
</script>

0 comments on commit 6c9b9a6

Please sign in to comment.