You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/08/03 10:50:07 UTC

[incubator-dlab] branch DLAB-1969 created (now d56fc07)

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

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


      at d56fc07  [DLAB-1969]: Added possibility to switch between project on list of resources

This branch includes the following new commits:

     new a19fc8a  [DLAB-1969]: Fix build bugs
     new d56fc07  [DLAB-1969]: Added possibility to switch between project on list of resources

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.



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


[incubator-dlab] 02/02: [DLAB-1969]: Added possibility to switch between project on list of resources

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

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

commit d56fc073835b831c85aff64e3dbcf245901bd71c
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Aug 3 13:47:49 2020 +0300

    [DLAB-1969]: Added possibility to switch between project on list of resources
---
 .../src/app/resources/resources.component.html     | 49 ++++++++++++----------
 .../src/app/resources/resources.component.ts       | 11 +++--
 .../resources/webapp/src/assets/styles/_theme.scss | 15 +++++++
 3 files changed, 50 insertions(+), 25 deletions(-)

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 d47559f..d6b9616 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
@@ -18,7 +18,7 @@
   -->
 
 <div class="base-retreat">
-  <div class="sub-nav">
+  <div class="sub-nav resource-btns">
     <div class="selection">
       <span
         matTooltip="{{!healthStatus?.projectAssigned ? 'You are not assigned to any project' : 'You have not any active project'}}"
@@ -26,22 +26,21 @@
         [matTooltipClass]="'bucket-item-tooltip'"
         [matTooltipDisabled]="healthStatus?.projectAssigned && resourcesGrid.activeProjectsList?.length !== 0"
       >
-        <span>{{resourcesGrid.activeProject}}</span>
       <button mat-raised-button class="butt butt-create" (click)="createEnvironment()"
         [disabled]="!healthStatus?.projectAssigned || !resourcesGrid.activeProjectsList?.length">
         <i class="material-icons">add</i>Create new
       </button>
       </span>
       <div class="mat-reset">
-        <div class="control selector-wrapper" *ngIf="projects.length">
+        <div class="control selector-wrapper" *ngIf="resourcesGrid.activeProjectsList?.length">
           <mat-form-field>
             <mat-label>Select active project</mat-label>
             <mat-select [(value)]="resourcesGrid.activeProject">
-              <mat-option *ngIf="projects.length > 1" (click)="setActiveProject()">Show all</mat-option>
-              <mat-option *ngFor="let project of projects" [value]="project.name"
+              <mat-option *ngIf="resourcesGrid.activeProjectsList?.length > 1" (click)="setActiveProject('')">Show all</mat-option>
+              <mat-option *ngFor="let project of resourcesGrid.activeProjectsList" [value]="project.name"
                 (click)="setActiveProject(project.name)">
                 {{ project.name }}</mat-option>
-              <mat-option *ngIf="!projects.length" class="multiple-select ml-10" disabled>Projects list is empty
+              <mat-option *ngIf="!resourcesGrid.activeProjectsList?.length" class="multiple-select ml-10" disabled>Projects list is empty
               </mat-option>
             </mat-select>
             <button class="caret">
@@ -60,23 +59,29 @@
       >
         <button mat-raised-button class="butt butt-tool" (click)="bucketBrowser(this.bucketStatus?.view)"
                 [disabled]="!this.bucketStatus?.view || resourcesGrid.bucketsList?.length === 0">
-        <i class="material-icons"></i>Bucket browser
-      </button>
+          <i class="material-icons"></i>Bucket browser
+        </button>
+      </span>
+      <span>
+        <button mat-raised-button class="butt butt-tool" (click)="manageUngit()">
+          <i class="material-icons"></i>Git credentials
+        </button>
+      </span>
+      <span>
+        <button mat-raised-button class="butt butt-tool show-all-btn" (click)="toggleFiltering()">
+          <span *ngIf="!resourcesGrid.activeFiltering">
+            <i class="material-icons">visibility_off</i> Show active
+          </span>
+          <span *ngIf="resourcesGrid.activeFiltering">
+            <i class="material-icons">visibility</i> Show all
+          </span>
+        </button>
+      </span>
+      <span>
+        <button mat-raised-button class="butt" (click)="refreshGrid()">
+          <i class="material-icons">autorenew</i>Refresh
+        </button>
       </span>
-      <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()">
-        <span *ngIf="!resourcesGrid.activeFiltering">
-          <i class="material-icons">visibility_off</i> Show active
-        </span>
-        <span *ngIf="resourcesGrid.activeFiltering">
-          <i class="material-icons">visibility</i> Show all
-        </span>
-      </button>
-      <button mat-raised-button class="butt" (click)="refreshGrid()">
-        <i class="material-icons">autorenew</i>Refresh
-      </button>
     </div>
   </div>
   <mat-divider></mat-divider>
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 301509d..f5af0e9 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
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-import { Component, OnInit, ViewChild } from '@angular/core';
+import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
 import { ToastrService } from 'ngx-toastr';
 import { MatDialog } from '@angular/material/dialog';
 
@@ -35,10 +35,10 @@ import {BucketBrowserComponent} from './bucket-browser/bucket-browser.component'
   styleUrls: ['./resources.component.scss']
 })
 
