You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/01/30 12:58:19 UTC
[incubator-dlab] 01/01: [DLAB-1480]: Fixed set of tasks connected
with cloud specific and statuses
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1480
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit c0bb4e9b53b766793351ce1136d3851d08400b36
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Jan 30 14:49:13 2020 +0200
[DLAB-1480]: Fixed set of tasks connected with cloud specific and statuses
---
.../project/project-list/project-list.component.html | 2 +-
.../project/project-list/project-list.component.scss | 4 ++++
.../app/resources/resources-grid/resources-grid.model.ts | 12 +++++++-----
.../confirmation-dialog/confirmation-dialog.component.html | 2 +-
.../confirmation-dialog/confirmation-dialog.component.scss | 4 ++--
.../notification-dialog/notification-dialog.component.ts | 14 ++++++++++----
6 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
index b8c1c39..efed1eb 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.html
@@ -45,7 +45,7 @@
<ng-template #list>
<div *ngFor="let endpoint of element.endpoints" class="resource-wrap">
<div class="resource-name">
- <a class="detailed-link">
+ <a class="project-endpoint-name">
{{ endpoint.name }}
</a>
</div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.scss
index a877e95..73b725d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.scss
@@ -132,6 +132,10 @@ td.settings {
min-width: 190px;
}
+.project-endpoint-name{
+ color: #577289;
+}
+
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 063c7fc..b0345f6 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
@@ -22,6 +22,7 @@ export class ExploratoryModel {
readonly DICTIONARY = DICTIONARY;
constructor(
+ public cloud_provider: string,
public name: Array<any>,
public template_name: string,
public image: string,
@@ -49,16 +50,18 @@ export class ExploratoryModel {
public project: string,
public endpoint: string,
public tags: any,
- public cloud_provider: string
) { }
public static loadEnvironments(data: Array<any>) {
if (data) {
return data.map((value) => {
- const provider = value.endpoints[0].cloudProvider.toLowerCase();
return {
project: value.project,
- exploratory: value.exploratory.map(el => new ExploratoryModel(el.exploratory_name,
+ exploratory: value.exploratory.map(el => {
+ const provider = value.endpoints.filter(endpoint => el.endpoint === endpoint.name)[0].cloudProvider.toLowerCase();
+ return new ExploratoryModel(
+ provider,
+ el.exploratory_name,
el.template_name,
el.image,
el.status,
@@ -85,8 +88,7 @@ export class ExploratoryModel {
el.project,
el.endpoint,
el.tags,
- provider,
- ))
+ )})
};
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
index 3dc0e5e..950b773 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.html
@@ -48,7 +48,7 @@
<div class="status" [ngClass]="{ 'stopped': !confirmationType && resource.image === 'docker.dlab-dataengine',
'terminated': resource.image === 'docker.dlab-dataengine-service' || confirmationType }">
{{ (!confirmationType && resource.image === 'docker.dlab-dataengine') ? 'Stopped' : 'Terminated' }}</div>
- <div class="size">{{ resource[DICTIONARY[resource.image].master_node_shape] }}</div>
+ <div class="size">{{ resource[DICTIONARY[notebook.cloud_provider][resource.image].master_node_shape] }} </div>
</mat-list-item>
</div>
</mat-list>
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
index ab3a434..305c504 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/confirmation-dialog/confirmation-dialog.component.scss
@@ -30,13 +30,13 @@
}
.resources {
.cluster {
- width: 45%;
+ width: 40%;
}
.status {
width: 30%;
}
.size {
- width: 25%;
+ width: 30%;
}
.scrolling-content {
max-height: 200px;
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
index 94d3fb3..3dfacd5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
@@ -19,6 +19,7 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
+import {Endpoint} from '../../../administration/project/project.component';
@Component({
selector: 'notification-dialog',
@@ -95,7 +96,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
<div class="status">Further status</div>
</mat-list-item>
<div class="scrolling-content">
- <mat-list-item *ngFor="let endpoint of data.item.endpoints" class="sans node">
+ <mat-list-item *ngFor="let endpoint of filterEndpoints()" class="sans node">
<div class="endpoint ellipsis">{{endpoint.name}}</div>
<div class="status terminated">Terminated</div>
</mat-list-item>
@@ -143,18 +144,23 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
`]
})
-export class NotificationDialogComponent{
+export class NotificationDialogComponent {
public willNotTerminate: boolean = false;
+ public notFailedEndpoints: Endpoint [];
constructor(
public dialogRef: MatDialogRef<NotificationDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) {
- if(this.data.list){
+ if (this.data.list) {
this.willNotTerminate = !this.data.list.length;
}
}
- public terminateResource(): void{
+ public terminateResource(): void {
this.willNotTerminate = !this.willNotTerminate;
}
+
+ public filterEndpoints() {
+ return this.data.item.endpoints.filter(e => e.status !== 'FAILED');
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org