Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small feat: add database tips one user select 1 replicas #4507

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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