From 704f42ac8dbca2a1c261f320cfd4ed8089eaf1db Mon Sep 17 00:00:00 2001 From: Eltanany Shaaban Date: Tue, 15 Dec 2020 16:58:27 +0200 Subject: Fixing script text editor window that closes suddenly Issue-ID: CCSDK-3049 Signed-off-by: Eltanany Shaaban Change-Id: I7923bab06244346dff83c05acd12f05d4f1e2350 --- .../configuration-dashboard.component.html | 4 +- .../configuration-dashboard.component.ts | 2 - .../action-attributes.component.ts | 1 - .../package-creation.component.html | 4 +- .../scripts-tab/scripts-tab.component.html | 51 ++++++++++++---------- .../scripts-tab/scripts-tab.component.ts | 14 ++++-- .../topology-template.component.html | 2 +- 7 files changed, 42 insertions(+), 36 deletions(-) (limited to 'cds-ui') 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 3efc68838..b0f6a34ca 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 @@ -734,7 +734,7 @@ role="tab" aria-controls="nav-imports" aria-selected="false">DEFINITIONS EXTERNAL SYSTEM AUTHENTICATION PROPERTIES + aria-selected="false">DSL PROPERTIES Topology Template @@ -860,4 +860,4 @@ - \ 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 b3894fe94..c69bf1b5f 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 @@ -252,8 +252,6 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl this.packageCreationStore.addTopologyTemplate(this.cbaPackage.templateTopology); this.formTreeData(); this.enrichPackage(); - this.designerStore.clear(); - this.packageCreationStore.clear(); } diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts index 97ab4411e..5dd123103 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/action-attributes/action-attributes.component.ts @@ -434,7 +434,6 @@ export class ActionAttributesComponent implements OnInit { if (currentFunction.definition['attributes']) { Object.keys(currentFunction.definition['attributes']).forEach(attribute => { this.suggestedAttributes.push(attribute); - this.suggestedAttributes.push('assignment-map'); }); } console.log(this.suggestedAttributes); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html index 238906e2b..d188dbfa2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html @@ -110,9 +110,7 @@ role="tab" aria-controls="nav-imports" aria-selected="false">DEFINITIONS --> EXTERNAL - SYSTEM AUTHENTICATION - PROPERTIES + aria-controls="nav-authentication" aria-selected="false">DSL PROPERTIES diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html index 5027c5c02..490eef394 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html @@ -5,7 +5,9 @@ Or you can also Import File + data-toggle="modal" + (click)="resetTheUploadedFiles()" + href="#">Import File @@ -21,22 +23,22 @@
+ class="accordion-delete">
+ data-parent="#accordion-script">
+ [autoUpdateContent]="true" [durationBeforeCallback]="5000" [theme]="'eclipse'" + #editor + style="height:300px;">
@@ -73,21 +78,21 @@ 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 2653d739c..fb275a04a 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,8 +1,10 @@ -import { Component, OnInit } from '@angular/core'; -import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop'; -import { PackageCreationStore } from '../package-creation.store'; +import {Component, OnInit} from '@angular/core'; +import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop'; +import {PackageCreationStore} from '../package-creation.store'; import 'ace-builds/src-noconflict/ace'; import 'ace-builds/webpack-resolver'; +import {ToastrService} from 'ngx-toastr'; + declare var $: any; @Component({ @@ -20,7 +22,9 @@ export class ScriptsTabComponent implements OnInit { constructor( private packageCreationStore: PackageCreationStore, - ) { } + private toastService: ToastrService + ) { + } ngOnInit() { @@ -53,6 +57,7 @@ export class ScriptsTabComponent implements OnInit { initDelete(file) { this.fileToDelete = file; } + removeFile(filePath: string, FileIndex: number) { const filename = filePath.split('/')[2] || ''; // const filename = 'Scripts/' + this.getFileType(this.uploadedFiles[fileIndex].name) + '/' + this.uploadedFiles[fileIndex].name; @@ -107,6 +112,7 @@ export class ScriptsTabComponent implements OnInit { textChanges(code: any, key: string) { this.packageCreationStore.addScripts(key, code); + this.toastService.success(key + ' is updated successfully'); } changeDivShow(mapIndex: number) { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html index f67364421..fc8abd3c4 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html @@ -1,4 +1,4 @@ -

topology-template works!

+