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/04 11:03:10 UTC
[incubator-dlab] 01/02: [DLAB-1052]: is Resources In Progress check
fixes
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-1052
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit b33094b52baaad1588856408476f4751032db557
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Wed Sep 4 11:41:25 2019 +0300
[DLAB-1052]: is Resources In Progress check fixes
---
.../app/resources/resources-grid/resources-grid.component.ts | 10 +++-------
1 file changed, 3 insertions(+), 7 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 57df495..d9c229f 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
@@ -198,14 +198,10 @@ export class ResourcesGridComponent implements OnInit {
isResourcesInProgress(notebook) {
- const env = this.getEnvironmentsListCopy().filter(env => env.exploratory.find(el => el.name === notebook.name))[0];
- let resource = [];
+ const env = this.getEnvironmentsListCopy().map(env => env.exploratory.find(el => el.name === notebook.name))[0];
- if (env) resource = env.exploratory[0].resources;
-
- if (resource.length) {
- return resource.filter(item => (
- item.status !== 'failed' && item.status !== 'terminated'
+ 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;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org