From a72ec2d375ed4d4ecc420f786e5d9e1898816a19 Mon Sep 17 00:00:00 2001 From: limbo <43649186+HUAHUAI23@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:56:42 +0800 Subject: [PATCH] chore(web&server): make the number of database replicas can be changed (#2000) * fix(web): adjust transparency of the overlay for application startup logs * style(web): adjust transparency of the overlay for application startup logs * chore(server&web) the number of database copies can be changed * chore(server&web) the number of database copies can be changed Co-authored-by: HUAHUAI23 --- server/src/application/application.controller.ts | 6 ++++-- web/src/pages/app/mods/StatusBar/LogsModal/initLog.tsx | 2 +- .../mods/CreateAppModal/DatabaseBundleControl/index.tsx | 5 ++++- web/src/pages/home/mods/CreateAppModal/index.tsx | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/server/src/application/application.controller.ts b/server/src/application/application.controller.ts index fb5fd0b008..5839ee5f95 100644 --- a/server/src/application/application.controller.ts +++ b/server/src/application/application.controller.ts @@ -371,10 +371,12 @@ export class ApplicationController { if ( dto.dedicatedDatabase?.replicas && origin.resource.dedicatedDatabase?.replicas && - dto.dedicatedDatabase?.replicas !== + dto.dedicatedDatabase?.replicas < origin.resource.dedicatedDatabase?.replicas ) { - return ResponseUtil.error('cannot change database replicas') + return ResponseUtil.error( + 'To reduce the number of database replicas, please contact customer support.', + ) } // check if a user exceeds the resource limit in a region diff --git a/web/src/pages/app/mods/StatusBar/LogsModal/initLog.tsx b/web/src/pages/app/mods/StatusBar/LogsModal/initLog.tsx index e7d71378e8..176b11fa46 100644 --- a/web/src/pages/app/mods/StatusBar/LogsModal/initLog.tsx +++ b/web/src/pages/app/mods/StatusBar/LogsModal/initLog.tsx @@ -112,7 +112,7 @@ export default function InitLog() {
{ diff --git a/web/src/pages/home/mods/CreateAppModal/index.tsx b/web/src/pages/home/mods/CreateAppModal/index.tsx index 36d66e239d..bca061fb5a 100644 --- a/web/src/pages/home/mods/CreateAppModal/index.tsx +++ b/web/src/pages/home/mods/CreateAppModal/index.tsx @@ -352,6 +352,7 @@ const CreateAppModal = (props: { { setBundle((prev) => { const v1 = _.cloneDeep(_.set(prev, k, v));