summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
diff options
context:
space:
mode:
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-08-25 10:40:42 +0200
committerShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-08-25 10:40:42 +0200
commit543868e6267b62e84d01f611cfab79d493a8c197 (patch)
tree5ffcaf4b25fcf7f961526b3451e499670191d874 /cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
parent6bf663a71fb034ff0961bd21404b23bd71de6289 (diff)
fixing issues in configuration package
Issue-ID: CCSDK-2336 Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com> Change-Id: I38e542a7959f98548a5494b0ee40ddb236f2595f
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts13
1 files changed, 13 insertions, 0 deletions
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() {