diff options
author | 2020-08-25 13:35:40 +0000 | |
---|---|---|
committer | 2020-08-25 13:35:40 +0000 | |
commit | a6defbafb46a5db6b3bf633d1a9c32f503060f55 (patch) | |
tree | 883de1d7e46d7c3510008a7cddbb107bdb33d633 /cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts | |
parent | 14791b79e4cad6aab49880607009883ee94fc1d2 (diff) | |
parent | 543868e6267b62e84d01f611cfab79d493a8c197 (diff) |
Merge "fixing issues in configuration package"
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.ts | 13 |
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() { |