Skip to content

Commit

Permalink
feat(frontend): 单节点原地升级支持跨版本 TencentBlueKing#8697
Browse files Browse the repository at this point in the history
  • Loading branch information
3octaves committed Jan 7, 2025
1 parent 19df630 commit bbde3d7
Show file tree
Hide file tree
Showing 9 changed files with 574 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export async function generateMysqlVersionLocalUpgradeCloneData(ticketData: Tick
moduleId: clusters[clusterId].db_module_id,
cloudId: clusters[clusterId].bk_cloud_id,
},
targetVersion: item.display_info.target_version,
targetPackage: item.pkg_id,
targetModule: item.display_info.target_module_name,
};
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ export interface LocalUpgrade extends DetailBase {
infos: {
pkg_id: number;
cluster_ids: number[];
new_db_module_id: number; // 单节点集群传递
display_info: {
cluster_type: string;
current_version: string;
current_package: string;
target_package: string;
charset: string;
current_module_name: string;
target_version: string; // 单节点集群传递
target_module_name: string; // 单节点集群传递
};
}[];
force: boolean;
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/services/source/mysqlToolbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import http from '@services/http';
export function queryMysqlHigherVersionPkgList(params: {
cluster_id: number;
higher_major_version?: boolean; // 代表是否跨版本升级, 默认false
higher_all_version?: boolean; // 单节点本地升级 获取可用的升级包
}) {
return http.post<
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@

import RenderCluster from '../RenderClusterWithRelateCluster.vue';
import RenderCurrentVersion from '../RenderCurrentVersion.vue';
import RenderTargetVersion from '../RenderTargetVersion.vue';

import RenderTargetVersion from './RenderTargetVersion.vue';

export interface IDataRow {
rowKey: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
import { getModules } from '@services/source/cmdb';
import { queryMysqlHigherVersionPkgList } from '@services/source/mysqlToolbox';

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

import TableEditSelect, { type IListItem } from '@views/db-manage/mysql/common/edit/Select.vue';

Expand Down Expand Up @@ -415,10 +415,7 @@
const url = router.resolve({
name: 'SelfServiceCreateDbModule',
params: {
type:
props.data!.clusterType === ClusterTypes.TENDBSINGLE
? TicketTypes.MYSQL_SINGLE_APPLY
: TicketTypes.MYSQL_HA_APPLY,
type: TicketTypes.MYSQL_HA_APPLY,
bk_biz_id: bizId,
},
query: {
Expand Down
Loading

0 comments on commit bbde3d7

Please sign in to comment.