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/22 14:30:21 UTC

[incubator-dlab] branch DLAB-1466 created (now 6386ba7)

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

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


      at 6386ba7  [DLAB-1466]:Fixed set of minor issues

This branch includes the following new commits:

     new 6386ba7  [DLAB-1466]:Fixed set of minor issues

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-1466]:Fixed set of minor issues

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

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

commit 6386ba70de22223bde27c4c437da192167142628
Author: Dmytro Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Jan 22 16:30:02 2020 +0200

    [DLAB-1466]:Fixed set of minor issues
---
 .../management-grid/management-grid.component.scss      |  5 +----
 .../computational-resource-create-dialog.component.ts   | 17 ++++++++++++++---
 .../install-libraries/install-libraries.component.ts    |  6 +++---
 .../resources/manage-ungit/manage-ungit.component.html  |  9 ++++-----
 .../resources/manage-ungit/manage-ungit.component.ts    | 13 ++-----------
 5 files changed, 24 insertions(+), 26 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
index 480f652..c1b3ad0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
@@ -91,11 +91,8 @@ table.management {
       padding-left: 5px;
       font-size: 11px;
     }
-
-    button {
-      padding-right: 5px;
-    }
   }
+
   .filter-row {
     background: inherit;
   }
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 7f29002..ee748d6 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
@@ -18,7 +18,7 @@
  */
 
 import { Component, OnInit, ViewChild, Inject, ChangeDetectorRef } from '@angular/core';
-import { FormGroup, FormBuilder, Validators } from '@angular/forms';
+import {FormGroup, FormBuilder, Validators, FormControl} from '@angular/forms';
 import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
 import { ToastrService } from 'ngx-toastr';
 
@@ -76,7 +76,7 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
     this.notebook_instance = this.data.notebook;
     this.resourcesList = this.data.full_list;
     this.initFormModel();
-
+    this.initCluster();
     this.getTemplates(this.notebook_instance.project, this.notebook_instance.endpoint);
   }
 
@@ -141,7 +141,7 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
       template_name: ['', [Validators.required]],
       version: [''],
       shape_master: ['', Validators.required],
-      shape_slave: [''],
+      shape_slave: ['', Validators.required],
       cluster_alias_name: ['', [Validators.required, Validators.pattern(PATTERNS.namePattern), Validators.maxLength(DICTIONARY.max_cluster_name_length),
       this.checkDuplication.bind(this)]],
       instance_number: ['', [Validators.required, Validators.pattern(PATTERNS.nodeCountPattern), this.validInstanceNumberRange.bind(this)]],
@@ -152,6 +152,17 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
     });
   }
 
+  private initCluster() {
+    this.resourceForm.get('template_name').valueChanges.subscribe(val => {
+      if (val === 'AWS EMR cluster') {
+        this.resourceForm.addControl('shape_slave', new FormControl('', [ Validators.required ]));
+      } else {
+        this.resourceForm.removeControl('shape_slave');
+      }
+      this.resourceForm.updateValueAndValidity();
+    });
+  }
+
   private shapePlaceholder(resourceShapes, byField: string) {
     for (const index in resourceShapes) return resourceShapes[index][0][byField];
   }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 90e1f9c..0b49cb7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -216,11 +216,11 @@ export class InstallLibrariesComponent implements OnInit {
   }
 
   public isInstallingInProgress(): void {
-      if (this.clearCheckInstalling === undefined) {
+    const isInstallingNow = this.notebookLibs.some(lib => lib.filteredStatus.some(status => status.status === 'installing'));
+      if (isInstallingNow){
         this.clearCheckInstalling = window.setInterval(() => this.getInstalledLibrariesList(), 10000);
       } else {
-        clearInterval(this.clearCheckInstalling);
-        this.clearCheckInstalling = undefined;
+        window.clearInterval(this.clearCheckInstalling);
       }
     }
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
index 6697e68..b3d444b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.html
@@ -125,7 +125,7 @@
                   <input type="password" formControlName="password" placeholder="Enter Password">
                 </div>
                 <span class="danger_color"
-                  *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
+                  *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched && updateAccountCredentialsForm.value.password === updateAccountCredentialsForm.value.confirmPassword">
                   Field is required. Password must be at least 6 characters
                 </span>
               </div>
@@ -134,16 +134,15 @@
                 <div class="control">
                   <input type="password" formControlName="confirmPassword" placeholder="Enter Password">
                 </div>
-                <span class="danger_color"
-                  *ngIf="!updateAccountCredentialsForm.controls['confirmPassword'].valid && updateAccountCredentialsForm.controls['confirmPassword'].touched">
-                  Field is required. Please confirm a password
+                <span class="danger_color" *ngIf="updateAccountCredentialsForm.value.password !== updateAccountCredentialsForm.value.confirmPassword && updateAccountCredentialsForm.controls['password'].touched && !!updateAccountCredentialsForm.value.password">
+                  Passwords don't match.
                 </span>
               </div>
             </div>
           </div>
           <div class="text-center submit m-bott-10">
             <button mat-raised-button type="button" class="butt action" (click)="resetForm()">Clear</button>
-            <button mat-raised-button type="button" [disabled]="!updateAccountCredentialsForm.valid"
+            <button mat-raised-button type="button" [disabled]="!updateAccountCredentialsForm.valid || updateAccountCredentialsForm.value.password !== updateAccountCredentialsForm.value.confirmPassword"
               (click)="assignChanges(updateAccountCredentialsForm.value)"
               class="butt butt-success action">Assign</button>
           </div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
index d79eb75..aadfc24 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/manage-ungit/manage-ungit.component.ts
@@ -96,7 +96,7 @@ export class ManageUngitComponent implements OnInit {
       'email': [item.email, Validators.compose([Validators.required, Validators.pattern(this.mail_validity_pattern)])],
       'login': [item.login, Validators.compose([Validators.required, Validators.pattern(this.login_acceptance_pattern)])],
       'password': ['', Validators.compose([Validators.required, Validators.minLength(6)])],
-      'confirmPassword': ['', Validators.compose([Validators.required, this.validConfirmField.bind(this)])]
+      'confirmPassword': ['', Validators.compose([Validators.required])]
     });
   }
 
@@ -140,7 +140,7 @@ export class ManageUngitComponent implements OnInit {
       'email': ['', Validators.compose([Validators.required, Validators.pattern(this.mail_validity_pattern)])],
       'login': ['', Validators.compose([Validators.required, Validators.pattern(this.login_acceptance_pattern)])],
       'password': ['', Validators.compose([Validators.required, Validators.minLength(6)])],
-      'confirmPassword': ['', Validators.compose([Validators.required, this.validConfirmField.bind(this)])]
+      'confirmPassword': ['', Validators.compose([Validators.required])]
     });
   }
 
@@ -151,15 +151,6 @@ export class ManageUngitComponent implements OnInit {
         error => this.toastr.error(error.message || 'Git credentials loading failed!', 'Oops!'));
   }
 
-  private validConfirmField(control) {
-    if (this.updateAccountCredentialsForm) {
-      const passReq = this.updateAccountCredentialsForm.get('password');
-      const confirmPassReq = this.updateAccountCredentialsForm.get('confirmPassword');
-
-      return passReq.value === confirmPassReq.value ? null : { valid: false };
-    }
-  }
-
   private containsHostname(control) {
     let duplication = null;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org