From ba9ecd41b3f0b619ca78d2d5b2e0e8e41d3a8282 Mon Sep 17 00:00:00 2001
From: v_ljcgliu <18571475178@163.com>
Date: Tue, 9 Jan 2024 09:55:52 +0800
Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=20mongodb=E5=AE=9E=E4=BE=8B?=
=?UTF-8?q?=E8=A7=86=E5=9B=BE=20#2920?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
dbm-ui/frontend/src/common/const.ts | 6 +-
.../dropdown-export-excel/index.vue | 6 +-
dbm-ui/frontend/src/layout/Index.vue | 1 +
.../components/ModuleConfig.vue | 10 +-
.../components/module-group/Index.vue | 2 +
.../components/module-group/MongoDB.vue | 25 ++
dbm-ui/frontend/src/locales/zh-cn.json | 12 +
dbm-ui/frontend/src/router/index.ts | 4 +
.../defaultController.json | 2 +-
.../function-controller/functionController.ts | 7 +-
.../model/mongodb/mongodb-instance-detail.ts | 63 +++
.../model/mongodb/mongodb-instance.ts | 71 +++
.../src/services/source/mongodbInstance.ts | 64 +++
.../src/views/mongodb-manage/index.vue | 3 +
.../detail/components/BaseInfo.vue | 170 +++++++
.../detail/components/Config.vue | 76 ++++
.../mongodb-instance/detail/index.vue | 84 ++++
.../mongodb-manage/mongodb-instance/index.vue | 28 ++
.../mongodb-instance/list/index.vue | 419 ++++++++++++++++++
.../src/views/mongodb-manage/routes.ts | 34 ++
.../master-failover/pages/page1/Index.vue | 4 +-
21 files changed, 1079 insertions(+), 12 deletions(-)
create mode 100644 dbm-ui/frontend/src/layout/components/database-manage/components/module-group/MongoDB.vue
create mode 100644 dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts
create mode 100644 dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts
create mode 100644 dbm-ui/frontend/src/services/source/mongodbInstance.ts
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/index.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/BaseInfo.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/Config.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/index.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/index.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/list/index.vue
create mode 100644 dbm-ui/frontend/src/views/mongodb-manage/routes.ts
diff --git a/dbm-ui/frontend/src/common/const.ts b/dbm-ui/frontend/src/common/const.ts
index 26178bb9b6..5a88805cd7 100644
--- a/dbm-ui/frontend/src/common/const.ts
+++ b/dbm-ui/frontend/src/common/const.ts
@@ -268,8 +268,10 @@ export enum TicketTypes {
RIAK_CLUSTER_ENABLE = 'RIAK_CLUSTER_ENABLE', // Riak 集群启用
RIAK_CLUSTER_SCALE_OUT = 'RIAK_CLUSTER_SCALE_OUT', // Riak 集群扩容
RIAK_CLUSTER_SCALE_IN = 'RIAK_CLUSTER_SCALE_IN', // Riak 集群缩容
- RIAK_CLUSTER_REBOOT = 'RIAK_CLUSTER_REBOOT' // Riak 节点重启
- }
+ RIAK_CLUSTER_REBOOT = 'RIAK_CLUSTER_REBOOT', // Riak 节点重启
+ MONGODB_DISABLE = 'MONGODB_DISABLE', // mongodb禁用
+ MONGODB_ENABLE = 'MONGODB_ENABLE'// mongodb启用
+}
export type TicketTypesStrings = keyof typeof TicketTypes;
/**
diff --git a/dbm-ui/frontend/src/components/dropdown-export-excel/index.vue b/dbm-ui/frontend/src/components/dropdown-export-excel/index.vue
index a2d80768f6..f1eee938ed 100644
--- a/dbm-ui/frontend/src/components/dropdown-export-excel/index.vue
+++ b/dbm-ui/frontend/src/components/dropdown-export-excel/index.vue
@@ -36,6 +36,7 @@
import { exportHdfsClusterToExcel, exportHdfsInstanceToExcel } from '@services/source/hdfs';
import { exportInfluxdbClusterToExcel, exportInfluxdbInstanceToExcel } from '@services/source/influxdb';
import { exportKafkaClusterToExcel, exportKafkaInstanceToExcel } from '@services/source/kafka';
+ import { exportMongodbInstanceToExcel } from '@services/source/mongodbInstance';
import { exportPulsarClusterToExcel, exportPulsarInstanceToExcel } from '@services/source/pulsar';
import { exportRedisClusterToExcel, exportRedisInstanceToExcel } from '@services/source/redis';
import { exportSpiderClusterToExcel, exportSpiderInstanceToExcel } from '@services/source/spider';
@@ -43,7 +44,7 @@
import { exportTendbsingleClusterToExcel, exportTendbsingleInstanceToExcel } from '@services/source/tendbsingle';
interface Props {
- type: 'tendbsingle' | 'tendbha' | 'spider' | 'redis' | 'pulsar' | 'kafka' | 'influxdb' | 'hdfs' | 'es';
+ type: 'tendbsingle' | 'tendbha' | 'spider' | 'redis' | 'pulsar' | 'kafka' | 'influxdb' | 'hdfs' | 'es' | 'mongodb';
ids?: number[];
exportType?: 'cluster' | 'instance';
hasSelected?: boolean;
@@ -98,6 +99,9 @@
cluster: exportEsClusterToExcel,
instance: exportEsInstanceToExcel,
},
+ mongodb: {
+ instance: exportMongodbInstanceToExcel,
+ },
};
const handleExport = async (type: 'all' | 'selected') => {
diff --git a/dbm-ui/frontend/src/layout/Index.vue b/dbm-ui/frontend/src/layout/Index.vue
index ddc56b5bf0..ef799220e2 100644
--- a/dbm-ui/frontend/src/layout/Index.vue
+++ b/dbm-ui/frontend/src/layout/Index.vue
@@ -123,6 +123,7 @@
'DatabaseWhitelist',
'ticketManage',
'DBPasswordTemporaryModify',
+ 'Mongodb',
],
[menuEnum.observableManage]: [
'DBHASwitchEvents',
diff --git a/dbm-ui/frontend/src/layout/components/database-manage/components/ModuleConfig.vue b/dbm-ui/frontend/src/layout/components/database-manage/components/ModuleConfig.vue
index e2f40dc3ae..04c8bae41f 100644
--- a/dbm-ui/frontend/src/layout/components/database-manage/components/ModuleConfig.vue
+++ b/dbm-ui/frontend/src/layout/components/database-manage/components/ModuleConfig.vue
@@ -137,11 +137,11 @@
value: 'riak',
icon: 'cluster',
},
- // {
- // name: 'MongoDB',
- // value: 'mongoDB',
- // icon: 'mysql',
- // },
+ {
+ name: 'MongoDB',
+ value: 'mongodb',
+ icon: 'mysql',
+ },
],
[t('时序数据库')]: [
{
diff --git a/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/Index.vue b/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/Index.vue
index efb07d5820..aa285577fe 100644
--- a/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/Index.vue
+++ b/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/Index.vue
@@ -8,6 +8,7 @@
import Hdfs from './Hdfs.vue';
import Influxdb from './Influxdb.vue';
import Kafka from './Kafka.vue';
+ import MongoDB from './MongoDB.vue';
import Mysql from './Mysql.vue';
import Pulsar from './Pulsar.vue';
import Redis from './Redis.vue';
@@ -30,6 +31,7 @@
redis: Redis,
tendbCluster: TendbCluster,
riak: Riak,
+ mongodb: MongoDB,
};
const renderCom = computed(() => comMap[props.name as keyof typeof comMap]);
diff --git a/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/MongoDB.vue b/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/MongoDB.vue
new file mode 100644
index 0000000000..466b3bb7fc
--- /dev/null
+++ b/dbm-ui/frontend/src/layout/components/database-manage/components/module-group/MongoDB.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+ {{ t('实例视图') }}
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json
index de7ba4969d..05cd291454 100644
--- a/dbm-ui/frontend/src/locales/zh-cn.json
+++ b/dbm-ui/frontend/src/locales/zh-cn.json
@@ -2553,5 +2553,17 @@
"规则下存在实例_不可删除": "规则下存在实例,不可删除",
"确认删除该规则?": "确认删除该规则?",
"IP_PORT_或_域名_端口": "IP:PORT 或 域名:端口",
+ "mongDB实例视图": "【MongDB】实例视图",
+ "实例:name": "实例:{name}",
+ "主域名": "主域名",
+ "从域名": "从域名",
+ "请输入关键字或选择条件搜索": "请输入关键字或选择条件搜索",
+ "集群架构": "集群架构",
+ "分片集群": "分片集群",
+ "分片名": "分片名",
+ "副本集": "副本集",
+ "导出": "导出",
+ "副本集集群": "副本集集群",
+ "分片集群实例": "分片集群实例",
"这行勿动!新增翻译请在上一行添加!": ""
}
\ No newline at end of file
diff --git a/dbm-ui/frontend/src/router/index.ts b/dbm-ui/frontend/src/router/index.ts
index 1cffed20bd..7ca7ce0315 100644
--- a/dbm-ui/frontend/src/router/index.ts
+++ b/dbm-ui/frontend/src/router/index.ts
@@ -20,6 +20,7 @@ import {
import type {
BigdataFunctions,
+ MongoFunctions,
MySQLFunctions,
RedisFunctions,
} from '@services/model/function-controller/functionController';
@@ -36,6 +37,7 @@ import getHDFSRoutes from '@views/hdfs-manage/routes';
import getInfluxDBRoutes from '@views/influxdb-manage/routes';
import getInspectionRoutes from '@views/inspection-manage/routes';
import getKafkaRoutes from '@views/kafka-manage/routes';
+import getMongoRoutes from '@views/mongodb-manage/routes';
import getDBMonitorAlarmRoutes from '@views/monitor-alarm-db/routes';
import getPlatMonitorAlarmRoutes from '@views/monitor-alarm-plat/routes';
import getMysqlRoutes from '@views/mysql/routes';
@@ -86,6 +88,7 @@ export default () => {
const mysqlController = funControllerData.getFlatData('mysql');
const redisController = funControllerData.getFlatData('redis');
const bigdataController = funControllerData.getFlatData('bigdata');
+ const mongdbController = funControllerData.getFlatData('mongodb');
appRouter = createRouter({
history: createWebHistory(),
@@ -129,6 +132,7 @@ export default () => {
...getTemporaryPasswordModify(),
...getRiakManage(bigdataController),
...getTicketFlowSettingRoutes(),
+ ...getMongoRoutes(mongdbController),
],
},
{
diff --git a/dbm-ui/frontend/src/services/model/function-controller/defaultController.json b/dbm-ui/frontend/src/services/model/function-controller/defaultController.json
index a8ae98005d..6c47a9de5f 100644
--- a/dbm-ui/frontend/src/services/model/function-controller/defaultController.json
+++ b/dbm-ui/frontend/src/services/model/function-controller/defaultController.json
@@ -81,4 +81,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/dbm-ui/frontend/src/services/model/function-controller/functionController.ts b/dbm-ui/frontend/src/services/model/function-controller/functionController.ts
index 168d456499..ca19b33b10 100644
--- a/dbm-ui/frontend/src/services/model/function-controller/functionController.ts
+++ b/dbm-ui/frontend/src/services/model/function-controller/functionController.ts
@@ -1,3 +1,4 @@
+/* eslint-disable max-len */
/*
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available.
*
@@ -16,7 +17,8 @@ export type MySQLFunctions = 'toolbox' | 'tendbsingle' | 'tendbha' | 'tendbclust
export type RedisFunctions = 'PredixyTendisplusCluster' | 'TwemproxyRedisInstance' | 'TwemproxyTendisSSDInstance' | 'toolbox';
export type BigdataFunctions = 'es' | 'kafka' | 'hdfs' | 'influxdb' | 'pulsar' | 'riak';
export type MonitorFunctions = 'duty_rule' | 'monitor_policy' | 'notice_group';
-export type FunctionKeys = AddonsFunctions | MySQLFunctions | RedisFunctions | BigdataFunctions | MonitorFunctions
+export type MongoFunctions = 'mongodb';
+export type FunctionKeys = AddonsFunctions | MySQLFunctions | RedisFunctions | BigdataFunctions | MonitorFunctions | MongoFunctions
export interface ControllerBaseInfo {
is_enabled: boolean,
@@ -32,6 +34,7 @@ interface ControllerData {
redis: ControllerItem,
bigdata: ControllerItem,
monitor: ControllerItem,
+ mongodb: ControllerItem,
}
export type ExtractedControllerDataKeys = Extract;
@@ -42,6 +45,7 @@ export default class FunctionController {
redis: ControllerItem;
bigdata: ControllerItem;
monitor: ControllerItem;
+ mongodb: ControllerItem;
constructor(payload = {} as ControllerData) {
this.addons = payload.addons;
@@ -49,6 +53,7 @@ export default class FunctionController {
this.redis = payload.redis;
this.bigdata = payload.bigdata;
this.monitor = payload.monitor;
+ this.mongodb = payload.mongodb;
}
getFlatData<
diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts
new file mode 100644
index 0000000000..b81deab7ea
--- /dev/null
+++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts
@@ -0,0 +1,63 @@
+export default class mongodbInstanceDetail {
+ bk_agent_id: string;
+ bk_cloud_id: number;
+ bk_cloud_name: string;
+ bk_cpu: number;
+ bk_disk: number;
+ bk_host_id: number;
+ bk_host_innerip: string;
+ bk_idc_id: string;
+ bk_idc_name: string;
+ bk_mem: number;
+ bk_os_name: string;
+ cluster_id: number;
+ cluster_name: string;
+ cluster_type: string;
+ create_at: string;
+ db_module_id: number;
+ db_version: null;
+ id: number;
+ instance_address: string;
+ ip: string;
+ machine_type: string;
+ master_domain: string;
+ port: number;
+ role: string;
+ shard: string;
+ slave_domain: string;
+ spec_config: string;
+ status: string;
+ version: string;
+
+ constructor(payload: mongodbInstanceDetail) {
+ this.bk_agent_id = payload.bk_agent_id;
+ this.bk_cloud_id = payload.bk_cloud_id;
+ this.bk_cloud_name = payload.bk_cloud_name;
+ this.bk_cpu = payload.bk_cpu;
+ this.bk_disk = payload.bk_disk;
+ this.bk_host_id = payload.bk_host_id;
+ this.bk_host_innerip = payload.bk_host_innerip;
+ this.bk_idc_id = payload.bk_idc_id;
+ this.bk_idc_name = payload.bk_idc_name;
+ this.bk_mem = payload.bk_mem;
+ this.bk_os_name = payload.bk_os_name;
+ this.cluster_id = payload.cluster_id;
+ this.cluster_name = payload.cluster_name;
+ this.cluster_type = payload.cluster_type;
+ this.create_at = payload.create_at;
+ this.db_module_id = payload.db_module_id;
+ this.db_version = payload.db_version;
+ this.id = payload.id;
+ this.instance_address = payload.instance_address;
+ this.ip = payload.ip;
+ this.machine_type = payload.machine_type;
+ this.master_domain = payload.master_domain;
+ this.port = payload.port;
+ this.role = payload.role;
+ this.shard = payload.shard;
+ this.slave_domain = payload.slave_domain;
+ this.spec_config = payload.spec_config;
+ this.status = payload.status;
+ this.version = payload.version;
+ }
+}
diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts
new file mode 100644
index 0000000000..6109eccb8a
--- /dev/null
+++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts
@@ -0,0 +1,71 @@
+import dayjs from 'dayjs';
+
+import { t } from '@/locales';
+
+export default class mongodbInstance {
+ static themes: Record = {
+ running: 'success',
+ };
+ static statusMap: Record = {
+ running: '正常',
+ unavailable: '异常',
+ };
+ bk_cloud_id: number;
+ bk_cloud_name: string;
+ bk_host_id: number;
+ cluster_id: number;
+ cluster_name: string;
+ cluster_type: string;
+ create_at: string;
+ db_module_id: string;
+ id: number;
+ ip: number;
+ instance_address: string;
+ machine_type: string;
+ master_domain: string;
+ port: number;
+ role: string;
+ shard: string;
+ slave_domain: string;
+ spec_config: string;
+ status: string;
+ version: string;
+
+ constructor(payload = {} as mongodbInstance) {
+ this.bk_cloud_id = payload.bk_cloud_id;
+ this.bk_cloud_name = payload.bk_cloud_name;
+ this.bk_host_id = payload.bk_host_id;
+ this.cluster_id = payload.cluster_id;
+ this.cluster_name = payload.cluster_name;
+ this.cluster_type = payload.cluster_type;
+ this.create_at = payload.create_at;
+ this.db_module_id = payload.db_module_id;
+ this.id = payload.id;
+ this.instance_address = payload.instance_address;
+ this.ip = payload.ip;
+ this.machine_type = payload.machine_type;
+ this.master_domain = payload.master_domain;
+ this.port = payload.port;
+ this.role = payload.role;
+ this.shard = payload.shard;
+ this.spec_config = payload.spec_config;
+ this.slave_domain = payload.slave_domain;
+ this.status = payload.status;
+ this.version = payload.version;
+ }
+
+ get isNew() {
+ return dayjs().isBefore(dayjs(this.create_at).add(24, 'hour'));
+ }
+
+ get dbStatusconfigureObj() {
+ const text = mongodbInstance.statusMap[this.status] || '--';
+ const theme = mongodbInstance.themes[this.status] || 'danger';
+ return { text, theme };
+ }
+
+ get clusterTypeText() {
+ return this.cluster_type === 'MongoReplicaSet' ? t('副本集') : t('分片集群');
+ }
+}
+
diff --git a/dbm-ui/frontend/src/services/source/mongodbInstance.ts b/dbm-ui/frontend/src/services/source/mongodbInstance.ts
new file mode 100644
index 0000000000..36cb8b0d4c
--- /dev/null
+++ b/dbm-ui/frontend/src/services/source/mongodbInstance.ts
@@ -0,0 +1,64 @@
+/*
+ * 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 at https://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.
+*/
+
+import MongodbInstanceModel from '@services/model/mongodb/mongodb-instance';
+import MongodbInstanceDetailModel from '@services/model/mongodb/mongodb-instance-detail';
+import type { ListBase } from '@services/types/index';
+
+import { useGlobalBizs } from '@stores';
+
+import http from '../http';
+
+const { currentBizId } = useGlobalBizs();
+
+const path = `/apis/mongodb/bizs/${currentBizId}/mongodb_resources`;
+
+/**
+ * 获取列表数据
+ */
+export function getInstanceList(params: {
+ limit?: number,
+ offset?: number,
+}) {
+ return http.get>(`${path}/list_instances/`, params).then(data => ({
+ ...data,
+ results: data.results.map(item => new MongodbInstanceModel(item)),
+ }));
+}
+
+/**
+ * 获取实例详情
+ */
+export function getInstanceDetail(params: {
+ instance_address: string,
+ cluster_id: number
+}) {
+ return http.get(`${path}/retrieve_instance/`, params);
+}
+
+/**
+ * 获取角色列表
+ */
+export function getRoleList(params: {
+ limit?: number,
+ offset?: number
+}) {
+ return http.get(`${path}/get_instance_role/`, params);
+}
+
+/**
+ * 导出实例数据为 excel 文件
+ */
+export function exportMongodbInstanceToExcel(params: { bk_host_ids?: number[] }) {
+ return http.post(`${path}/export_instance/`, params, { responseType: 'blob' });
+}
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/index.vue b/dbm-ui/frontend/src/views/mongodb-manage/index.vue
new file mode 100644
index 0000000000..7c2aa3f3e1
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/index.vue
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/BaseInfo.vue
new file mode 100644
index 0000000000..d911a73e26
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/BaseInfo.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/Config.vue b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/Config.vue
new file mode 100644
index 0000000000..25cf1228e5
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/components/Config.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/index.vue b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/index.vue
new file mode 100644
index 0000000000..4c81f52eb2
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/detail/index.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/index.vue b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/index.vue
new file mode 100644
index 0000000000..87f5610c9a
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/index.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/list/index.vue b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/list/index.vue
new file mode 100644
index 0000000000..92c923a607
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/mongodb-instance/list/index.vue
@@ -0,0 +1,419 @@
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/mongodb-manage/routes.ts b/dbm-ui/frontend/src/views/mongodb-manage/routes.ts
new file mode 100644
index 0000000000..b284771e6d
--- /dev/null
+++ b/dbm-ui/frontend/src/views/mongodb-manage/routes.ts
@@ -0,0 +1,34 @@
+import type { RouteRecordRaw } from 'vue-router';
+
+import type { MongoFunctions } from '@services/model/function-controller/functionController';
+
+import { t } from '@locales/index';
+
+const routes: RouteRecordRaw[] = [
+ {
+ name: 'mongodb',
+ path: 'mongodb-manage',
+ meta: {
+ navName: t('集群管理'),
+ },
+ component: () => import('@views/mongodb-manage/mongodb-instance/index.vue'),
+ children: [
+ {
+ name: 'mongodbInstance',
+ path: 'mongodb-instance',
+ meta: {
+ navName: t('mongDB实例视图'),
+ fullscreen: true,
+ },
+ component: () => import('@views/mongodb-manage/mongodb-instance/index.vue'),
+ },
+ ],
+ },
+];
+
+export default function getRoutes(controller: Record) {
+ if (controller.mongodb !== true) {
+ return [];
+ }
+ return routes;
+}
diff --git a/dbm-ui/frontend/src/views/redis/master-failover/pages/page1/Index.vue b/dbm-ui/frontend/src/views/redis/master-failover/pages/page1/Index.vue
index 94188e9d5a..4da9ddd8a5 100644
--- a/dbm-ui/frontend/src/views/redis/master-failover/pages/page1/Index.vue
+++ b/dbm-ui/frontend/src/views/redis/master-failover/pages/page1/Index.vue
@@ -1,4 +1,3 @@
-