Skip to content

Commit

Permalink
2020-11-20 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonYoung Oh committed Nov 20, 2020
1 parent 34fe1a8 commit 0e7feed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/designer/k8s-modeling/KubeModelingDesigner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1126,11 +1126,6 @@
}
yaml_text = lines.join('\n')
yaml_text = yaml_text.replace(/ null/g, ' ')
yaml_text = yaml_text.replace(/\"/g, '')
// PersistentVolumeClaim의 storageClassName 값이 없으면 "" 처리
if(yaml_text.includes('PersistentVolumeClaim') && yaml_text.includes('storageClassName: \n')) {
yaml_text = yaml_text.replace('storageClassName: \n', 'storageClassName: "" \n')
}
return yaml_text
},
async generateZip() {
Expand Down Expand Up @@ -1330,6 +1325,8 @@
if(lastChar == 's') {
type += 'es'
} else if(lastChar == 'y' && type != 'gateway') {
type = type.slice(0,-1) + 'ies'
} else {
type += 's'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<v-card-text>
<v-text-field
label="Name"
:rules="[rules.required, rules.char]"
v-model="value.object.metadata.name"
></v-text-field>
<number-field
Expand Down Expand Up @@ -117,6 +118,12 @@
activeTab: 0,
tabItems: [ "status", "property" ],
isYamlEdit: false,
rules: {
required: value => !!value || 'Required',
char: value => {
return /^[a-z0-9\-]*$/.test(value) || 'Invalid Name'
},
}
}
},
watch: {
Expand Down

0 comments on commit 0e7feed

Please sign in to comment.