diff options
author | 2020-02-26 17:47:04 +0200 | |
---|---|---|
committer | 2020-02-26 17:08:55 +0000 | |
commit | 71f6d98f1003dc9acc212e4132f03bb21c0b73c8 (patch) | |
tree | 8ffa7ce953617c621a81422861d01aacc10eb182 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts | |
parent | f627cd4269989b22edfcac044ea3a764fbc3ee68 (diff) |
adding view package tabs
Issue-ID: CCSDK-2120
Signed-off-by: ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I21af8c2b193b3fec4e5bc59e44b7a3b852f3b784
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts index c70109fc5..bce14c980 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts @@ -1,9 +1,10 @@ -import {Component, OnInit} from '@angular/core'; -import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop'; -import {PackageCreationStore} from '../package-creation.store'; -import {PackageCreationUtils} from '../package-creation.utils'; +import { Component, OnInit } from '@angular/core'; +import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop'; +import { PackageCreationStore } from '../package-creation.store'; +import { PackageCreationUtils } from '../package-creation.utils'; import 'ace-builds/src-noconflict/ace'; import 'ace-builds/webpack-resolver'; +import { PackageStore } from '../../configuration-dashboard/package.store'; @Component({ selector: 'app-scripts-tab', @@ -17,16 +18,28 @@ export class ScriptsTabComponent implements OnInit { public files: NgxFileDropEntry[] = []; private fileNames: Set<string> = new Set(); - constructor(private packageCreationStore: PackageCreationStore, private packageCreationUtils: PackageCreationUtils) { + constructor( + private packageCreationStore: PackageCreationStore, + private packageCreationUtils: PackageCreationUtils, + private packageStore: PackageStore + ) { + + } + + + ngOnInit() { this.packageCreationStore.state$.subscribe(cbaPackage => { if (cbaPackage.scripts && cbaPackage.scripts.files && cbaPackage.scripts.files.size > 0) { this.scriptsFiles = cbaPackage.scripts.files; } }); - } - - ngOnInit() { + this.packageStore.state$.subscribe(res => { + // this.scriptsFiles = + console.log('from scripts'); + console.log(res.scripts); + this.scriptsFiles = res.scripts.files; + }); } public dropped(files: NgxFileDropEntry[]) { |