aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard
diff options
context:
space:
mode:
authorAhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>2020-06-23 17:28:21 +0200
committerAhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>2020-06-23 17:28:21 +0200
commit3cda867a2c5e86c3ba7173b456a2db19daf49036 (patch)
treebedcaa310932fcec84bc9693b5b83e37fe9746fa /cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard
parent7434214a2126de38769b35896d8e776aeb8fded3 (diff)
Fix "npm run build" errors
Issue-ID: CCSDK-2474 Signed-off-by: AhmedEldeeb50 <ahmed.eldeeb.ext@orange.com> Change-Id: I1577ea0f576f4000c77f94d52d22d4c2212525b2
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html66
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts140
2 files changed, 115 insertions, 91 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
index bf6bf1251..18c9277eb 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
@@ -8,7 +8,7 @@
<ul class="breadcrumb-header">
<li><a routerLink="/packages">CBA Packages</a></li>
<i class="fa fa-angle-right ml-2 mr-2"></i>
- <li>{{viewedPackage.artifactName}}</li>
+ <li>{{viewedPackage.artifactName}}</li>
</ul>
</h2>
<div class="col">
@@ -22,8 +22,8 @@
<div class="container">
<div class="creat-action-container">
- <a class="action-button save" (click)="editBluePrint()" >
- <i class="icon-save-sm" aria-hidden="true" ></i>
+ <a class="action-button save" (click)="editBluePrint()">
+ <i class="icon-save-sm" aria-hidden="true"></i>
<span>Save</span>
</a>
<a href="#" class="action-button" (click)="goBacktoDashboard()">
@@ -43,7 +43,7 @@
</a>
<a class="action-button"
- (click)="downloadPackage(viewedPackage.artifactName,viewedPackage.artifactVersion)">
+ (click)="downloadPackage(viewedPackage.artifactName,viewedPackage.artifactVersion)">
<i class="icon-download" aria-hidden="true"></i>
<span>Download</span>
</a>
@@ -83,19 +83,19 @@
<ul class="package-contributers">
<li>
<button type="button" class="border-fade" data-toggle="tooltip"
- data-placement="bottom" title="User name">
+ data-placement="bottom" title="User name">
<img src="/assets/img/img-user1.jpeg">
</button>
</li>
<li>
<button type="button" data-toggle="tooltip" data-placement="bottom"
- title="User name">
+ title="User name">
<img src="/assets/img/img-user2.jpg">
</button>
</li>
<li>
<button type="button" data-toggle="tooltip" data-placement="bottom"
- title="User name">
+ title="User name">
<img src="/assets/img/img-user3.jpg">
</button>
</li>
@@ -138,7 +138,8 @@
<div class="row">
<!--Custom Action-->
<div class="col-3 d-flex">
- <a class="d-flex" data-target="#carouselExampleIndicators"
+ <a class="d-flex"
+ data-target="#carouselExampleIndicators"
data-slide-to="1">
<div class="card actionType custom">
<div class="card-body">
@@ -155,7 +156,8 @@
</div>
<!--Default Action-->
<div class="col-3 d-flex">
- <a class="d-flex" data-target="#carouselExampleIndicators"
+ <a class="d-flex"
+ data-target="#carouselExampleIndicators"
data-slide-to="2">
<div class="card actionType default">
<div class="card-body">
@@ -173,7 +175,8 @@
</div>
<!--Recent Action-->
<div class="col-3 d-flex">
- <a class="d-flex" data-target="#carouselExampleIndicators"
+ <a class="d-flex"
+ data-target="#carouselExampleIndicators"
data-slide-to="3">
<div class="card actionType recent">
<div class="card-body">
@@ -192,7 +195,8 @@
</div>
<!--Import Action-->
<div class="col-3 d-flex">
- <a class="d-flex" data-target="#carouselExampleIndicators"
+ <a class="d-flex"
+ data-target="#carouselExampleIndicators"
data-slide-to="4">
<div class="card actionType import">
<div class="card-body">
@@ -209,7 +213,9 @@
</div>
<div class="row">
<div class="col text-center">
- <button class="btn skip-btn" (click)="goToDesignerMode(viewedPackage.id)">Skip to Designer Canvas</button>
+ <button class="btn skip-btn"
+ (click)="goToDesignerMode(viewedPackage.id)">Skip
+ to Designer Canvas</button>
</div>
</div>
</div>
@@ -220,9 +226,12 @@
class="icon-action-back"></i></button>
<h1>Create Custom Action</h1>
<div class="form-group text-center">
- <input type="text" [(ngModel)]="customActionName" class="form-control customAction"
+ <input type="text" [(ngModel)]="customActionName"
+ class="form-control customAction"
placeholder="Type Action Name" autofocus>
- <button type="button" (click)="goToDesignerMode(viewedPackage.id)" class="btn submit">Start</button>
+ <button type="button"
+ (click)="goToDesignerMode(viewedPackage.id)"
+ class="btn submit">Start</button>
</div>
</div>
@@ -392,7 +401,8 @@
<div class="row">
<div class="col text-center">
<p class="selectedActions">0 selected</p>
- <button type="button" (click)="goToDesignerMode(viewedPackage.id)"
+ <button type="button"
+ (click)="goToDesignerMode(viewedPackage.id)"
class="btn submit">Start</button>
</div>
</div>
@@ -661,17 +671,17 @@
<div class="col">
<div class="nav nav-tabs " id="nav-tab" role="tablist">
<a class="nav-item nav-link active complete" id="nav-metadata-tab" data-toggle="tab"
- href="#nav-metadata" role="tab" aria-controls="nav-metadata" aria-selected="true"
- autofocus #nameit (focusout)="saveMetaData()">METADATA</a>
+ href="#nav-metadata" role="tab" aria-controls="nav-metadata" aria-selected="true"
+ autofocus #nameit (focusout)="saveMetaData()">METADATA</a>
<a class="nav-item nav-link" id="nav-template-tab" data-toggle="tab" href="#nav-template"
- role="tab" aria-controls="nav-template" aria-selected="false">TEMPLATE & MAPPING</a>
+ role="tab" aria-controls="nav-template" aria-selected="false">TEMPLATE & MAPPING</a>
<a class="nav-item nav-link" id="nav-scripts-tab" data-toggle="tab" href="#nav-scripts"
- role="tab" aria-controls="nav-scripts" aria-selected="false">SCRIPTS</a>
+ role="tab" aria-controls="nav-scripts" aria-selected="false">SCRIPTS</a>
<a class="nav-item nav-link" id="nav-imports-tab" data-toggle="tab" href="#nav-imports"
- role="tab" aria-controls="nav-imports" aria-selected="false">DEFINITIONS</a>
+ role="tab" aria-controls="nav-imports" aria-selected="false">DEFINITIONS</a>
<a class="nav-item nav-link" id="nav-authentication-tab" data-toggle="tab"
- href="#nav-authentication" role="tab" aria-controls="nav-authentication"
- aria-selected="false">EXTERNAL SYSTEM AUTHENTICATION PROPERTIES</a>
+ href="#nav-authentication" role="tab" aria-controls="nav-authentication"
+ aria-selected="false">EXTERNAL SYSTEM AUTHENTICATION PROPERTIES</a>
</div>
</div>
@@ -680,24 +690,24 @@
<div class="col">
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-metadata" role="tabpanel"
- aria-labelledby="nav-metadata-tab">
+ aria-labelledby="nav-metadata-tab">
<app-metadata-tab></app-metadata-tab>
</div>
<div class="tab-pane fade" id="nav-template" role="tabpanel"
- aria-labelledby="nav-template-tab">
+ aria-labelledby="nav-template-tab">
<app-template-mapping></app-template-mapping>
</div>
<div class="tab-pane fade" id="nav-scripts" role="tabpanel"
- aria-labelledby="nav-scripts-tab">
+ aria-labelledby="nav-scripts-tab">
<app-scripts-tab></app-scripts-tab>
</div>
<div class="tab-pane fade" id="nav-imports" role="tabpanel"
- aria-labelledby="nav-imports-tab">
+ aria-labelledby="nav-imports-tab">
<app-imports-tab></app-imports-tab>
</div>
<div class="tab-pane fade" id="nav-authentication" role="tabpanel"
- aria-labelledby="nav-authentication-tab">
+ aria-labelledby="nav-authentication-tab">
<div class="card creat-card">
<div class="editor-container">
<app-dsl-definitions-tab></app-dsl-definitions-tab>
@@ -710,4 +720,4 @@
</div>
</div>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
index 471b25383..0ff8d952f 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
@@ -1,20 +1,21 @@
-import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
-import {ActivatedRoute, Router} from '@angular/router';
-import {BluePrintDetailModel} from '../model/BluePrint.detail.model';
-import {PackageCreationStore} from '../package-creation/package-creation.store';
-import {FilesContent, FolderNodeElement, MetaDataTabModel} from '../package-creation/mapping-models/metadata/MetaDataTab.model';
-import {MetadataTabComponent} from '../package-creation/metadata-tab/metadata-tab.component';
+import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
+import { PackageCreationStore } from '../package-creation/package-creation.store';
+import { FilesContent, FolderNodeElement, MetaDataTabModel } from '../package-creation/mapping-models/metadata/MetaDataTab.model';
+import { MetadataTabComponent } from '../package-creation/metadata-tab/metadata-tab.component';
import * as JSZip from 'jszip';
-import {ConfigurationDashboardService} from './configuration-dashboard.service';
-import {VlbDefinition} from '../package-creation/mapping-models/definitions/VlbDefinition';
-import {DslDefinition} from '../package-creation/mapping-models/CBAPacakge.model';
-import {PackageCreationUtils} from '../package-creation/package-creation.utils';
-import {PackageCreationModes} from '../package-creation/creationModes/PackageCreationModes';
-import {PackageCreationBuilder} from '../package-creation/creationModes/PackageCreationBuilder';
-import {saveAs} from 'file-saver';
-import {DesignerStore} from '../designer/designer.store';
-import {DesignerService} from '../designer/designer.service';
-import {ToastrService} from 'ngx-toastr';
+import { ConfigurationDashboardService } from './configuration-dashboard.service';
+import { VlbDefinition } from '../package-creation/mapping-models/definitions/VlbDefinition';
+import { DslDefinition } from '../package-creation/mapping-models/CBAPacakge.model';
+import { PackageCreationUtils } from '../package-creation/package-creation.utils';
+import { PackageCreationModes } from '../package-creation/creationModes/PackageCreationModes';
+import { PackageCreationBuilder } from '../package-creation/creationModes/PackageCreationBuilder';
+import { saveAs } from 'file-saver';
+import { DesignerStore } from '../designer/designer.store';
+import { DesignerService } from '../designer/designer.service';
+import { ToastrService } from 'ngx-toastr';
+import { NgxFileDropEntry } from 'ngx-file-drop';
@Component({
selector: 'app-configuration-dashboard',
@@ -23,28 +24,30 @@ import {ToastrService} from 'ngx-toastr';
})
export class ConfigurationDashboardComponent implements OnInit {
viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
- @ViewChild(MetadataTabComponent, {static: false})
- private metadataTabComponent: MetadataTabComponent;
+ @ViewChild(MetadataTabComponent, { static: false })
+ metadataTabComponent: MetadataTabComponent;
public customActionName = '';
entryDefinitionKeys: string[] = ['template_tags', 'user-groups',
'author-email', 'template_version', 'template_name', 'template_author', 'template_description'];
- @ViewChild('nameit', {static: true})
- private elementRef: ElementRef;
-
- private zipFile: JSZip = new JSZip();
- private filesData: any = [];
- private folder: FolderNodeElement = new FolderNodeElement();
-
- private currentBlob = new Blob();
-
- constructor(private route: ActivatedRoute, private configurationDashboardService: ConfigurationDashboardService,
- private packageCreationStore: PackageCreationStore,
- private packageCreationUtils: PackageCreationUtils,
- private router: Router,
- private designerStore: DesignerStore,
- private designerService: DesignerService,
- private toastService: ToastrService
+ @ViewChild('nameit', { static: true })
+ elementRef: ElementRef;
+ uploadedFiles = [];
+ zipFile: JSZip = new JSZip();
+ filesData: any = [];
+ folder: FolderNodeElement = new FolderNodeElement();
+
+ currentBlob = new Blob();
+
+ constructor(
+ private route: ActivatedRoute,
+ private configurationDashboardService: ConfigurationDashboardService,
+ private packageCreationStore: PackageCreationStore,
+ private packageCreationUtils: PackageCreationUtils,
+ private router: Router,
+ private designerStore: DesignerStore,
+ private designerService: DesignerService,
+ private toastService: ToastrService
) {
}
@@ -65,39 +68,39 @@ export class ConfigurationDashboardComponent implements OnInit {
private downloadCBAPackage(bluePrintDetailModels: BluePrintDetailModel) {
this.configurationDashboardService.downloadResource(
bluePrintDetailModels[0].artifactName + '/' + bluePrintDetailModels[0].artifactVersion).subscribe(response => {
- const blob = new Blob([response], {type: 'application/octet-stream'});
- this.currentBlob = blob;
- this.zipFile.loadAsync(blob).then((zip) => {
- Object.keys(zip.files).forEach((filename) => {
- zip.files[filename].async('string').then((fileData) => {
- if (fileData) {
- if (filename.includes('Scripts/')) {
- this.setScripts(filename, fileData);
- } else if (filename.includes('Templates/')) {
- if (filename.includes('-mapping.')) {
- this.setMapping(filename, fileData);
- } else if (filename.includes('-template.')) {
- this.setTemplates(filename, fileData);
+ const blob = new Blob([response], { type: 'application/octet-stream' });
+ this.currentBlob = blob;
+ this.zipFile.loadAsync(blob).then((zip) => {
+ Object.keys(zip.files).forEach((filename) => {
+ zip.files[filename].async('string').then((fileData) => {
+ if (fileData) {
+ if (filename.includes('Scripts/')) {
+ this.setScripts(filename, fileData);
+ } else if (filename.includes('Templates/')) {
+ if (filename.includes('-mapping.')) {
+ this.setMapping(filename, fileData);
+ } else if (filename.includes('-template.')) {
+ this.setTemplates(filename, fileData);
+ }
+
+ } else if (filename.includes('Definitions/')) {
+ this.setImports(filename, fileData, bluePrintDetailModels);
+ } else if (filename.includes('TOSCA-Metadata/')) {
+ const metaDataTabInfo: MetaDataTabModel = this.getMetaDataTabInfo(fileData);
+ this.setMetaData(metaDataTabInfo, bluePrintDetailModels[0]);
}
-
- } else if (filename.includes('Definitions/')) {
- this.setImports(filename, fileData, bluePrintDetailModels);
- } else if (filename.includes('TOSCA-Metadata/')) {
- const metaDataTabInfo: MetaDataTabModel = this.getMetaDataTabInfo(fileData);
- this.setMetaData(metaDataTabInfo, bluePrintDetailModels[0]);
}
- }
+ });
});
});
});
- });
}
- private setScripts(filename: string, fileData: any) {
+ setScripts(filename: string, fileData: any) {
this.packageCreationStore.addScripts(filename, fileData);
}
- private setImports(filename: string, fileData: any, bluePrintDetailModels: BluePrintDetailModel) {
+ setImports(filename: string, fileData: any, bluePrintDetailModels: BluePrintDetailModel) {
if (filename.includes(bluePrintDetailModels[0].artifactName)) {
let definition = new VlbDefinition();
definition = fileData as VlbDefinition;
@@ -121,11 +124,11 @@ export class ConfigurationDashboardComponent implements OnInit {
}
}
- private setTemplates(filename: string, fileData: any) {
+ setTemplates(filename: string, fileData: any) {
this.packageCreationStore.addTemplate(filename, fileData);
}
- private setMapping(fileName: string, fileData: string) {
+ setMapping(fileName: string, fileData: string) {
this.packageCreationStore.addMapping(fileName, fileData);
}
@@ -143,7 +146,7 @@ export class ConfigurationDashboardComponent implements OnInit {
});
}
- private setMetaData(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BluePrintDetailModel) {
+ setMetaData(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BluePrintDetailModel) {
metaDataObject.description = bluePrintDetailModel.artifactDescription;
this.packageCreationStore.changeMetaData(metaDataObject);
@@ -166,7 +169,7 @@ export class ConfigurationDashboardComponent implements OnInit {
saveBluePrintToDataBase() {
this.create();
- this.zipFile.generateAsync({type: 'blob'})
+ this.zipFile.generateAsync({ type: 'blob' })
.then(blob => {
this.packageCreationStore.saveBluePrint(blob).subscribe(
bluePrintDetailModels => {
@@ -198,7 +201,7 @@ export class ConfigurationDashboardComponent implements OnInit {
downloadPackage(artifactName: string, artifactVersion: string) {
this.configurationDashboardService.downloadResource(artifactName + '/' + artifactVersion).subscribe(response => {
- const blob = new Blob([response], {type: 'application/octet-stream'});
+ const blob = new Blob([response], { type: 'application/octet-stream' });
saveAs(blob, artifactName + '-' + artifactVersion + '-CBA.zip');
});
}
@@ -221,6 +224,17 @@ export class ConfigurationDashboardComponent implements OnInit {
goToDesignerMode(id) {
// this.designerService.setActionName(this.customActionName);
- this.router.navigate(['/packages/designer', id, {actionName: this.customActionName}]);
+ this.router.navigate(['/packages/designer', id, { actionName: this.customActionName }]);
+ }
+
+ public dropped(files: NgxFileDropEntry[]) {
+
+ }
+ public fileOver(event) {
+ console.log(event);
+ }
+
+ public fileLeave(event) {
+ console.log(event);
}
}