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

ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit a9f53065ea18a0f0b5b51d76f0af1c7f94ecc091
Author: Andriana Kovalyshyn <andriana_kovalys...@epam.com>
AuthorDate: Wed Jun 19 15:54:22 2019 +0300

    [DLAB-805]: clusters creation validation fixes
---
 .../project-form/project-form.component.html       | 64 +++++++++++++---------
 .../resources/webapp/src/app/core/util/patterns.ts |  4 +-
 .../src/app/shared/navbar/navbar.component.html    | 33 ++++-------
 3 files changed, 52 insertions(+), 49 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html
index 92c003e..f16e70b 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html
@@ -20,6 +20,10 @@
 <form [formGroup]="projectForm" novalidate>
   <mat-horizontal-stepper #stepper class="stepper ani">
     <mat-step>
+      <ng-template matStepLabel>Key upload</ng-template>
+      KEY UPLOAD
+    </mat-step>
+    <mat-step>
       <ng-template matStepLabel>Project</ng-template>
       <section class="inner-step mat-reset">
 
@@ -30,41 +34,45 @@
               <div class="control">
                 <input type="text" formControlName="name" placeholder="Enter 
project name"
                   (blur)="generateProjectTag($event)" [ngClass]="{ 
'not-allowed' : item }">
-                <span class="error" 
*ngIf="projectForm?.controls.name.hasError('duplication')">This project name 
already exists.</span>
+                <span class="error" 
*ngIf="projectForm?.controls.name.hasError('duplication')">This project name 
already
+                  exists.</span>
                 <span class="error" *ngIf="!projectForm?.controls.name.valid
                   && !projectForm?.controls.name.hasError('duplication')
-                  && projectForm?.controls.name.dirty">Project name can only 
contain letters, numbers, hyphens and '_' but can not end with special 
characters
+                  && projectForm?.controls.name.dirty">Project name can only 
contain letters, numbers, hyphens and '_'
+                  but can not end with special characters
                 </span>
               </div>
             </div>
             <div class="control-group">
               <label class="label">Project tag</label>
               <div class="control">
-                <input type="text" formControlName="tag" placeholder="dlab-{ 
project name }" [ngClass]="{ 'not-allowed' : item }">
+                <input type="text" formControlName="tag" placeholder="dlab-{ 
project name }"
+                  [ngClass]="{ 'not-allowed' : item }">
               </div>
             </div>
             <div class="control-group">
-                <div class="selector-wrapper">
-                  <mat-form-field [ngClass]="{ 'not-allowed' : item }">
-                    <mat-select multiple formControlName="endpoints" 
placeholder="Select endpoints">
-                      <mat-option class="multiple-select" disabled>
-                        <a class="select ani" 
(click)="selectOptions(endpointsList, 'endpoints', 'all')">
-                          <i 
class="material-icons">playlist_add_check</i>&nbsp;All
-                        </a>
-                        <a class="deselect ani" 
(click)="selectOptions(endpointsList, 'endpoints')">
-                          <i class="material-icons">clear</i>&nbsp;None
-                        </a>
-                      </mat-option>
-                      <mat-option *ngFor="let endpoint of endpointsList" 
[value]="endpoint.name">
-                        {{ endpoint.name }}
-                      </mat-option>
-                      <mat-option *ngIf="!endpointsList.length" 
class="multiple-select empty ml-10" disabled>Endpoints list is 
empty</mat-option>
-                    </mat-select>
-                    <button class="caret">
-                      <i class="material-icons">keyboard_arrow_down</i>
-                    </button>
-                  </mat-form-field>
-                </div>
+              <div class="selector-wrapper">
+                <mat-form-field [ngClass]="{ 'not-allowed' : item }">
+                  <mat-select multiple formControlName="endpoints" 
placeholder="Select endpoints">
+                    <mat-option class="multiple-select" disabled>
+                      <a class="select ani" 
(click)="selectOptions(endpointsList, 'endpoints', 'all')">
+                        <i 
class="material-icons">playlist_add_check</i>&nbsp;All
+                      </a>
+                      <a class="deselect ani" 
(click)="selectOptions(endpointsList, 'endpoints')">
+                        <i class="material-icons">clear</i>&nbsp;None
+                      </a>
+                    </mat-option>
+                    <mat-option *ngFor="let endpoint of endpointsList" 
[value]="endpoint.name">
+                      {{ endpoint.name }}
+                    </mat-option>
+                    <mat-option *ngIf="!endpointsList.length" 
class="multiple-select empty ml-10" disabled>Endpoints
+                      list is empty</mat-option>
+                  </mat-select>
+                  <button class="caret">
+                    <i class="material-icons">keyboard_arrow_down</i>
+                  </button>
+                </mat-form-field>
+              </div>
             </div>
           </div>
 
@@ -96,7 +104,8 @@
                   <mat-option *ngFor="let group of groupsList" [value]="group">
                     {{ group }}
                   </mat-option>
