diff --git a/dbm-ui/frontend/src/hooks/useSQLTaskNotify.tsx b/dbm-ui/frontend/src/hooks/useSQLTaskNotify.tsx index 21505d1bd7..978ed2de85 100644 --- a/dbm-ui/frontend/src/hooks/useSQLTaskNotify.tsx +++ b/dbm-ui/frontend/src/hooks/useSQLTaskNotify.tsx @@ -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, }, }); }; diff --git a/dbm-ui/frontend/src/services/model/sql-import/user-semantic-task.ts b/dbm-ui/frontend/src/services/model/sql-import/user-semantic-task.ts index e2cf9e95e4..ec2d9b7781 100644 --- a/dbm-ui/frontend/src/services/model/sql-import/user-semantic-task.ts +++ b/dbm-ui/frontend/src/services/model/sql-import/user-semantic-task.ts @@ -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() {