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/09/13 08:24:07 UTC

[incubator-dlab] branch DLAB-1056 updated (1cd5653 -> 42803a4)

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

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


    from 1cd5653  moved servise pages; separate service page module
     new f303f8a  [DLAB-1056]: added project parameter to configuration model
     new 42803a4  [DLAB-987]: exteneded billing filtering; added expanding

The 2 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.


Summary of changes:
 .../reporting-grid/reporting-grid.component.html   | 85 +++++++++++++++++++---
 .../reporting-grid/reporting-grid.component.scss   | 11 ++-
 .../webapp/src/dictionary/aws.dictionary.ts        |  4 +-
 .../webapp/src/dictionary/azure.dictionary.ts      |  4 +-
 .../webapp/src/dictionary/gcp.dictionary.ts        |  4 +-
 5 files changed, 92 insertions(+), 16 deletions(-)


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


[incubator-dlab] 01/02: [DLAB-1056]: added project parameter to configuration model

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

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

commit f303f8a74a3803b314f51c127980d96eec4925bc
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Sep 13 11:22:24 2019 +0300

    [DLAB-1056]: added project parameter to configuration model
---
 .../src/main/resources/webapp/src/dictionary/aws.dictionary.ts        | 4 +++-
 .../src/main/resources/webapp/src/dictionary/azure.dictionary.ts      | 4 +++-
 .../src/main/resources/webapp/src/dictionary/gcp.dictionary.ts        | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
