Skip to content

Commit

Permalink
fix(frontend): mysql、spider语法检测补充cluster_type #6723
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia committed Sep 6, 2024
1 parent b32e0be commit e30d452
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
v-for="(item, index) in modelValue"
:key="item.rowKey"
ref="rowRef"
:cluster-type="clusterType"
:cluster-version-list="clusterVersionList"
:data="item"
:removeable="modelValue.length < 2"
Expand All @@ -41,6 +42,7 @@

interface Props {
clusterVersionList: string[];
clusterType: 'mysql' | 'tendbcluster';
}

defineProps<Props>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
v-model="modelValue"
v-model:importMode="importMode"
v-model:is-show="isShowSql"
:cluster-type="clusterType"
:cluster-version-list="clusterVersionList">
<template #header>
<span style="color: #63656e; font-size: 12px; font-weight: normal; margin-left: 30px">
Expand Down Expand Up @@ -58,6 +59,7 @@
clusterVersionList: string[];
dbNames: string[];
ignoreDbNames: string[];
clusterType: 'mysql' | 'tendbcluster';
}
interface Expose {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
:is="renderCom"
ref="fileRef"
v-model="localModelValue"
:cluster-type="clusterType"
v-bind="attrs"
:cluster-version-list="clusterVersionList"
@grammar-check="handleGrammarCheck" />
Expand Down Expand Up @@ -73,6 +74,7 @@
interface Props {
clusterVersionList: string[];
clusterType: 'mysql' | 'tendbcluster';
}
defineProps<Props>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

interface Props {
clusterVersionList: string[];
clusterType: 'mysql' | 'tendbcluster';
}

interface Emits {
Expand Down Expand Up @@ -224,6 +225,8 @@
params.append(`versions[${index}]`, version);
});

params.append('cluster_type', props.clusterType);

grammarCheck(params)
.then((data) => {
const lastUploadFileDataMap = { ...uploadFileDataMap.value };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@

interface Props {
clusterVersionList: string[];
clusterType: 'mysql' | 'tendbcluster';
}

interface Emits {
Expand Down Expand Up @@ -228,6 +229,7 @@
props.clusterVersionList.forEach((version, index) => {
params.append(`versions[${index}]`, version);
});
params.append('cluster_type', props.clusterType);

grammarCheck(params)
.then((data) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
ref="sqlFielsRef"
v-model="localSqlFiles"
v-model:importMode="localImportMode"
:cluster-type="clusterType"
:cluster-version-list="clusterVersionList"
:db-names="localDbnames"
:ignore-db-names="localIgnoreDbnames" />
Expand Down Expand Up @@ -75,6 +76,7 @@
data: IDataRow;
removeable: boolean;
clusterVersionList: string[];
clusterType: 'mysql' | 'tendbcluster';
}
interface Emits {
(e: 'add' | 'change', params: IDataRow): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
:cluster-type-list="[ClusterTypes.TENDBHA, ClusterTypes.TENDBSINGLE]" />
<ExecuteObjects
v-model="formData.execute_objects"
cluster-type="mysql"
:cluster-version-list="clusterVersionList"
style="margin-top: 16px" />
<RenderCharset v-model="formData.charset" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
:cluster-type-list="[ClusterTypes.TENDBCLUSTER]" />
<ExecuteObjects
v-model="formData.execute_objects"
cluster-type="tendbcluster"
:cluster-version-list="clusterVersionList"
style="margin-top: 16px" />
<RenderCharset v-model="formData.charset" />
Expand Down

0 comments on commit e30d452

Please sign in to comment.