You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/07/30 08:37:31 UTC

[incubator-dlab] branch DLAB-961 created (now 06443e6)

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

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


      at 06443e6  [DLAB-961]: added extra item check on edit project form

This branch includes the following new commits:

     new 06443e6  [DLAB-961]: added extra item check on edit project form

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-961]: added extra item check on edit project form

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

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

commit 06443e6f397c556f7c9ef301d643311ccbc6f2b8
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Tue Jul 30 11:37:21 2019 +0300

    [DLAB-961]: added extra item check on edit project form
---
 .../project/project-form/project-form.component.html      | 15 +++++++++------
 .../project/project-form/project-form.component.ts        |  9 ++++-----
 2 files changed, 13 insertions(+), 11 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 b689d90..d6523e8 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
@@ -69,8 +69,9 @@
                 <span class="error" *ngIf="!projectForm?.controls.name.valid
                   && !projectForm?.controls.name.hasError('duplication')
                   && !projectForm?.controls.name.hasError('limit')
-                  && 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>
                 <span class="error" *ngIf="projectForm?.controls.name.hasError('limit')">
                   Project name cannot exceed 50 characters
@@ -85,7 +86,8 @@
               </div>
             </div>
             <div class="control-group">
-              <div class="selector-wrapper">
+              <label class="label">Endpoints</label>
+              <div class="control selector-wrapper">
                 <mat-form-field>
                   <mat-select multiple formControlName="endpoints" placeholder="Select endpoints">
                     <mat-option class="multiple-select" disabled>
@@ -101,8 +103,8 @@
                       [disabled]="isDisabled(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-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>
@@ -128,7 +130,8 @@
       <div class="inner-step mat-reset">
         <div class="form-block split">
           <div class="control-group">
-            <div class="selector-wrapper">
+            <label class="label">Groups</label>
+            <div class="control selector-wrapper">
               <mat-form-field>
                 <mat-select multiple formControlName="groups" placeholder="Select user groups">
                   <mat-option class="multiple-select" disabled>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
index fbd6f53..26d50c5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
@@ -62,10 +62,9 @@ export class ProjectFormComponent implements OnInit {
     this.getGroupsData();
     this.getEndpointsData();
 
-    this.subscriptions.add(this.projectDataService._projects.subscribe(
-      (value: Project[]) => {
-        if (value) this.projectList = value;
-      }));
+    this.subscriptions.add(this.projectDataService._projects.subscribe((value: Project[]) => {
+      if (value) this.projectList = value;
+    }));
     if (this.item) {
       this.editSpecificProject(this.item);
       this.stepper.selectedIndex = 1;
@@ -146,7 +145,7 @@ export class ProjectFormComponent implements OnInit {
   }
 
   isDisabled(endpoint: any): boolean {
-    return this.item.endpoints.includes(endpoint);
+    return this.item && this.item.endpoints.includes(endpoint);
   }
 
   private getLabel(file: File): string {


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