-export class ResourcesComponent implements OnInit {
+export class ResourcesComponent implements OnInit, AfterViewInit {
   public exploratoryEnvironments: Exploratory[] = [];
   public healthStatus: any;
-  projects: Project[] = [];
+  projects = [];
 
   @ViewChild(ResourcesGridComponent, { static: true }) resourcesGrid: ResourcesGridComponent;
 
@@ -53,6 +53,11 @@ export class ResourcesComponent implements OnInit {
   ngOnInit() {
     this.getEnvironmentHealthStatus();
     this.exploratoryEnvironments = this.resourcesGrid.environments;
+    this.projects = this.resourcesGrid.activeProjectsList;
+  }
+
+  ngAfterViewInit() {
+    console.log(this.resourcesGrid);
   }
 
   public createEnvironment(): void {
diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
index 3b2e0ff..ee719c5 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
+++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
@@ -969,4 +969,19 @@ mat-progress-bar {
   }
 }
 
+.show-all-btn.mat-raised-button .mat-button-wrapper > *{
+  vertical-align: baseline;
+}
+
+.resource-btns {
+  .mat-raised-button{
+    line-height: 38px;
+  }
+
+  .mat-select-value{
+    margin-top: 1px;
+  }
+}
+
+
 


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


[incubator-dlab] 01/02: [DLAB-1969]: Fix build bugs

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

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

commit a19fc8a1f2d16fe01286ae57f2e73b808f922d95
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Mon Aug 3 12:30:21 2020 +0300

    [DLAB-1969]: Fix build bugs
---
 .../reporting/reporting-grid/reporting-grid.component.ts  | 15 ++++++++++-----
 .../main/resources/webapp/src/assets/styles/_theme.scss   |  5 +++--
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting-grid/reporting-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting-grid/reporting-grid.component.ts
index ef70e24..bf25aae 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting-grid/reporting-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reports/reporting/reporting-grid/reporting-grid.component.ts
@@ -36,24 +36,24 @@ export class ReportingGridComponent implements OnInit, AfterViewInit {
   fullReport: Array<any>;
   isFiltered: boolean = false;
   active: object = {};
+  public isScrollButtonsVisible: boolean;
 
   @ViewChild('nameFilter', { static: false }) filter;
   @ViewChild('tableWrapper', { static: false }) tableWrapper;
-  @ViewChild('table', { static: false }) table;
 
+  @ViewChild('table', { static: false }) table;
   @Output() filterReport: EventEmitter<{}> = new EventEmitter();
   @Output() resetRangePicker: EventEmitter<boolean> = new EventEmitter();
   @Input() filteredReportData: ReportingConfigModel;
-  private isScrollButtonsVisible: boolean;
 
   @HostListener('window:resize', ['$event'])
   onResize(event) {
     this.isScrollButtonsVisible = this.tableWrapper.nativeElement.offsetWidth - this.table._elementRef.nativeElement.offsetWidth < 0;
-    this.isMaxRight = this.tableWrapper.nativeElement.offsetWidth + this.tableWrapper.nativeElement.scrollLeft + 2 <= this.table._elementRef.nativeElement.offsetWidth;
+    this.isMaxRight = this.checkMaxRight();
   }
   @HostListener('scroll', ['$event'])
   scrollTable($event: Event) {
-    this.isMaxRight = this.tableWrapper.nativeElement.offsetWidth + this.tableWrapper.nativeElement.scrollLeft + 2 <= this.table._elementRef.nativeElement.offsetWidth;
+    this.isMaxRight = this.checkMaxRight();
   }
 
 
@@ -71,7 +71,7 @@ export class ReportingGridComponent implements OnInit, AfterViewInit {
   ngAfterViewInit() {
     window.setTimeout(() => {
       this.isScrollButtonsVisible = this.tableWrapper.nativeElement.offsetWidth - this.table._elementRef.nativeElement.offsetWidth < 0;
-      this.isMaxRight = this.tableWrapper.nativeElement.offsetWidth + this.tableWrapper.nativeElement.scrollLeft !== this.table._elementRef.nativeElement.offsetWidth;
+      this.isMaxRight = this.checkMaxRight();
     }, 500);
   }
 
@@ -152,4 +152,9 @@ export class ReportingGridComponent implements OnInit, AfterViewInit {
     }
   }
 
+  private checkMaxRight() {
+    return this.isMaxRight = this.tableWrapper.nativeElement.offsetWidth +
+      this.tableWrapper.nativeElement.scrollLeft + 2 <= this.table._elementRef.nativeElement.offsetWidth;
+  }
+
 }
diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
index f8fc702..3b2e0ff 100644
--- a/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
+++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_theme.scss
@@ -843,7 +843,7 @@ mat-progress-bar {
   box-shadow: none;
 }
 
-#range-picker .ng-daterangepicker .calendar{
+#range-picker .ng-daterangepicker .calendar {
   z-index: 102;
   border: 1px solid rgba(234, 234, 234, 0.64);
   border-radius: 0;
@@ -851,9 +851,10 @@ mat-progress-bar {
   0 2px 2px 0 rgba(0, 0, 0, 0.14),
   0 1px 5px 0 rgba(0, 0, 0, 0.12);
 
-  &.is-to:after{
+  &.is-to:after {
     left: 250px;
   }
+}
 
 #range-picker .ng-daterangepicker .calendar::after {
   border-top: 1px solid rgba(234, 234, 234, 0.64);


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