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/07/09 14:42:48 UTC
[incubator-dlab] branch develop updated: [DLAB-1929] Allowed only
one active Data Engine Service per notebook (#816)
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new ca3f908 [DLAB-1929] Allowed only one active Data Engine Service per notebook (#816)
ca3f908 is described below
commit ca3f908fa57d1baa2cb5144ec3168bdcea827e97
Author: Dmytro Gnatyshyn <42...@users.noreply.github.com>
AuthorDate: Thu Jul 9 17:42:41 2020 +0300
[DLAB-1929] Allowed only one active Data Engine Service per notebook (#816)
---
.../computational-resource-create-dialog.component.html | 2 +-
.../computational-resource-create-dialog.component.ts | 7 ++++++-
.../app/resources/scheduler/scheduler.component.html | 2 +-
.../notification-dialog.component.ts | 17 ++++++++---------
.../webapp/src/app/shared/navbar/navbar.component.scss | 4 ++++
5 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
index 1591221..5656a92 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.html
@@ -145,7 +145,7 @@
</div>
<div class="preemptible checkbox-group control-group m-top-30 m-bott-10"
- *ngIf="PROVIDER === 'gcp' && selectedImage?.image === 'docker.dlab-dataengine-service'">
+ *ngIf="PROVIDER === 'gcp' && selectedImage?.image === 'docker.dlab-dataengine-service1'">
<label class="label">
<input #preemptibleNode type="checkbox" (change)="selectPreemptibleNodes($event)" />
<span>Preemptible node</span>
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 ab252f0..189d6ff 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
@@ -248,12 +248,17 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
this.userResourceService.getComputationalTemplates(project, endpoint, provider).subscribe(
clusterTypes => {
this.clusterTypes = clusterTypes.templates;
+ if (this.notebook_instance.resources.some(v => v.image === 'docker.dlab-dataengine-service'
+ && v.status !== 'terminated'
+ && v.status !== 'failed')) {
+ this.clusterTypes = this.clusterTypes.filter(v => v.image !== 'docker.dlab-dataengine-service');
+ }
this.userComputations = clusterTypes.user_computations;
this.projectComputations = clusterTypes.project_computations;
this.clusterTypes.forEach((cluster, index) => this.clusterTypes[index].computation_resources_shapes =
SortUtils.shapesSort(cluster.computation_resources_shapes));
- this.selectedImage = clusterTypes.templates[0];
+ this.selectedImage = this.clusterTypes[0];
if (this.selectedImage) {
this._ref.detectChanges();
this.filterShapes();
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
index c49628e..a983827 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/scheduler/scheduler.component.html
@@ -65,7 +65,7 @@
<input matInput [matDatepicker]="startDate" placeholder="Choose start date" formControlName="startDate">
<mat-datepicker-toggle
- matSuffix [for]="startDate"></mat-datepicker-toggle>
+ matSuffix [for]="startDate" [ngClass]="{'not-allowed' : destination.type === 'СOMPUTATIONAL' && inherit || !enableSchedule }"></mat-datepicker-toggle>
<mat-datepicker #startDate></mat-datepicker>
</mat-form-field>
</div>
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 7ccfbf5..479a9e4 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
@@ -33,16 +33,15 @@ import {Endpoint} from '../../../administration/project/project.component';
<div *ngIf="data.type === 'terminateNode'" class="table-header">
<div *ngIf="data.item.action.endpoint.length > 0">
Edge node<span *ngIf="data.item.action.endpoint.length>1">s</span>
- <span class="strong">{{ ' ' + data.item.action.endpoint.join(', ') }}</span> in project
+ <span class="strong">{{ data.item.action.endpoint.join(', ') }}</span> in project
<span class="strong">{{ data.item.action.project_name }}</span> will be terminated.
</div>
</div>
<div *ngIf="data.type === 'list'" class="info">
<div *ngIf="data.template.notebook.length > 0">
- Following notebook server<span *ngIf="data.template.notebook.length>1">s</span>
- <span *ngFor="let item of data.template.notebook">
- <span class="strong info">{{ item.exploratory_name}}</span> on project <span
- class="strong info">{{ item.project }}</span>
+ Following notebook server<span *ngIf="data.template.notebook.length>1">s</span> <span *ngFor="let item of data.template.notebook">
+ <span class="strong blue">{{ item.exploratory_name}}</span> on project <span
+ class="strong blue">{{ item.project }}</span>
<span *ngIf="data.template.notebook.length > 1"> , </span>
</span> will be stopped and all computational resources will be stopped/terminated
</div>
@@ -50,13 +49,13 @@ import {Endpoint} from '../../../administration/project/project.component';
<div *ngIf="data.template.cluster.length > 0">
<p *ngFor="let item of data.template.cluster">
Computational resource<span *ngIf="data.template.cluster.length > 1">s </span>
- <span class="strong info">{{ item.computational_name }}</span> on <span
- class="strong info">{{ item.exploratory_name }}</span> on project<span
- class="strong info">{{ item.project }}</span>
+ <span class="strong blue">{{ item.computational_name }}</span> on <span
+ class="strong blue">{{ item.exploratory_name }}</span> on project<span
+ class="strong blue">{{ item.project }}</span>
will be stopped
</p>
</div>
- <span class="strong info">by a schedule in less than 15 minutes.</span>
+ <span class="strong blue">by a schedule in less than 15 minutes.</span>
</div>
<div *ngIf="data.type === 'message'"><span [innerHTML]="data.template"></span></div>
<div *ngIf="data.type === 'confirmation'" class="confirm-dialog">
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss
index 564c774..f3bdfb7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss
@@ -328,3 +328,7 @@ mat-sidenav-content {
max-height: 100%;
}
}
+
+.blue{
+ color: #35afd5;
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org