aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages
diff options
context:
space:
mode:
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-09-16 09:49:11 +0200
committerShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-09-16 15:07:37 +0200
commit06537055eb0b9bfb2a6f23a54630cd7902c70525 (patch)
tree3d2ac3165730c4af116619a52f1d25bffaad751b /cds-ui/designer-client/src/app/modules/feature-modules/packages
parent9c1c061c8e80f41f3838dfaf487b54af36ad8071 (diff)
disable componetCanDeactivate with some functionality
Issue-ID: CCSDK-2739 Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com> Change-Id: Ic3f3905b062f42365c8d7eed22d0ee9504906ee5
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts4
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts1
2 files changed, 5 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 a4a11371e..449312f99 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
@@ -217,6 +217,8 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl
if (bluePrintDetailModels) {
const id = bluePrintDetailModels.toString().split('id')[1].split(':')[1].split('"')[1];
this.toastService.info('package updated successfully ');
+ this.isSaveEnabled = false;
+ this.id = id;
this.router.navigate(['/packages/package/' + id]);
}
}, error => {
@@ -230,6 +232,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl
this.configurationDashboardService.deletePackage(this.id).subscribe(res => {
console.log('Deleted');
console.log(res);
+ this.isSaveEnabled = false;
this.router.navigate(['/packages']);
}, err => {
console.log(err);
@@ -316,6 +319,7 @@ export class ConfigurationDashboardComponent extends ComponentCanDeactivate impl
this.packageCreationService.deploy(blob).subscribe(response => {
this.toastService.info('deployed successfully ');
const id = response.toString().split('id')[1].split(':')[1].split('"')[1];
+ this.isSaveEnabled = false;
this.router.navigate(['/packages/package/' + id]);
});
}, error => {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
index d2f2e0a8b..6b29ec4fd 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
@@ -128,6 +128,7 @@ export class PackageCreationComponent extends ComponentCanDeactivate implements
if (bluePrintDetailModels) {
const id = bluePrintDetailModels.toString().split('id')[1].split(':')[1].split('"')[1];
this.toastService.info('package updated successfully ');
+ this.isSaveEnabled = false;
this.router.navigate(['/packages/package/' + id]);
}
}, error => {