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/29 14:09:21 UTC

[incubator-dlab] branch DLAB-845 created (now cfce956)

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

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


      at cfce956  [DLAB-845]: added error handling message for custom tag on env creation

This branch includes the following new commits:

     new 368bdc9  [DLAB-845]: added validation check for uniq env name per user
     new 0d33e6a  [DLAB-845]: error message fixes on notebook creation dialog
     new 92583d8  [DLAB-845]: added validation check for uniq cluster name per user
     new cfce956  [DLAB-845]: added error handling message for custom tag on env creation

The 4 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] 04/04: [DLAB-845]: added error handling message for custom tag on env creation

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

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

commit cfce9560d12aaa4f18257f595e703824988ef75f
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon Jul 29 17:09:11 2019 +0300

    [DLAB-845]: added error handling message for custom tag on env creation
---
 .../exploratory/create-environment/create-environment.component.html   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
index 1f7bf78..4d8a247 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
@@ -140,6 +140,9 @@
           <div class="control">
             <input type="text" class="form-control" placeholder="Enter custom tag" formControlName="custom_tag">
           </div>
+          <span class="error"
+            *ngIf="!createExploratoryForm?.controls.custom_tag.valid && createExploratoryForm?.controls.custom_tag.dirty">
+            Custom tag can only contain letters, numbers, hyphens and '_' but can not end with special characters</span>
         </div>
 
         <div *ngIf="currentTemplate">


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


[incubator-dlab] 02/04: [DLAB-845]: error message fixes on notebook creation dialog

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

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

commit 0d33e6a7f0eac1fc50e15b29cade8d37e3581b56
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon Jul 29 16:21:10 2019 +0300

    [DLAB-845]: error message fixes on notebook creation dialog
---
 .../create-environment/create-environment.component.html      |  2 +-
 .../create-environment/create-environment.component.scss      | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
index 771d325..1f7bf78 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.html
@@ -98,7 +98,7 @@
           </div>
         </div>
 
-        <div class="control-group">
+        <div class="control-group name-control">
           <label class="label">Name</label>
           <div class="control">
             <input [class.danger_field]="notebookExist || !createExploratoryForm?.controls['name'].valid
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
index c63436c..f99515f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/create-environment/create-environment.component.scss
@@ -23,6 +23,7 @@
     opacity: 0;
     visibility: hidden;
     text-align: left;
+
     &.show {
       height: 200px;
       visibility: visible;
@@ -30,6 +31,7 @@
       position: relative;
       margin-top: 10px;
     }
+
     textarea {
       height: 100%;
       background: #f8f8f8 !important;
@@ -38,6 +40,7 @@
       line-height: 1.5;
       font-family: Consolas, monospace;
     }
+
     span {
       &.danger_color {
         position: absolute;
@@ -52,11 +55,15 @@
   .error {
     position: absolute;
     right: 0;
-    bottom: 3px;
+    top: 35px;
+  }
+
+  &.name-control {
+    padding-bottom: 35px;
   }
 }
 
 .content-box {
   max-height: 560px;
   overflow-y: auto;
-}
\ No newline at end of file
+}


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


[incubator-dlab] 01/04: [DLAB-845]: added validation check for uniq env name per user

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

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

commit 368bdc9418f730c95ab3dced085573c8a48cac62
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon Jul 29 16:20:18 2019 +0300

    [DLAB-845]: added validation check for uniq env name per user
---
 .../resources-grid/resources-grid.component.html   |  6 +--
 .../resources-grid/resources-grid.component.ts     | 50 ++++++++++------------
 2 files changed, 26 insertions(+), 30 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
index c0aa2f6..6eb2810 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
@@ -29,8 +29,8 @@
         <span class="label">{{ column.title }}</span>
         <button mat-icon-button *ngIf="column.filtering" aria-label="More" class="ar" (click)="toggleFilterRow()">
           <i class="material-icons">
-            <span *ngIf="filtering && filterForm[column.name].length > 0 && collapsedFilterRow">filter_list</span>
-            <span [hidden]="filtering && filterForm[column.name].length > 0 && collapsedFilterRow">more_vert</span>
+            <span *ngIf="filtering && filterForm[column.name].length > 0 && collapseFilterRow">filter_list</span>
+            <span [hidden]="filtering && filterForm[column.name].length > 0 && collapseFilterRow">more_vert</span>
           </i>
         </button>
       </th>
@@ -194,7 +194,7 @@
 
     <tr mat-header-row *matHeaderRowDef="displayedColumns" class="header-row"></tr>
 
