diff --git a/backend/constant/errs.go b/backend/constant/errs.go index c1b3dfff5..59ba65c8b 100644 --- a/backend/constant/errs.go +++ b/backend/constant/errs.go @@ -47,6 +47,7 @@ var ( ErrXpackNotFound = "ErrXpackNotFound" ErrXpackNotActive = "ErrXpackNotActive" ErrXpackLost = "ErrXpackLost" + ErrXpackTimeout = "ErrXpackTimeout" ErrXpackOutOfDate = "ErrXpackOutOfDate" ) diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index f14eb95b7..ae7c6bc68 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -159,8 +159,8 @@ const isDB = () => { return key.value === 'mysql' || key.value === 'mariadb' || key.value === 'postgresql'; }; -const onCheck = async () => { - await CheckAppInstalled(key.value, name.value) +const onCheck = async (key: any, name: any) => { + await CheckAppInstalled(key, name) .then((res) => { data.value = res.data; em('isExist', res.data); @@ -206,7 +206,7 @@ const onOperate = async (operation: string) => { .then(() => { em('update:loading', false); MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); - onCheck(); + onCheck(key.value, name.value); em('after'); }) .catch(() => { @@ -234,7 +234,7 @@ const getTitle = (key: string) => { onMounted(() => { key.value = props.appKey; name.value = props.appName; - onCheck(); + onCheck(key.value, name.value); }); defineExpose({ diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 5f551e245..4c773c9a0 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -388,15 +388,13 @@ const onSetting = async () => { }; const changeDatabase = async () => { - if (currentDB.value.from === 'local') { - appStatusRef.value.onCheck(); - } for (const item of dbOptionsLocal.value) { if (item.database == currentDBName.value) { currentDB.value = item; appKey.value = item.type; appName.value = item.database; search(); + appStatusRef.value?.onCheck(appKey.value, appName.value); return; } } diff --git a/frontend/src/views/database/postgresql/index.vue b/frontend/src/views/database/postgresql/index.vue index eceea68b1..b2f5761bc 100644 --- a/frontend/src/views/database/postgresql/index.vue +++ b/frontend/src/views/database/postgresql/index.vue @@ -351,15 +351,13 @@ const onSetting = async () => { }; const changeDatabase = async () => { - if (currentDB.value.from === 'local') { - appStatusRef.value.onCheck(); - } for (const item of dbOptionsLocal.value) { if (item.database == currentDBName.value) { currentDB.value = item; appKey.value = item.type; appName.value = item.database; search(); + appStatusRef.value?.onCheck(appKey.value, appName.value); return; } } diff --git a/frontend/src/views/database/redis/index.vue b/frontend/src/views/database/redis/index.vue index 32b3b3d73..5c33325e4 100644 --- a/frontend/src/views/database/redis/index.vue +++ b/frontend/src/views/database/redis/index.vue @@ -223,14 +223,12 @@ const goRouter = async (target: string) => { }; const changeDatabase = async () => { - if (currentDB.value.from === 'local') { - appStatusRef.value.onCheck(); - } for (const item of dbOptionsLocal.value) { if (item.database == currentDBName.value) { currentDB.value = item; appKey.value = item.type; appName.value = item.database; + appStatusRef.value?.onCheck(appKey.value, appName.value); reOpenTerminal(); return; }