Skip to content

Commit

Permalink
fix(frontend): tendbcluster sql模拟执行消息提示框跳转链接错误 TencentBlueKing#7507
Browse files Browse the repository at this point in the history
  • Loading branch information
hLinx committed Oct 23, 2024
1 parent 486f701 commit c1d1237
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions dbm-ui/frontend/src/hooks/useSQLTaskNotify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ import { useRequest } from 'vue-request';
import type UserSemanticTaskModel from '@services/model/sql-import/user-semantic-task';
import { getUserSemanticTasks } from '@services/source/mysqlSqlImport';

import { DBTypes } from '@common/const';

export const useSQLTaskNotify = () => {
const { t } = useI18n();
const router = useRouter();

const handleGoTaskLog = (taskData: UserSemanticTaskModel) => {
router.push({
name: 'MySQLExecute',
name: taskData.cluster_type === DBTypes.MYSQL ? 'MySQLExecute' : 'spiderSqlExecute',
params: {
step: 'log',
bizId: taskData.bk_biz_id,
},
query: {
rootId: taskData.root_id,
nodeId: taskData.node_id,
},
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
*/

export default class UserSemanticTasks {
root_id: string;
node_id: string;
created_at: string;
status: string;
bk_biz_id: number;
cluster_type: string;
created_at: string;
is_alter: boolean;
root_id: string;
status: string;

constructor(payload = {} as UserSemanticTasks) {
this.root_id = payload.root_id;
this.node_id = payload.node_id;
this.created_at = payload.created_at;
this.status = payload.status;
this.bk_biz_id = payload.bk_biz_id;
this.cluster_type = payload.cluster_type;
this.created_at = payload.created_at;
this.is_alter = payload.is_alter;
this.status = payload.status;
this.root_id = payload.root_id;
}

get isSucceeded() {
Expand Down

0 comments on commit c1d1237

Please sign in to comment.