aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2020-10-05 18:03:36 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-05 18:03:36 +0000
commit70081225fac101da634932394d82e2be692f9cd9 (patch)
treec698e57aff6f41709edaeaf64ff506cb6c635062 /cds-ui
parentf08c5e96d5b4c0792c4709093480f5f6cb452d49 (diff)
parentb6b9259f644058cf20ea2845c055615694dfed2f (diff)
Merge "Handle template names that contains '-'"
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts23
-rw-r--r--cds-ui/designer-client/src/styles.css2
3 files changed, 14 insertions, 13 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
index 8c1279fbe..56ed0422a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
@@ -79,7 +79,7 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy {
this.fileToDelete = templateInfo.fileName;
this.fileName = templateInfo.fileName.split('/')[1];
if (this.fileName) {
- this.fileName = this.fileName.split('-')[0];
+ this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('-'));
}
if (templateInfo.type === 'mapping' || templateInfo.type.includes('mapping')) {
this.mappingRes = templateInfo.mapping;
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts
index 561642eb8..3a05bcfc5 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts
@@ -1,12 +1,12 @@
-import {Component, EventEmitter, OnDestroy, OnInit, Output} from '@angular/core';
-import {PackageCreationStore} from '../../package-creation.store';
-import {Mapping, Template} from '../../mapping-models/CBAPacakge.model';
-import {TemplateInfo, TemplateStore} from '../../template.store';
-import {TemplateAndMapping} from '../TemplateAndMapping';
-import {ActivatedRoute} from '@angular/router';
-import {SharedService} from '../shared-service';
-import {TourService} from 'ngx-tour-md-menu';
-import {TemplateType} from '../utils/TemplateType';
+import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
+import { PackageCreationStore } from '../../package-creation.store';
+import { Mapping, Template } from '../../mapping-models/CBAPacakge.model';
+import { TemplateInfo, TemplateStore } from '../../template.store';
+import { TemplateAndMapping } from '../TemplateAndMapping';
+import { ActivatedRoute } from '@angular/router';
+import { SharedService } from '../shared-service';
+import { TourService } from 'ngx-tour-md-menu';
+import { TemplateType } from '../utils/TemplateType';
@Component({
@@ -186,8 +186,9 @@ export class TemplMappListingComponent implements OnInit, OnDestroy {
}
condifrmDelete() {
- const file = this.fileToDelete.split('/')[1].split('-')[0];
- const ext = this.fileToDelete.split('/')[1].split('.')[1];
+ const fullName = this.fileToDelete.split('/')[1];
+ const file = fullName.substr(0, fullName.lastIndexOf('-'));
+ const ext = fullName.substr(fullName.lastIndexOf('.') + 1);
this.templateAndMappingMap.delete(file);
if (this.templateAndMappingMap.size <= 0) {
this.openCreationView();
diff --git a/cds-ui/designer-client/src/styles.css b/cds-ui/designer-client/src/styles.css
index ac2a87450..b215dd46a 100644
--- a/cds-ui/designer-client/src/styles.css
+++ b/cds-ui/designer-client/src/styles.css
@@ -2928,7 +2928,7 @@ animation: glowing 1500ms infinite;
top: 13px;
}
.ace_scroller{
- overflow: auto !important;
+ /* overflow: auto !important; */
}
.ace_print-margin{
left: 100% !important;