This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a commit to branch DLAB-1571
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1571 by this push:
     new 8ab22ae  Fixed resource stop and terminate from list of resourse
     new f95320b  Merge remote-tracking branch 'origin/DLAB-1571' into DLAB-1571
8ab22ae is described below

commit 8ab22aeaed5a43dd4101bd07a0ae2ad33cd1fbfc
Author: Dmytro Gnatyshyn <[email protected]>
AuthorDate: Mon Apr 6 18:47:30 2020 +0300

    Fixed resource stop and terminate from list of resourse
---
 .../app/resources/resources-grid/resources-grid.model.ts   |  4 ++--
 .../confirmation-dialog/confirmation-dialog.model.ts       | 14 +++++---------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
index ba50286..b370a15 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.model.ts
@@ -78,8 +78,8 @@ export class ExploratoryModel {
             value.shared[el.endpoint][DICTIONARY[provider].bucket_name],
             value.shared[el.endpoint][DICTIONARY[provider].shared_bucket_name],
             el.error_message,
-            billing.cost,
-            billing.currency,
+            billing ? billing.cost : '',
+            billing ? billing.currency : '',
             el.billing,
             el.libs,
             
value.shared[el.endpoint][DICTIONARY[provider].user_storage_account_name],
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
 
b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
index 9f92ef3..79b0512 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.model.ts
@@ -70,19 +70,15 @@ export class ConfirmationDialogModel {
 
 
   private stopExploratory(): Observable<{}> {
-    // return this.manageAction
-    //   ?
-      return 
this.manageEnvironmentsService.environmentManagement(this.notebook.user, 
'stop', this.notebook.project, this.notebook.name);
-      // : 
this.userResourceService.suspendExploratoryEnvironment(this.notebook, 'stop');
+    return this.manageAction
+      ? 
this.manageEnvironmentsService.environmentManagement(this.notebook.user, 
'stop', this.notebook.project, this.notebook.name)
+      : this.userResourceService.suspendExploratoryEnvironment(this.notebook, 
'stop');
   }
 
   private terminateExploratory(): Observable<{}> {
-    // return this.manageAction
-    //   ?
-      return this.manageEnvironmentsService.environmentManagement(
+    return this.manageAction ? 
this.manageEnvironmentsService.environmentManagement(
         this.notebook.user, 'terminate', this.notebook.project,  
this.notebook.name
-      );
-      // : 
this.userResourceService.suspendExploratoryEnvironment(this.notebook, 
'terminate');
+      ) : 
this.userResourceService.suspendExploratoryEnvironment(this.notebook, 
'terminate');
   }
 
   private stopEdgeNode(): Observable<{}> {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to