diff --git a/backend/utils/common/common.go b/backend/utils/common/common.go index 1f20a2681..d0def7382 100644 --- a/backend/utils/common/common.go +++ b/backend/utils/common/common.go @@ -230,13 +230,17 @@ func RemoveRepeatElement(a interface{}) (ret []interface{}) { } func LoadSizeUnit(value float64) string { - if value > 1048576 { - return fmt.Sprintf("%vM", value/1048576) + val := int64(value) + if val%1024 != 0 { + return fmt.Sprintf("%v", val) } - if value > 1024 { - return fmt.Sprintf("%vK", value/1024) + if val > 1048576 { + return fmt.Sprintf("%vM", val/1048576) } - return fmt.Sprintf("%v", value) + if val > 1024 { + return fmt.Sprintf("%vK", val/1024) + } + return fmt.Sprintf("%v", val) } func LoadSizeUnit2F(value float64) string { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 832264e7e..02dc6a62b 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -437,6 +437,11 @@ const message = { remote: 'Remote', remoteDB: 'Remote DB', createRemoteDB: 'Create Remote Server', + unBindRemoteDB: 'Unbind remote server', + unBindForce: 'Force unbind', + unBindForceHelper: 'Ignore all errors during the unbinding process to ensure the final operation is successful', + unBindRemoteHelper: + 'Unbinding the remote database will only remove the binding relationship and will not directly delete the remote database', editRemoteDB: 'Edit Remote Server', localDB: 'Local DB', address: 'DB address', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 1ab29e2b4..e73bc7d80 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -424,6 +424,10 @@ const message = { remote: '遠程', remoteDB: '遠程服務器', createRemoteDB: '添加遠程服務器', + unBindRemoteDB: '解綁遠程服務器', + unBindForce: '強制解綁', + unBindForceHelper: '忽略解綁過程中的所有錯誤,確保最終操作成功', + unBindRemoteHelper: '解綁遠程數據庫只會刪除綁定關係,不會直接刪除遠程數據庫', editRemoteDB: '編輯遠程服務器', localDB: '本地數據庫', address: '數據庫地址', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 5503b1f3a..da790c3f5 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -424,6 +424,10 @@ const message = { remote: '远程', remoteDB: '远程服务器', createRemoteDB: '添加远程服务器', + unBindRemoteDB: '解绑远程服务器', + unBindForce: '强制解绑', + unBindForceHelper: '忽略解绑过程中的所有错误,确保最终操作成功', + unBindRemoteHelper: '解绑远程数据库只会删除绑定关系,不会直接删除远程数据库', editRemoteDB: '编辑远程服务器', localDB: '本地数据库', address: '数据库地址', diff --git a/frontend/src/views/database/mysql/remote/delete/index.vue b/frontend/src/views/database/mysql/remote/delete/index.vue index 04f4b4a63..992c0617b 100644 --- a/frontend/src/views/database/mysql/remote/delete/index.vue +++ b/frontend/src/views/database/mysql/remote/delete/index.vue @@ -1,15 +1,15 @@