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:16 UTC
[incubator-dlab] 02/02: [DLAB-1043]: added error message during
cluster creation in case of quota exceeding
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