From c32660640176d6aa9b4f699e482953204f375b64 Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Mon, 7 Aug 2023 11:52:11 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=8B=B1=E6=96=87?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=EF=BC=8C=E5=A4=87=E4=BB=BD=E6=81=A2?=
=?UTF-8?q?=E5=A4=8D=E6=8C=89=E9=92=AE=E6=8D=A2=E8=A1=8C=E7=9A=84=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=20(#1860)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/utils/mysql/client/local.go | 1 +
backend/utils/mysql/client/remote.go | 1 +
frontend/src/components/app-status/index.vue | 16 +++++++++++-----
frontend/src/components/backup/index.vue | 2 +-
frontend/src/components/upload/index.vue | 4 ++--
frontend/src/views/database/mysql/index.vue | 2 +-
6 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/backend/utils/mysql/client/local.go b/backend/utils/mysql/client/local.go
index 54ed43b6..0b3aa591 100644
--- a/backend/utils/mysql/client/local.go
+++ b/backend/utils/mysql/client/local.go
@@ -179,6 +179,7 @@ func (r *Local) ChangeAccess(info AccessChangeInfo) error {
if info.Username == "root" {
info.OldPermission = "%"
info.Name = "*"
+ info.Password = r.Password
}
if info.Permission != info.OldPermission {
if err := r.Delete(DeleteInfo{
diff --git a/backend/utils/mysql/client/remote.go b/backend/utils/mysql/client/remote.go
index 6ae7b71a..131dff80 100644
--- a/backend/utils/mysql/client/remote.go
+++ b/backend/utils/mysql/client/remote.go
@@ -180,6 +180,7 @@ func (r *Remote) ChangeAccess(info AccessChangeInfo) error {
if info.Username == "root" {
info.OldPermission = "%"
info.Name = "*"
+ info.Password = r.Password
}
if info.Permission != info.OldPermission {
if err := r.Delete(DeleteInfo{
diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue
index e5ef6540..37ec0825 100644
--- a/frontend/src/components/app-status/index.vue
+++ b/frontend/src/components/app-status/index.vue
@@ -106,11 +106,17 @@ const goRouter = async (key: string) => {
};
const onCheck = async () => {
- const res = await CheckAppInstalled(key.value);
- data.value = res.data;
- em('isExist', res.data);
- operateReq.installId = res.data.appInstallId;
- refresh.value++;
+ await CheckAppInstalled(key.value)
+ .then((res) => {
+ data.value = res.data;
+ em('isExist', res.data);
+ operateReq.installId = res.data.appInstallId;
+ refresh.value++;
+ })
+ .catch(() => {
+ em('isExist', false);
+ refresh.value++;
+ });
};
const onOperate = async (operation: string) => {
diff --git a/frontend/src/components/backup/index.vue b/frontend/src/components/backup/index.vue
index 06728b23..787a01b5 100644
--- a/frontend/src/components/backup/index.vue
+++ b/frontend/src/components/backup/index.vue
@@ -41,7 +41,7 @@
show-overflow-tooltip
/>
-
+
diff --git a/frontend/src/components/upload/index.vue b/frontend/src/components/upload/index.vue
index 94267da5..ddc2900f 100644
--- a/frontend/src/components/upload/index.vue
+++ b/frontend/src/components/upload/index.vue
@@ -60,13 +60,13 @@
{{ computeSize(row.size) }}
-
+
{{ row.createdAt }}
{{ $t('database.create') }}
-
+
{{ $t('database.databaseConnInfo') }}