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/18 12:24:59 UTC

[incubator-dlab] branch DLAB-867 updated: [DLAB-867]: added placeholder; filter fixes

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

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


The following commit(s) were added to refs/heads/DLAB-867 by this push:
     new 0a8a060  [DLAB-867]: added placeholder; filter fixes
0a8a060 is described below

commit 0a8a0601e71aea530396018555eec5b2c0dc29bf
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Thu Jul 18 15:24:48 2019 +0300

    [DLAB-867]: added placeholder; filter fixes
---
 .../resources-grid/resources-grid.component.html        | 17 ++++++++++-------
 .../resources-grid/resources-grid.component.ts          | 10 ++++++----
 .../webapp/src/app/resources/resources.component.html   |  3 +--
 .../webapp/src/app/resources/resources.component.ts     |  1 +
 4 files changed, 18 insertions(+), 13 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 62c1022..772490d 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 && !collapseFilterRow">filter_list</span>
-            <span [hidden]="filtering && filterForm[column.name].length > 0 && !collapseFilterRow">more_vert</span>
+            <span *ngIf="filtering && filterForm[column.name].length > 0 && collapsedFilterRow">filter_list</span>
+            <span [hidden]="filtering && filterForm[column.name].length > 0 && collapsedFilterRow">more_vert</span>
           </i>
         </button>
       </th>
@@ -129,9 +129,7 @@
               </ul>
             </bubble-up>
           </td>
-
         </tr>
-
       </td>
     </ng-container>
 
@@ -182,19 +180,24 @@
         </div>
       </th>
     </ng-container>
-
+    <ng-container matColumnDef="placeholder">
+      <td mat-footer-cell *matFooterCellDef colspan="6" class="info">
+        To start working, please, create new environment
+      </td>
+    </ng-container>
     <!-- FILTER END -->
 
     <tr mat-header-row *matHeaderRowDef="displayedColumns" class="header-row"></tr>
 
-    <tr mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true" class="filter-row"></tr>
+    <tr [hidden]="collapsedFilterRow" mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true"
+      class="filter-row"></tr>
 
     <tr mat-row *matRowDef="let element; columns: ['project']" class="element-row"
       [class.expanded-row]="expandedElement === element"
       (click)="expandedElement = expandedElement === element ? null : element">
     </tr>
     <tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="detail-row"></tr>
-
+    <tr [hidden]="filteredEnvironments?.length" mat-footer-row *matFooterRowDef="['placeholder']"></tr>
   </table>
 
 </section>
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 a964b52..65b31ad 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
@@ -58,6 +58,10 @@ export class ResourcesGridComponent implements OnInit {
 
   environments: Exploratory[];
   forse: boolean = true;
+
+  collapsedFilterRow: boolean = false;
+
+
   filteredEnvironments: Exploratory[] = [];
   filterConfiguration: FilterConfigurationModel = new FilterConfigurationModel('', [], [], [], '');
   filterForm: FilterConfigurationModel = new FilterConfigurationModel('', [], [], [], '');
@@ -78,10 +82,8 @@ export class ResourcesGridComponent implements OnInit {
 
 
 
-
-
   isOutscreenDropdown: boolean;
-  collapseFilterRow: boolean = false;
+
   filtering: boolean = false;
   activeFiltering: boolean = false;
   healthStatus: GeneralEnvironmentStatus;
@@ -111,7 +113,7 @@ export class ResourcesGridComponent implements OnInit {
   }
 
   public toggleFilterRow(): void {
-    this.collapseFilterRow = !this.collapseFilterRow;
+    this.collapsedFilterRow = !this.collapsedFilterRow;
   }
 
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
index 3342b61..7595650 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
@@ -29,8 +29,7 @@
       <button mat-raised-button class="butt butt-tool" (click)="manageUngit()">
         <i class="material-icons"></i>Git credentials
       </button>
-      <button mat-raised-button class="butt butt-tool" (click)="toggleFiltering()"
-        [disabled]="!exploratoryEnvironments.length">
+      <button mat-raised-button class="butt butt-tool" (click)="toggleFiltering()">
         <span *ngIf="!resourcesGrid.activeFiltering">
           <i class="material-icons">visibility_off</i> Show active
         </span>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
index 4831f99..bf091c3 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
@@ -48,6 +48,7 @@ export class ResourcesComponent implements OnInit {
 
   ngOnInit() {
     this.getEnvironmentHealthStatus();
+    this.exploratoryEnvironments = this.resourcesGrid.environments;
   }
 
   public createEnvironment(): void {


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