forked from TencentBlueKing/blueking-dbm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): redis安装module TencentBlueKing#8020
# Reviewed, transaction id: 25565
- Loading branch information
1 parent
c307315
commit c04cce5
Showing
24 changed files
with
991 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/installModule.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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 { RedisInstallModuleDetails } from '@services/model/ticket/details/redis'; | ||
import TicketModel from '@services/model/ticket/ticket'; | ||
|
||
import { random } from '@utils'; | ||
|
||
// Redis 安装Module | ||
export function generateRedisInstallModule(ticketData: TicketModel<RedisInstallModuleDetails>) { | ||
const { clusters, infos } = ticketData.details; | ||
return Promise.resolve({ | ||
tableDataList: infos.map((info) => { | ||
const cluster = clusters[info.cluster_id]; | ||
return { | ||
rowKey: random(), | ||
isLoading: false, | ||
srcCluster: cluster.immute_domain, | ||
clusterId: info.cluster_id, | ||
bkCloudId: cluster.bk_cloud_id, | ||
clusterType: cluster.cluster_type, | ||
clusterTypeName: cluster.cluster_type_name, | ||
dbVersion: info.db_version, | ||
loadModules: info.load_modules, | ||
}; | ||
}), | ||
remark: ticketData.remark, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
dbm-ui/frontend/src/views/db-manage/redis/install-module/Index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
* 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> | ||
<Component :is="component" /> | ||
</template> | ||
<script setup lang="ts"> | ||
import { computed, ref } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
|
||
import Page1 from './pages/page1/Index.vue'; | ||
import Page2 from './pages/page2/Index.vue'; | ||
|
||
const route = useRoute(); | ||
|
||
const comMap = { | ||
ticket: Page1, | ||
success: Page2, | ||
}; | ||
|
||
const page = ref(''); | ||
|
||
const component = computed(() => { | ||
if (comMap[page.value as keyof typeof comMap]) { | ||
return comMap[page.value as keyof typeof comMap]; | ||
} | ||
return Page1; | ||
}); | ||
|
||
watch( | ||
route, | ||
() => { | ||
page.value = route.params.page as string; | ||
}, | ||
{ | ||
immediate: true, | ||
}, | ||
); | ||
</script> |
Oops, something went wrong.