index 49677fe..e4b3db3 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
@@ -96,7 +96,8 @@ export class ReportingConfigModel {
         public shape: Array<string>,
         public date_start: string,
         public date_end: string,
-        public dlab_id: string
+        public dlab_id: string,
+        public project?: Array<string>
     ) { }
 
     defaultConfigurations(): void {
@@ -108,5 +109,6 @@ export class ReportingConfigModel {
         this.date_start = '';
         this.date_end = '';
         this.dlab_id = '';
+        // this.project = [];
     }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
index 73f0661..535dce6 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
@@ -97,7 +97,8 @@ export class ReportingConfigModel {
         public size: Array<string>,
         public date_start: string,
         public date_end: string,
-        public dlab_id: string
+        public dlab_id: string,
+        public project?: Array<string>
     ) { }
 
     defaultConfigurations(): void {
@@ -109,5 +110,6 @@ export class ReportingConfigModel {
         this.date_start = '';
         this.date_end = '';
         this.dlab_id = '';
+        this.project = [];
     }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
index ff3e9eb..8b2c3eb 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
@@ -102,7 +102,8 @@ export class ReportingConfigModel {
         public shape: Array<string>,
         public date_start: string,
         public date_end: string,
-        public dlab_id: string
+        public dlab_id: string,
+        public project?: Array<string>
     ) { }
 
     defaultConfigurations(): void {
@@ -114,5 +115,6 @@ export class ReportingConfigModel {
         this.date_start = '';
         this.date_end = '';
         this.dlab_id = '';
+        this.project = [];
     }
 }


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


[incubator-dlab] 02/02: [DLAB-987]: exteneded billing filtering; added expanding

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

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

commit 42803a4facde602894be91c9cc1de96a2edb2962
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Sep 13 11:23:57 2019 +0300

    [DLAB-987]: exteneded billing filtering; added expanding
---
 .../reporting-grid/reporting-grid.component.html   | 85 +++++++++++++++++++---
 .../reporting-grid/reporting-grid.component.scss   | 11 ++-
 2 files changed, 83 insertions(+), 13 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
index 09118de..eada0ff 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.html
@@ -21,31 +21,71 @@
   <table mat-table [dataSource]="reportData" class="data-grid reporting mat-elevation-z6">
 
     <ng-container matColumnDef="name" sticky>
-      <th mat-header-cell *matHeaderCellDef class="env_name"> Environment name </th>
+      <th mat-header-cell *matHeaderCellDef class="env_name">
+        <span class="label"> Environment name </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.dlab_id.length > 0; else dlab_id_filtered">filter_list</span>
+            <ng-template #dlab_id_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
       <td mat-cell *matCellDef="let element"> {{element[DICTIONARY.billing.dlabId]}} </td>
       <td mat-footer-cell *matFooterCellDef> Total </td>
     </ng-container>
 
     <ng-container matColumnDef="user">
-      <th mat-header-cell *matHeaderCellDef class="th_user"> User </th>
-      <td mat-cell *matCellDef="let element"> {{element.user}} </td>
+      <th mat-header-cell *matHeaderCellDef class="th_user">
+        <span class="label"> User </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.user.length > 0; else user_filtered">filter_list</span>
+            <ng-template #user_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
+      <td mat-cell *matCellDef=" let element"> {{element.user}} </td>
       <td mat-footer-cell *matFooterCellDef></td>
     </ng-container>
 
     <ng-container matColumnDef="project">
-      <th mat-header-cell *matHeaderCellDef class="th_project"> Project </th>
+      <th mat-header-cell *matHeaderCellDef class="th_project">
+        <span class="label">Project</span>
+        <!-- <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.project.length > 0; else project_filtered">filter_list</span>
+            <ng-template #project_filtered>more_vert</ng-template>
+          </i>
+        </button> -->
+      </th>
       <td mat-cell *matCellDef="let element"> {{element.project}} </td>
       <td mat-footer-cell *matFooterCellDef></td>
     </ng-container>
 
     <ng-container matColumnDef="type">
-      <th mat-header-cell *matHeaderCellDef class="th_type"> Resource Type </th>
+      <th mat-header-cell *matHeaderCellDef class="th_type">
+        <span class="label"> Resource Type </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.resource_type.length > 0; else type_filtered">filter_list</span>
+            <ng-template #type_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
       <td mat-cell *matCellDef="let element"> {{element[DICTIONARY.billing.resourceType]}} </td>
       <td mat-footer-cell *matFooterCellDef></td>
     </ng-container>
 
     <ng-container matColumnDef="status">
-      <th mat-header-cell *matHeaderCellDef class="th_status"> Status </th>
+      <th mat-header-cell *matHeaderCellDef class="th_status">
+        <span class="label"> Status </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.status.length > 0; else status_filtered">filter_list</span>
+            <ng-template #status_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
       <td mat-cell *matCellDef="let element">
         <span class="status" ngClass="{{ element.status.toLowerCase() || '' }}"
           *ngIf="element.status">{{ element.status.toLowerCase() }}</span>
@@ -55,7 +95,15 @@
     </ng-container>
 
     <ng-container matColumnDef="shape">
-      <th mat-header-cell *matHeaderCellDef class="th_shape"> {{ DICTIONARY.instance_size}} </th>
+      <th mat-header-cell *matHeaderCellDef class="th_shape">
+        <span class="label"> {{ DICTIONARY.instance_size}} </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span *ngIf="filteredReportData.shape.length > 0; else shape_filtered">filter_list</span>
+            <ng-template #shape_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
       <td mat-cell *matCellDef="let element">
         <span [outerHTML]="element[DICTIONARY.billing.instance_size] | lineBreak"></span>
       </td>
@@ -63,7 +111,16 @@
     </ng-container>
 
     <ng-container matColumnDef="service">
-      <th mat-header-cell *matHeaderCellDef class="service">{{ DICTIONARY.service}}</th>
+      <th mat-header-cell *matHeaderCellDef class="service">
+        <span class="label"> {{ DICTIONARY.service}} </span>
+        <button mat-icon-button aria-label="More" class="ar" (click)="toggleFilterRow()">
+          <i class="material-icons">
+            <span
+              *ngIf="filteredReportData[DICTIONARY.billing.instance_size].length > 0; else service_filtered">filter_list</span>
+            <ng-template #service_filtered>more_vert</ng-template>
+          </i>
+        </button>
+      </th>
       <td mat-cell *matCellDef="let element">
         {{ element[DICTIONARY.billing.service] }}
         <span *ngIf="element.resource_type">({{ element.resource_type }})</span>
@@ -72,7 +129,9 @@
     </ng-container>
 
     <ng-container matColumnDef="charge" stickyEnd>
-      <th mat-header-cell *matHeaderCellDef class="th_charges"> Service Charges </th>
+      <th mat-header-cell *matHeaderCellDef class="th_charges">
+        <span class="label"> Service Charges </span>
+      </th>
 
       <td mat-cell *matCellDef="let element">
         {{ element[DICTIONARY.billing.cost] }} {{ element[DICTIONARY.billing.currencyCode] }}
@@ -98,7 +157,8 @@
     </ng-container>
     <ng-container matColumnDef="project-filter">
       <th mat-header-cell *matHeaderCellDef>
-
+        <!-- <multi-select-dropdown *ngIf="filterConfiguration" (selectionChange)="onUpdate($event)" [type]="'project'"
+          [items]="filterConfiguration.project" [model]="filteredReportData.project"></multi-select-dropdown> -->
       </th>
     </ng-container>
     <ng-container matColumnDef="type-filter">
@@ -149,9 +209,10 @@
     </ng-container>
 
 
-    <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
+    <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true" class="header-row"></tr>
 
-    <tr mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true" class="filter-row"></tr>
+    <tr [hidden]="!collapseFilterRow" mat-header-row *matHeaderRowDef="displayedFilterColumns; sticky: true"
+      class="filter-row"></tr>
     <tr mat-row *matRowDef="let row; columns: displayedColumns;" class="DATA"></tr>
 
     <tr [hidden]="!reportData?.length" mat-footer-row *matFooterRowDef="displayedColumns; sticky: true"></tr>
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
index 65d60ee..29fb1b2 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting-grid/reporting-grid.component.scss
@@ -65,7 +65,7 @@
   }
 
   .th_type {
-    width: 8%;
+    width: 12%;
   }
 
   .th_status {
@@ -82,6 +82,15 @@
     text-align: right;
   }
 
+  .header-row {
+    .label {
+      display: inline-block;
+      padding-top: 10px;
+      vertical-align: super !important;
+      padding-left: 5px;
+    }
+  }
+
   .filter-row {
     .actions {
       text-align: right;


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