From 543868e6267b62e84d01f611cfab79d493a8c197 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Tue, 25 Aug 2020 10:40:42 +0200 Subject: fixing issues in configuration package Issue-ID: CCSDK-2336 Signed-off-by: ShaabanEltanany Change-Id: I38e542a7959f98548a5494b0ee40ddb236f2595f --- .../configuration-dashboard.component.html | 35 ++++++++++++++++++---- .../configuration-dashboard.component.ts | 13 ++++++++ .../metadata-tab/metadata-tab.component.html | 4 +-- .../metadata-tab/metadata-tab.component.ts | 7 ++--- 4 files changed, 46 insertions(+), 13 deletions(-) (limited to 'cds-ui/designer-client/src/app') 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 c04053747..0d0f5ef93 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 @@ -22,20 +22,20 @@ + + 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 b4ad02364..a69e45fce 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 @@ -39,6 +39,8 @@ export class ConfigurationDashboardComponent implements OnInit { currentBlob = new Blob(); vlbDefinition: VlbDefinition = new VlbDefinition(); + isSaveEnabled = false; + versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; constructor( private route: ActivatedRoute, @@ -56,6 +58,17 @@ export class ConfigurationDashboardComponent implements OnInit { this.elementRef.nativeElement.focus(); this.refreshCurrentPackage(); + + const regexp = RegExp(this.versionPattern); + this.packageCreationStore.state$.subscribe(cbaPackage => { + if (cbaPackage && cbaPackage.metaData && cbaPackage.metaData.description + && cbaPackage.metaData.name && cbaPackage.metaData.version && + regexp.test(cbaPackage.metaData.version)) { + this.isSaveEnabled = true; + } else { + this.isSaveEnabled = false; + } + }); } private refreshCurrentPackage() { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html index e77356d6c..c86dd26cf 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html @@ -32,7 +32,7 @@
-