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:41:55 UTC

[incubator-dlab] branch DLAB-1929 created (now 633cd46)

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

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


      at 633cd46  [DLAB-1929] Allowed only one active Data Engine Service per notebook

This branch includes the following new commits:

     new 633cd46  [DLAB-1929] Allowed only one active Data Engine Service per notebook

The 1 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] 01/01: [DLAB-1929] Allowed only one active Data Engine Service per notebook

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

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

commit 633cd46515a2b5c2f2442cf23f42b9c832e0a436
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Jul 9 17:40:29 2020 +0300

    [DLAB-1929] Allowed only one active Data Engine Service per notebook
---
 .../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>&nbsp;<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