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/24 16:59:36 UTC

[incubator-dlab] branch develop updated: [DLAB-1466]: Fixed set of minor issues (#553)

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 5eed52f  [DLAB-1466]: Fixed set of minor issues (#553)
5eed52f is described below

commit 5eed52f8acd408c6605a0541b91d8c5550bdd3c6
Author: Dmytro Gnatyshyn <42...@users.noreply.github.com>
AuthorDate: Fri Jan 24 18:59:27 2020 +0200

    [DLAB-1466]: Fixed set of minor issues (#553)
    
    * [DLAB-1466]: Fixed set of minor issues
    
    * [DLAB-1466]: Fixed set of minor issues
---
 .../administration/project/project-data.service.ts | 33 +++++++++++++++++-----
 .../project/project-list/project-list.component.ts | 12 --------
 ...utational-resource-create-dialog.component.html |  2 +-
 ...mputational-resource-create-dialog.component.ts |  6 ++--
 .../manage-ungit/manage-ungit.component.html       |  2 +-
 .../notification-dialog.component.ts               |  2 +-
 6 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
index ad877f2..c86d6d5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-data.service.ts
@@ -18,17 +18,17 @@
  */
 
 import { Injectable } from '@angular/core';
-import { BehaviorSubject } from 'rxjs';
+import { BehaviorSubject, of } from 'rxjs';
+import { mergeMap} from 'rxjs/operators';
 
-import { ProjectService } from '../../core/services';
+import { ProjectService, EndpointService } from '../../core/services';
 import { Project } from './project.component';
 
 @Injectable()
 export class ProjectDataService {
-
   _projects = new BehaviorSubject<any>(null);
 
-  constructor(private projectService: ProjectService) {
+  constructor(private projectService: ProjectService, private endpointService: EndpointService) {
     this.getProjectsList();
   }
 
@@ -37,7 +37,26 @@ export class ProjectDataService {
   }
 
   private getProjectsList() {
-    this.projectService.getProjectsList().subscribe(
-      (response: Project[]) => this._projects.next(response));
+    this.projectService.getProjectsList()
+      .pipe(
+        mergeMap ((response: Project[]) => {
+          this.endpointService.getEndpointsData().subscribe((endpoints: any) => {
+            if(response) {
+              response.forEach(project => project.endpoints.forEach(endpoint => {
+                const filtredEndpoints =  endpoints.filter(v => v.name === endpoint.name);
+                if(filtredEndpoints.length){
+                  endpoint.endpointStatus = endpoints.filter(v => v.name === endpoint.name)[0].status;
+                }else{
+                  endpoint.endpointStatus = "N/A"
+                }
+              }));
+            }
+          });
+          return of(response);
+        }))
+      .subscribe(
+        (response: Project[]) => {
+          return this._projects.next(response);
+        });
   }
-}
\ No newline at end of file
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts
index 146e99e..b245bfe 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-list/project-list.component.ts
@@ -70,18 +70,6 @@ export class ProjectListComponent implements OnInit, OnDestroy {
     setTimeout(() => {this.progressBarService.startProgressBar()} , 0);
     this.subscriptions.add(this.projectDataService._projects.subscribe((value: Project[]) => {
       this.projectList = value;
-      this.endpointService.getEndpointsData().subscribe((endpoints: any) => {
-        if(this.projectList){
-          this.projectList.forEach(project => project.endpoints.forEach(endpoint => {
-            const filtredEndpoints =  endpoints.filter(v => v.name === endpoint.name);
-            if(filtredEndpoints.length){
-              endpoint.endpointStatus = endpoints.filter(v => v.name === endpoint.name)[0].status;
-            }else{
-              endpoint.endpointStatus = "N/A"
-            }
-          }))
-        }
-       });
       if (value) this.dataSource = new MatTableDataSource(value);
       this.progressBarService.stopProgressBar();
     }, () => this.progressBarService.stopProgressBar()));
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 7b956fc..aab4e24 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
@@ -124,7 +124,7 @@
               <label class="label">Slave instance size</label>
               <div class="control selector-wrapper">
                 <mat-form-field>
-                  <mat-label>Select {{ DICTIONARY.notebook_instance_size }}</mat-label>
+                  <mat-label>Select instance size</mat-label>
                   <mat-select formControlName="shape_slave" disableOptionCentering>
                     <mat-optgroup *ngFor="let item of (selectedImage.computation_resources_shapes | keys)"
                       [label]="item.key | underscoreless">
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 eeb8bdb..28f01cd 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
@@ -139,9 +139,9 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
   private initFormModel(): void {
     this.resourceForm = this._fb.group({
       template_name: ['', [Validators.required]],
-      version: [''],
+      version: ['', Validators.required],
       shape_master: ['', Validators.required],
-      shape_slave: ['', Validators.required],    
+      shape_slave: ['', Validators.required],
       cluster_alias_name: ['', [Validators.required, Validators.pattern(PATTERNS.namePattern), Validators.maxLength(DICTIONARY[this.PROVIDER].max_cluster_name_length),
       this.checkDuplication.bind(this)]],
       instance_number: ['', [Validators.required, Validators.pattern(PATTERNS.nodeCountPattern), this.validInstanceNumberRange.bind(this)]],
@@ -158,8 +158,10 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
     this.resourceForm.get('template_name').valueChanges.subscribe(val => {
       if (val === 'AWS EMR cluster') {
         this.resourceForm.addControl('shape_slave', new FormControl('', [ Validators.required ]));
+        this.resourceForm.addControl('version', new FormControl('', [ Validators.required ]));
       } else {
         this.resourceForm.removeControl('shape_slave');
+        this.resourceForm.removeControl('version');
       }
       this.resourceForm.updateValueAndValidity();
     });
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 bcecfd2..a6c2610 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 && updateAccountCredentialsForm.value.password === updateAccountCredentialsForm.value.confirmPassword">
+                  *ngIf="!updateAccountCredentialsForm.controls['password'].valid && updateAccountCredentialsForm.controls['password'].touched">
                   Field is required. Password must be at least 6 characters
                 </span>
               </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 0961008..4193b0b 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
@@ -86,7 +86,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
                           </label>
                       </div>
                       <p class="confirm-message">
-                          <span *ngIf="!willNotTerminate">All connected computational resources will be terminated as well</span>
+                          <span *ngIf="!willNotTerminate">All connected computational resources will be terminated as well.</span>
                       </p>
                   </div>
                   <mat-list *ngIf="data.item.endpoints?.length">


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