From c7e19491fea69bc8fb4f6d8fb2af07228de281f4 Mon Sep 17 00:00:00 2001 From: xusongfu Date: Fri, 9 Dec 2022 14:53:31 +0800 Subject: [PATCH] fix: support name validator and fix placeholder of magnum service 1. support validator of cluster name 2. fix placeholder of cluster and template Change-Id: I5901ab64a9f45df8f0ca91ba883e2b225ddda000 --- src/locales/en.json | 2 ++ src/locales/zh.json | 2 ++ .../ClusterTemplates/actions/StepCreate/StepInfo/index.jsx | 2 +- .../Clusters/actions/StepCreate/StepInfo/index.jsx | 5 +++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 45274183..495293b1 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1729,6 +1729,8 @@ "Please input at least 2 characters.": "Please input at least 2 characters.", "Please input auth key": "Please input auth key", "Please input cipher": "Please input cipher", + "Please input cluster name": "Please input cluster name", + "Please input cluster template name": "Please input cluster template name", "Please input file name": "Please input file name", "Please input ipv4": "Please input ipv4", "Please input ipv6": "Please input ipv6", diff --git a/src/locales/zh.json b/src/locales/zh.json index ae5280a0..cc504761 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -1729,6 +1729,8 @@ "Please input at least 2 characters.": "请输入至少2个字符", "Please input auth key": "请输入密钥", "Please input cipher": "请输入cipher", + "Please input cluster name": "请输入集群名称", + "Please input cluster template name": "请输入集群模板名称", "Please input file name": "请输入文件名称", "Please input ipv4": "请输入IPV4", "Please input ipv6": "请输入IPV6", diff --git a/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx b/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx index cfab66c6..95999edd 100644 --- a/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx +++ b/src/pages/container-infra/containers/ClusterTemplates/actions/StepCreate/StepInfo/index.jsx @@ -64,7 +64,7 @@ export class StepInfo extends Base { name: 'name', label: t('Cluster Template Name'), type: 'input', - placeholder: t('Cluster Template Name'), + placeholder: t('Please input cluster template name'), required: true, }, { diff --git a/src/pages/container-infra/containers/Clusters/actions/StepCreate/StepInfo/index.jsx b/src/pages/container-infra/containers/Clusters/actions/StepCreate/StepInfo/index.jsx index 70c53430..4ce824bf 100644 --- a/src/pages/container-infra/containers/Clusters/actions/StepCreate/StepInfo/index.jsx +++ b/src/pages/container-infra/containers/Clusters/actions/StepCreate/StepInfo/index.jsx @@ -63,8 +63,9 @@ export class StepInfo extends Base { { name: 'name', label: t('Cluster Name'), - type: 'input', - placeholder: t('Cluster Name'), + type: 'input-name', + placeholder: t('Please input cluster name'), + isInstance: true, required: true, }, {