summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-26 09:55:13 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-26 09:55:13 +0100
commit6865cb1795a44e56c04fab9404dc60b8db7d6103 (patch)
tree865f13e8b0e8b31cc1b2bc759b51dd947fde319f
parentfacf3f10b243d027cc2a28661fe1cd8d4253dafa (diff)
Closed SDK modal install window on early error.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--webapp/src/app/pages/sdks/sdk-management/sdk-management.component.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/webapp/src/app/pages/sdks/sdk-management/sdk-management.component.ts b/webapp/src/app/pages/sdks/sdk-management/sdk-management.component.ts
index 3bb107b..6e9b81b 100644
--- a/webapp/src/app/pages/sdks/sdk-management/sdk-management.component.ts
+++ b/webapp/src/app/pages/sdks/sdk-management/sdk-management.component.ts
@@ -141,15 +141,20 @@ export class SdkManagementComponent implements OnInit {
modal.result.then(res => {
if (res === 'yes') {
- // Request installation
- this.sdkSvr.install(sdk).subscribe(r => { }, err => this.alert.error(err));
-
const modalInstall = this.modalService.open(SdkInstallComponent, {
size: 'lg',
backdrop: 'static',
container: 'nb-layout',
});
modalInstall.componentInstance.sdk = sdk;
+
+ // Request installation
+ this.sdkSvr.install(sdk).subscribe(
+ r => { },
+ err => {
+ modalInstall.dismiss('SDK install failure');
+ this.alert.error(err);
+ });
}
});