-                  <mat-option *ngIf="!groupsList.length" 
class="multiple-select ml-10" disabled>Groups list is empty</mat-option>
+                  <mat-option *ngIf="!groupsList.length" 
class="multiple-select ml-10" disabled>Groups list is empty
+                  </mat-option>
                 </mat-select>
                 <button class="caret">
                   <i class="material-icons">keyboard_arrow_down</i>
@@ -110,11 +119,12 @@
                 class="material-icons">keyboard_arrow_left</i>Back</button>
             <button mat-raised-button type="button" class="butt butt-success" 
[disabled]="!projectForm.valid"
               (click)="confirm(projectForm.value)">
-              <span *ngIf="item; else update">Update</span><ng-template 
#update>Create</ng-template>
+              <span *ngIf="item; else update">Update</span>
+              <ng-template #update>Create</ng-template>
             </button>
           </div>
         </div>
       </div>
     </mat-step>
   </mat-horizontal-stepper>
-</form>
\ No newline at end of file
+</form>
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts 
b/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
index 65996ea..c99ac09 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
@@ -20,5 +20,7 @@
 export const PATTERNS = {
   namePattern: '[-_a-zA-Z0-9]*[_-]*[a-zA-Z0-9]+',
   delimitersRegex: '/[-_]?/g',
-  url: '[-_a-zA-Z0-9/:.#!*();:@&=+$,/?#[]]*[_-]*[a-zA-Z0-9]+'
+  url: '[-_a-zA-Z0-9/:.#!*();:@&=+$,/?#[]]*[_-]*[a-zA-Z0-9]+',
+  nodeCountPattern: '^[1-9]\\d*$',
+  integerRegex: '^[0-9]*$'
 }
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index a123015..b7eec53 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -69,9 +69,7 @@
   <mat-sidenav #drawer mode="side" opened role="navigation" 
[style.width]="isExpanded ? '220px' : '60px'">
     <mat-nav-list>
       <nav>
-        <a class="nav-item" 
-          [routerLink]="['/resources_list']"
-          [routerLinkActive]="['active']"
+        <a class="nav-item" [routerLink]="['/resources_list']" 
[routerLinkActive]="['active']"
           [routerLinkActiveOptions]="{exact:true}">
           <span *ngIf="isExpanded; else resources">List of Resources</span>
           <ng-template #resources><i 
class="material-icons">dashboard</i></ng-template>
@@ -79,32 +77,25 @@
         <a class="nav-item has-children" *ngIf="healthStatus?.admin">
           <span *ngIf="isExpanded">Administration</span>
 
-          <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : 
'0'"
-             [routerLink]="['/roles']"
-             [routerLinkActive]="['active']"
-             [routerLinkActiveOptions]="{exact:true}">
-             <span *ngIf="isExpanded; else roles">Roles</span>
-             <ng-template #roles><i 
class="material-icons">account_box</i></ng-template>
+          <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : 
'0'" [routerLink]="['/roles']"
+            [routerLinkActive]="['active']" 
[routerLinkActiveOptions]="{exact:true}">
+            <span *ngIf="isExpanded; else roles">Roles</span>
+            <ng-template #roles><i 
class="material-icons">account_box</i></ng-template>
           </a>
-          <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : 
'0'"
-             [routerLink]="['/projects']"
-             [routerLinkActive]="['active']"
-             [routerLinkActiveOptions]="{exact:true}">
-             <span *ngIf="isExpanded; else projects">Projects</span>
-             <ng-template #projects><i 
class="material-icons">dns</i></ng-template>
+          <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : 
'0'" [routerLink]="['/projects']"
+            [routerLinkActive]="['active']" 
[routerLinkActiveOptions]="{exact:true}">
+            <span *ngIf="isExpanded; else projects">Projects</span>
+            <ng-template #projects><i 
class="material-icons">dns</i></ng-template>
           </a>
           <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : 
'0'"
-            [routerLink]="['/environment_management']"
-            [routerLinkActive]="['active']"
+            [routerLink]="['/environment_management']" 
[routerLinkActive]="['active']"
             [routerLinkActiveOptions]="{exact:true}">
             <span *ngIf="isExpanded; else env">Environment Management</span>
             <ng-template #env><i 
class="material-icons">settings</i></ng-template>
           </a>
         </a>
-        <a *ngIf="healthStatus?.billingEnabled" class="nav-item"
-          [routerLink]="['/billing_report']"
-          [routerLinkActive]="['active']"
-          [routerLinkActiveOptions]="{exact:true}">
+        <a *ngIf="healthStatus?.billingEnabled" class="nav-item" 
[routerLink]="['/billing_report']"
+          [routerLinkActive]="['active']" 
[routerLinkActiveOptions]="{exact:true}">
           <span *ngIf="isExpanded; else billing">Billing Report</span>
           <ng-template #billing><i 
class="material-icons">account_balance_wallet</i></ng-template>
         </a>


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

Reply via email to