mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 05:49:40 +02:00
Co-authored-by: Simon Meng <simon.meng@portainer.io>
This commit is contained in:
parent
ccf6babc02
commit
f2faccdb10
3 changed files with 20 additions and 2 deletions
|
@ -25,7 +25,8 @@ class KubernetesConfigurationDataController {
|
|||
}
|
||||
|
||||
this.state.duplicateKeys = KubernetesFormValidationHelper.getDuplicates(_.map(this.formValues.Data, (data) => data.Key));
|
||||
this.isValid = Object.keys(this.state.duplicateKeys).length === 0;
|
||||
this.state.invalidKeys = KubernetesFormValidationHelper.getInvalidKeys(_.map(this.formValues.Data, (data) => data.Key));
|
||||
this.isValid = Object.keys(this.state.duplicateKeys).length === 0 && Object.keys(this.state.invalidKeys).length === 0;
|
||||
}
|
||||
|
||||
addEntry() {
|
||||
|
@ -94,6 +95,7 @@ class KubernetesConfigurationDataController {
|
|||
$onInit() {
|
||||
this.state = {
|
||||
duplicateKeys: {},
|
||||
invalidKeys: {},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue