mirror of https://github.com/portainer/portainer
fix(frontend): application edit page initializes the overridenKeyType of new added configuration key to NONE so that the user can select how to load it (#4548) (#4593)
Co-authored-by: Simon Meng <simon.meng@portainer.io>pull/4521/head
parent
eab828279e
commit
cf508065ec
|
@ -175,7 +175,10 @@ class KubernetesApplicationHelper {
|
|||
item.OverridenKeys = _.map(keys, (k) => {
|
||||
const fvKey = new KubernetesApplicationConfigurationFormValueOverridenKey();
|
||||
fvKey.Key = k.Key;
|
||||
if (index < k.EnvCount) {
|
||||
if (!k.Count) {
|
||||
// !k.Count indicates k.Key is new added to the configuration and has not been loaded to the application yet
|
||||
fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.NONE;
|
||||
} else if (index < k.EnvCount) {
|
||||
fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.ENVIRONMENT;
|
||||
} else {
|
||||
fvKey.Type = KubernetesApplicationConfigurationFormValueOverridenKeyTypes.FILESYSTEM;
|
||||
|
|
|
@ -35,6 +35,7 @@ export class KubernetesApplicationFormValues {
|
|||
}
|
||||
|
||||
export const KubernetesApplicationConfigurationFormValueOverridenKeyTypes = Object.freeze({
|
||||
NONE: 0,
|
||||
ENVIRONMENT: 1,
|
||||
FILESYSTEM: 2,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue