diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-08-08 14:57:40 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-08-14 20:55:55 +0000 |
commit | b339514619bbd5b29a085ea47a93cf30353a71e2 (patch) | |
tree | 228c0af652065012e50cd2d607f2d194971f1894 /src/app | |
parent | df3a86f7ec8434b945d7fab9a1c0fada27e0406a (diff) |
parameter-definition.service:removed hardcoded val
Moved the hardcoded values from parameter-definition service to
app-contants as variables.
Issue-ID: APPC-1054
Change-Id: Ib61aea5eec6d9c87405179711a347a18e58b2c4a
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts index 2c13e4f..a2b503a 100644 --- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts +++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.ts @@ -2,6 +2,8 @@ ============LICENSE_START========================================== =================================================================== Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + +Copyright (C) 2018 IBM. =================================================================== Unless otherwise specified, all software contained herein is licensed @@ -16,8 +18,6 @@ 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. - -ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ @@ -31,6 +31,7 @@ import {HttpUtilService} from '../../../shared/services/httpUtil/http-util.servi import {UtilityService} from '../../../shared/services/utilityService/utility.service'; import {NotificationsService} from 'angular2-notifications'; import 'rxjs/add/operator/map'; +import { appConstants } from '../../../../constants/app-constants'; let YAML = require('yamljs'); @@ -429,7 +430,7 @@ export class ParameterDefinitionService { public processKeyFile(fileName, result) { this.myKeyFileName = fileName; if (!this.myKeyFileName.endsWith('.txt')) { - this.nService.error('Error', 'Uploaded file is not a TXT file'); + this.nService.error(appConstants.notifications.titles.error, appConstants.errors.notTxtFileError); } this.parameterDefinitionMap = {}; var rows = result.split(/\r\n|\r|\n/g); @@ -463,7 +464,7 @@ export class ParameterDefinitionService { public processPDfile(fileName, result) { this.myPdFileName = fileName; if (!this.myPdFileName.endsWith('.yaml')) { - this.nService.error('Error', 'Uploaded file is not a YAML file'); + this.nService.error(appConstants.notifications.titles.error, appConstants.errors.notYAMLFileError); } var pdObject = YAML.parse(result); let fileModel = pdObject['vnf-parameter-list']; |