Skip to content

Commit

Permalink
small feat: add database tips one user select 1 replicas (labring#4507)
Browse files Browse the repository at this point in the history
* small feat: add database tips one user select 1 replicas

* add i18n
  • Loading branch information
o0vO committed Jan 25, 2024
1 parent aec7020 commit 5492617
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"Auto Backup": "自动备份",
"Containers": "容器",
"Redis does not support backup at this time": "Redis 暂时不支持备份",
"The Single-node database is only suitable for development testing.": "单节点数据库仅适用开发测试",
"The multi-replica Redis includes High Availability (HA) nodes. Please note, the anticipated price already encompasses the cost for the HA nodes.": "Redis 多副本包含 HA 节点,请悉知,预估价格已包含 HA 节点费用",
"CronExpression": "循环周期",
"Monday": "周一",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Tip from '@/components/Tip';
import QuotaBox from './QuotaBox';
import { obj2Query } from '@/api/tools';
import { throttle } from 'lodash';
import { InfoOutlineIcon } from '@chakra-ui/icons';
import { InfoOutlineIcon, WarningIcon } from '@chakra-ui/icons';

const Form = ({
formHook,
Expand Down Expand Up @@ -332,6 +332,14 @@ const Form = ({
setValue('replicas', val || 1);
}}
/>
{getValues('replicas') === 1 && (
<Tip
ml={4}
icon={<WarningIcon />}
text="The Single-node database is only suitable for development testing."
size="sm"
/>
)}
{getValues('dbType') === DBTypeEnum.redis && getValues('replicas') > 1 && (
<Tip
ml={4}
Expand Down

0 comments on commit 5492617

Please sign in to comment.