diff options
Diffstat (limited to 'catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts')
-rw-r--r-- | catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts b/catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts index 476af4ada9..f5962a2f79 100644 --- a/catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts +++ b/catalog-ui/src/app/view-models/forms/env-parameters-form/env-parameters-form.ts @@ -1,3 +1,23 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + 'use strict'; import {ValidationUtils} from "app/utils"; import {ArtifactModel, HeatParameterModel, Component} from "app/models"; @@ -96,10 +116,10 @@ export class EnvParametersFormViewModel { this.$scope.isLoading = true; this.artifact.heatParameters = this.$scope.heatParameters; this.artifact.heatParameters.forEach((parameter:any):void => { - /* if ("" === parameter.currentValue) { - parameter.currentValue = null; - }else */ - if (!parameter.currentValue && parameter.defaultValue) { + if ("" === parameter.currentValue) { + //[Bug 154465] - Update and erase current value field in Env parameters form return empty String ("") instead of null. + parameter.currentValue = null; + }else if (!parameter.currentValue && parameter.defaultValue) { parameter.currentValue = parameter.defaultValue; } }); |