Skip to content

Commit

Permalink
feat: 模板文件多个资源模块表单添加默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
LidolLxf committed Dec 27, 2024
1 parent 86d5f22 commit 27e2644
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ properties:
accessModes:
title: {{ i18n "访问模式" .lang }}
type: array
default: ["ReadWriteOnce"]
items:
type: string
ui:component:
Expand All @@ -99,6 +100,7 @@ properties:
message: {{ i18n "至少选择一个 AccessMode" .lang }}
scName:
title: {{ i18n "存储类名称" .lang }}
default: fast-storage
type: string
storageSize:
title: {{ i18n "容量" .lang }}
Expand All @@ -113,6 +115,7 @@ properties:
localPath:
title: Path
type: string
default: /tmp/data
ui:rules:
- validator: "{{`{{`}} $self.getValue('spec.type') !== 'local' || $self.value {{`}}`}}"
message: {{ i18n "值不能为空" .lang }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ properties:
accessModes:
title: {{ i18n "访问模式" .lang }}
type: array
default: ["ReadWriteOnce"]
items:
type: string
ui:component:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ref:
resName:
title: {{ i18n "资源名称" .lang }}
type: string
default: deployment-test
ui:rules:
- required
minReplicas:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ruleConf:
path:
title: {{ i18n "路径" .lang }}
type: string
default: /testpath
ui:rules:
- required
- maxLength128
Expand All @@ -67,11 +68,13 @@ ruleConf:
targetSVC:
title: {{ i18n "目标 Service" .lang }}
type: string
default: test
ui:rules:
- required
port:
title: {{ i18n "端口" .lang }}
type: integer
default: 80
ui:component:
props:
min: 1
Expand Down Expand Up @@ -136,6 +139,7 @@ network:
existLBID:
title: "CLB ID"
type: string
default: lb-c5xxxxd6
ui:component:
props:
placeholder: {{ i18n "例如:lb-c5xxxxd6" .lang | quote }}
Expand Down Expand Up @@ -337,6 +341,7 @@ portConf:
port:
title: {{ i18n "监听端口" .lang }}
type: integer
default: 80
ui:component:
props:
min: 1
Expand All @@ -360,6 +365,7 @@ portConf:
targetPort:
title: {{ i18n "目标端口" .lang }}
type: string
default: "80"
ui:rules:
- validator: "{{`{{`}} $self.value {{`}}`}}"
message: {{ i18n "值不能为空" .lang }}
Expand Down Expand Up @@ -399,10 +405,6 @@ portConf:
selector:
title: {{ i18n "选择器" .lang }}
type: object
required:
- associatedResources
- associatedApplications
- labels
properties:
associatedResources:
title: {{ i18n "关联资源" .lang }}
Expand Down Expand Up @@ -437,8 +439,6 @@ selector:
value: ""
actions:
- "{{`{{`}} $loadDataSource {{`}}`}}"
ui:rules:
- required
labels:
title: {{ i18n "标签选择器" .lang }}
type: array
Expand Down

0 comments on commit 27e2644

Please sign in to comment.