From 3bc6917ecd7c3fb22c8a65d5279179fc2bb4d6aa Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Fri, 21 Jun 2019 16:20:00 +0530 Subject: Replace windows alert with Notification component Removed windows.alert across files and replaced it with notification component Issue-ID: CCSDK-1381 Change-Id: If521c92544a1639b2fafb07163163844817c1c7a Signed-off-by: Arundathi Patil --- .../blueprint/select-template/metadata/metadata.component.ts | 6 ++++-- .../search-template/search-template.component.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts index 609aacae7..c7f6dec67 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts @@ -29,6 +29,7 @@ import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model'; import { IMetaData } from '../../../../common/core/store/models/metadata.model'; import { SetBlueprintState } from 'src/app/common/core/store/actions/blueprint.action'; +import { LoaderService } from '../../../../common/core/services/loader.service'; @Component({ selector: 'app-metadata', @@ -48,7 +49,7 @@ export class MetadataComponent implements OnInit { uploadedFileName: string; entryDefinition: string; - constructor(private formBuilder: FormBuilder, private store: Store) { + constructor(private formBuilder: FormBuilder, private store: Store, private loader: LoaderService) { this.bpState = this.store.select('blueprint'); this.CBAMetadataForm = this.formBuilder.group({ template_author: ['', Validators.required], @@ -96,6 +97,7 @@ export class MetadataComponent implements OnInit { } UploadMetadata() { + this.loader.showLoader(); this.metadata = Object.assign({}, this.CBAMetadataForm.value); this.blueprint.metadata = this.metadata; @@ -113,6 +115,6 @@ export class MetadataComponent implements OnInit { entryDefinition: this.entryDefinition } this.store.dispatch(new SetBlueprintState(blueprintState)); + this.loader.hideLoader(); } - } \ No newline at end of file diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts index 92003c919..1221e8f2b 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts @@ -30,6 +30,7 @@ import { IAppState } from '../../../../common/core/store/state/app.state'; import { LoadBlueprintSuccess, SET_BLUEPRINT_STATE, SetBlueprintState } from '../../../../common/core/store/actions/blueprint.action'; import { json } from 'd3'; import { SortPipe } from '../../../../common/shared/pipes/sort.pipe'; +import { LoaderService } from '../../../../common/core/services/loader.service'; @Component({ selector: 'app-search-template', @@ -56,7 +57,7 @@ export class SearchTemplateComponent implements OnInit { private blueprintName: string; private entryDefinition: string; - constructor(private store: Store) { } + constructor(private store: Store, private loader: LoaderService) { } ngOnInit() { } @@ -68,7 +69,8 @@ export class SearchTemplateComponent implements OnInit { this.zipFile.files = {}; this.zipFile.loadAsync(this.file) .then((zip) => { - if(zip) { + if(zip) { + this.loader.showLoader(); this.buildFileViewData(zip); } }); @@ -157,8 +159,8 @@ export class SearchTemplateComponent implements OnInit { } } }); - }); - console.log('tree', tree); + }); + this.loader.hideLoader(); return tree; } -- cgit 1.2.3-korg