-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d095cc
commit 82ad589
Showing
18 changed files
with
178 additions
and
78 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
55 changes: 55 additions & 0 deletions
55
dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/apply.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,55 @@ | ||
/* | ||
* 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 { RedisDetails } from '@services/model/ticket/details/redis'; | ||
import TicketModel from '@services/model/ticket/ticket'; | ||
|
||
import { TicketTypes } from '@common/const'; | ||
|
||
// Redis 集群部署 | ||
export function generateRedisApplyCloneData(ticketData: TicketModel<RedisDetails>) { | ||
const { details } = ticketData; | ||
return Promise.resolve({ | ||
bk_biz_id: ticketData.bk_biz_id, | ||
ticket_type: TicketTypes.REDIS_CLUSTER_APPLY, | ||
remark: ticketData.remark, | ||
details: { | ||
bk_cloud_id: details.bk_cloud_id, | ||
db_app_abbr: details.db_app_abbr, | ||
proxy_port: details.proxy_port, | ||
cluster_name: details.cluster_name, | ||
cluster_alias: details.cluster_alias, | ||
cluster_type: details.cluster_type, | ||
city_code: details.city_code, | ||
db_version: details.db_version, | ||
cap_key: details.cap_key, | ||
ip_source: details.ip_source, | ||
disaster_tolerance_level: details.disaster_tolerance_level, | ||
proxy_pwd: details.proxy_pwd, | ||
nodes: details.nodes, | ||
resource_spec: { | ||
proxy: { | ||
spec_id: details.resource_spec.proxy.spec_id, | ||
count: details.resource_spec.proxy.count, | ||
}, | ||
backend_group: { | ||
count: details.resource_spec.backend_group.count, | ||
spec_id: details.resource_spec.backend_group.spec_id, | ||
capacity: '', | ||
future_capacity: '', | ||
affinity: details.resource_spec.backend_group.affinity, | ||
location_spec: details.resource_spec.backend_group.location_spec, | ||
}, | ||
}, | ||
}, | ||
}); | ||
} |
1 change: 1 addition & 0 deletions
1
dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/index.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
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
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
Oops, something went wrong.