You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/09/05 11:59:14 UTC

[incubator-dlab] branch DLAB-1043 created (now b402157)

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

ankovalyshyn pushed a change to branch DLAB-1043
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at b402157  [DLAB-1043]: added error message during cluster creation in case of quota exceeding

This branch includes the following new commits:

     new 741f216  [DLAB-1043]: added error message during cluster creation in case of quota exceeding
     new b402157  [DLAB-1043]: added error message during cluster creation in case of quota exceeding

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 02/02: [DLAB-1043]: added error message during cluster creation in case of quota exceeding

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b4021578fec057efdcdbe1ab5f0ca0e99c88afd8
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Sep 5 14:59:04 2019 +0300

    [DLAB-1043]: added error message during cluster creation in case of quota exceeding
---
 .../resources-grid/resources-grid.component.ts     | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index d9c229f..b3ab6fd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -126,6 +126,16 @@ export class ResourcesGridComponent implements OnInit {
           .some(item => CheckUtils.delimitersFiltering(notebook_name) === CheckUtils.delimitersFiltering(item.name))).length > 0;
   }
 
+  public isResourcesInProgress(notebook) {
+    const env = this.getEnvironmentsListCopy().map(env => env.exploratory.find(el => el.name === notebook.name))[0];
+
+    if (env && env.resources.length) {
+      return env.resources.filter(item => (item.status !== 'failed' && item.status !== 'terminated'
+        && item.status !== 'running' && item.status !== 'stopped')).length > 0;
+    }
+    return false;
+  }
+
 
   // PRIVATE
   private getEnvironmentsListCopy() {
@@ -195,18 +205,6 @@ export class ResourcesGridComponent implements OnInit {
 
 
 
-
-
-  isResourcesInProgress(notebook) {
-    const env = this.getEnvironmentsListCopy().map(env => env.exploratory.find(el => el.name === notebook.name))[0];
-
-    if (env.resources.length) {
-      return env.resources.filter(item => (item.status !== 'failed' && item.status !== 'terminated'
-        && item.status !== 'running' && item.status !== 'stopped')).length > 0;
-    }
-    return false;
-  }
-
   filterActiveInstances(): FilterConfigurationModel {
     const filteredData = (<any>Object).assign({}, this.filterConfiguration);
     for (const index in filteredData) {
@@ -216,7 +214,6 @@ export class ResourcesGridComponent implements OnInit {
         });
       if (index === 'shapes') { filteredData[index] = []; }
     }
-
     filteredData.type = 'active';
 
     return filteredData;
@@ -227,7 +224,6 @@ export class ResourcesGridComponent implements OnInit {
       if (сonfig[index] && сonfig[index] instanceof Array)
         сonfig[index] = сonfig[index].filter(item => this.filterConfiguration[index].includes(item));
     }
-
     return сonfig;
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/02: [DLAB-1043]: added error message during cluster creation in case of quota exceeding

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 741f216d73bd1fb46e74801536bdb622a3ccdd03
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Sep 5 14:51:53 2019 +0300

    [DLAB-1043]: added error message during cluster creation in case of quota exceeding
---
 .../computational-resource-create-dialog.component.ts                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
index 4749232..852d0a6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts
@@ -133,7 +133,7 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
     this.model.createComputationalResource(data, this.selectedImage, this.notebook_instance, this.spotInstance)
       .subscribe((response: any) => {
         if (response.status === HTTP_STATUS_CODES.OK) this.dialogRef.close();
-      });
+      }, error => this.toastr.error(error.message, 'Oops!'));
   }
 
   private initFormModel(): void {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org