-    <tr [hidden]="!collapsedFilterRow" mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true"
+    <tr [hidden]="!collapseFilterRow" mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true"
       class="filter-row"></tr>
 
     <tr mat-row *matRowDef="let element; columns: ['project']" class="element-row"
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index c55c29f..621b299 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -59,8 +59,10 @@ export class ResourcesGridComponent implements OnInit {
   environments: Exploratory[];
   forse: boolean = true;
 
-  collapsedFilterRow: boolean = false;
-
+  collapseFilterRow: boolean = false;
+  filtering: boolean = false;
+  activeFiltering: boolean = false;
+  healthStatus: GeneralEnvironmentStatus;
 
   filteredEnvironments: Exploratory[] = [];
   filterConfiguration: FilterConfigurationModel = new FilterConfigurationModel('', [], [], [], '');
@@ -82,12 +84,6 @@ export class ResourcesGridComponent implements OnInit {
 
 
 
-  isOutscreenDropdown: boolean;
-
-  filtering: boolean = false;
-  activeFiltering: boolean = false;
-  healthStatus: GeneralEnvironmentStatus;
-
 
 
 
@@ -116,9 +112,25 @@ export class ResourcesGridComponent implements OnInit {
   }
 
   public toggleFilterRow(): void {
-    this.collapsedFilterRow = !this.collapsedFilterRow;
+    this.collapseFilterRow = !this.collapseFilterRow;
   }
 
+  public onUpdate($event) {
+    this.filterForm[$event.type] = $event.model;
+  }
+
+  public showActiveInstances(): void {
+    this.filterForm = this.loadUserPreferences(this.filterActiveInstances());
+    this.applyFilter_btnClick(this.filterForm);
+    this.buildGrid();
+  }
+
+  public containsNotebook(notebook_name: string): boolean {
+    if (notebook_name)
+      return this.environments
+        .filter(project => project.exploratory
+          .some(item => CheckUtils.delimitersFiltering(notebook_name) === CheckUtils.delimitersFiltering(item.name))).length > 0;
+  }
 
 
   // PRIVATE
@@ -189,11 +201,7 @@ export class ResourcesGridComponent implements OnInit {
 
 
 
-  showActiveInstances(): void {
-    this.filterForm = this.loadUserPreferences(this.filterActiveInstances());
-    this.applyFilter_btnClick(this.filterForm);
-    this.buildGrid();
-  }
+
 
   isResourcesInProgress(notebook) {
     // const filteredEnv = this.environments.find(env => env.exploratory.find(el => el.name === notebook.name));
@@ -240,9 +248,7 @@ export class ResourcesGridComponent implements OnInit {
         this.activeFiltering = true;
   }
 
-  onUpdate($event) {
-    this.filterForm[$event.type] = $event.model;
-  }
+
 
   resetFilterConfigurations(): void {
     this.filterForm.resetConfigurations();
@@ -251,16 +257,6 @@ export class ResourcesGridComponent implements OnInit {
   }
 
 
-
-  containsNotebook(notebook_name: string): boolean {
-    // if (notebook_name)
-    //   for (let index = 0; index < this.environments.length; index++)
-    //     if (CheckUtils.delimitersFiltering(notebook_name) === CheckUtils.delimitersFiltering(this.environments[index].name))
-    //       return true;
-
-    return false;
-  }
-
   getUserPreferences(): void {
     this.userResourceService.getUserPreferences()
       .subscribe((result: FilterConfigurationModel) => {


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


[incubator-dlab] 03/04: [DLAB-845]: added validation check for uniq cluster name per user

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

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

commit 92583d8fc43fd0d5ddc69d480744eb2d2d7a4975
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon Jul 29 17:07:43 2019 +0300

    [DLAB-845]: added validation check for uniq cluster name per user
---
 .../computational-resource-create-dialog.component.ts   | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

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 cf6e72a..13c16de 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
@@ -279,16 +279,11 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
   }
 
   private containsComputationalResource(conputational_resource_name: string): boolean {
-    if (conputational_resource_name)
-      for (let index = 0; index < this.resourcesList.length; index++) {
-        if (this.notebook_instance.name === this.resourcesList[index].name) {
-          for (let iindex = 0; iindex < this.resourcesList[index].resources.length; iindex++) {
-            const computational_name = this.resourcesList[index].resources[iindex].computational_name.toString().toLowerCase();
-            if (CheckUtils.delimitersFiltering(conputational_resource_name) === CheckUtils.delimitersFiltering(computational_name))
-              return true;
-          }
-        }
-      }
-    return false;
+    if (conputational_resource_name) {
+      return this.resourcesList.filter(project => project.exploratory.some(item =>
+        item.resources.some(resource =>
+          CheckUtils.delimitersFiltering(conputational_resource_name) === CheckUtils.delimitersFiltering(resource.computational_name))
+      )).length > 0;
+    }
   }
 }


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