-
-
-
+
+
+
+ {{ t('全局') }}
+
+
+
+
+
+
+
+
+
+
@@ -35,8 +44,8 @@
import { useDebouncedRef } from '@hooks';
- import HostList from './host-list/Index.vue';
- import SummaryView from './summary-view/Index.vue';
+ import HostList from '../components/host-list/Index.vue';
+ import SummaryView from '../components/summary-view/Index.vue';
const { t } = useI18n();
const router = useRouter();
@@ -74,7 +83,6 @@
params: {
page: value,
},
- query: {},
});
};
diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue
deleted file mode 100644
index 6c7ec84780..0000000000
--- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue
+++ /dev/null
@@ -1,346 +0,0 @@
-
-
-
-
-
-
-
-
- {{ t('批量设置') }}
-
-
-
- {{ t('批量移除') }}
-
-
-
-
- {{ t('复制') }}
-
-
-
-
-
- {{ t('所有主机') }}
-
-
- {{ t('已选主机') }}
-
-
- {{ t('所有异常主机') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/type.ts b/dbm-ui/frontend/src/views/resource-manage/pool/type.ts
new file mode 100644
index 0000000000..53e363a426
--- /dev/null
+++ b/dbm-ui/frontend/src/views/resource-manage/pool/type.ts
@@ -0,0 +1,13 @@
+/**
+ * 资源池类型枚举值
+ */
+export enum ResourcePool {
+ public = 'public',
+ global = 'global',
+ business = 'business',
+}
+
+/**
+ * 资源池类型
+ */
+export type ResourcePoolType = ResourcePool.business | ResourcePool.global | ResourcePool.public;
diff --git a/dbm-ui/frontend/src/views/resource-manage/routes.ts b/dbm-ui/frontend/src/views/resource-manage/routes.ts
index 6ab833b15c..4d8c87f2f8 100644
--- a/dbm-ui/frontend/src/views/resource-manage/routes.ts
+++ b/dbm-ui/frontend/src/views/resource-manage/routes.ts
@@ -23,7 +23,7 @@ const resourcePoolRoute = {
navName: t('DB 资源池'),
fullscreen: true,
},
- component: () => import('@views/resource-manage/pool/Index.vue'),
+ component: () => import('@views/resource-manage/pool/global/Index.vue'),
};
const resourcePoolOperationRecordRoute = {
@@ -44,6 +44,15 @@ const resourcePoolDirtyMachinesRoute = {
component: () => import('@views/resource-manage/dirty-machine/Index.vue'),
};
+const resourceTagsManagementRoute = {
+ name: 'resourceTagsManagement',
+ path: 'tags-management',
+ meta: {
+ navName: t('资源标签管理'),
+ },
+ component: () => import('@views/tag-manage/Index.vue'),
+};
+
const resourceSpecRoute = {
name: 'resourceSpec',
path: 'spec',
@@ -82,6 +91,10 @@ export default function getRoutes() {
mainRoute[0].children.push(resourcePoolDirtyMachinesRoute);
}
+ if (checkDbConsole('resourceManage.resourceTagsManagement')) {
+ mainRoute[0].children.push(resourceTagsManagementRoute);
+ }
+
if (checkDbConsole('resourceManage.resourceOperationRecord')) {
mainRoute[0].children.push(resourcePoolOperationRecordRoute);
}
diff --git a/dbm-ui/frontend/src/views/tag-manage/Index.vue b/dbm-ui/frontend/src/views/tag-manage/Index.vue
new file mode 100644
index 0000000000..1e88a85779
--- /dev/null
+++ b/dbm-ui/frontend/src/views/tag-manage/Index.vue
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue b/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue
new file mode 100644
index 0000000000..118a478b7d
--- /dev/null
+++ b/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
{{ bizIdMap.get(selected as number)?.name }}
+
+
+
+
+ {{ `${item.name}` }}
+
+ {{ `(#${item.bk_biz_id}${item.english_name ? `, ${item.english_name}` : ''})` }}
+
+
+ handleUnfavor(item.bk_biz_id)" />
+ handleFavor(item.bk_biz_id)" />
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue b/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue
new file mode 100644
index 0000000000..a4acc621f9
--- /dev/null
+++ b/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue b/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue
new file mode 100644
index 0000000000..fec0a7a1eb
--- /dev/null
+++ b/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+ {{ data.value }}
+
+
+
+
+
+
+
+
diff --git a/dbm-ui/frontend/src/views/tag-manage/routes.ts b/dbm-ui/frontend/src/views/tag-manage/routes.ts
new file mode 100644
index 0000000000..4200a67b34
--- /dev/null
+++ b/dbm-ui/frontend/src/views/tag-manage/routes.ts
@@ -0,0 +1,41 @@
+/*
+ * 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 type { RouteRecordRaw } from 'vue-router';
+
+import { checkDbConsole } from '@utils';
+
+import { t } from '@locales/index';
+
+const routes: RouteRecordRaw[] = [
+ {
+ name: 'BizResourcePool',
+ path: 'pool/:page?',
+ meta: {
+ navName: t('资源池'),
+ fullscreen: true,
+ },
+ component: () => import('@views/resource-manage/pool/business/Index.vue'),
+ },
+ {
+ name: 'BizResourceTag',
+ path: 'business-resource-tag',
+ meta: {
+ navName: t('资源标签'),
+ },
+ component: () => import('@views/tag-manage/Index.vue'),
+ },
+];
+
+export default function getRoutes() {
+ return checkDbConsole('bizConfigManage.businessResourceTag') ? routes : [];
+}