Skip to content

Commit

Permalink
removing log
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiovincenzi committed Sep 17, 2024
1 parent 319832e commit c8b905c
Show file tree
Hide file tree
Showing 7 changed files with 1,045 additions and 0 deletions.
146 changes: 146 additions & 0 deletions web/src/app/apps-view/apps-view.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->

<div class="top-section">
<div class="left-side">
<div class="dropdown-wrapper">
<label class="dropdown-label">Partition: </label>
<mat-form-field>
<mat-select [(value)]="partitionSelected" (selectionChange)="onPartitionSelectionChanged($event)">
<mat-option *ngFor="let part of partitionList" [value]="part.value">
{{ part.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="dropdown-wrapper">
<label class="dropdown-label">Queue: </label>
<mat-form-field>
<mat-select [(value)]="leafQueueSelected" (selectionChange)="onQueueSelectionChanged($event)" #queueSelect>
<mat-option *ngFor="let queue of leafQueueList" [value]="queue.value">
{{ queue.name }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div class="right-side">
<mat-form-field class="search-wrapper white-mat-form-field">
<input matInput type="text" [(ngModel)]="searchText" placeholder="Search By Application ID" #searchInput />
<button class="clear-btn" *ngIf="searchText" (click)="onClearSearch()" matTooltip="Clear Search"
matTooltipShowDelay="500">
<i class="far fa-times-circle"></i>
</button>
<i *ngIf="!searchText" class="fas fa-search search-icon"></i>
</mat-form-field>
<div class="btn-wrapper">
<button class="btn" (click)="toggle()" [style.background-color]="detailToggle ? '#313d54' : '#f5f5f5'">
<i class="material-icons __icon" [style.color]="detailToggle ? '#f5f5f5' : '#313d54' ">more_horiz</i>
</button>
</div>
</div>
</div>
<div class="apps-view">
<div class="mat-elevation-z8">
<mat-table [dataSource]="appDataSource" matSort #appSort="matSort">
<ng-container [matColumnDef]="columnDef.colId" *ngFor="let columnDef of appColumnDef">
<mat-header-cell *matHeaderCellDef mat-sort-header [style.flex]="columnDef.colWidth || 1">{{ columnDef.colName
}}</mat-header-cell>

<ng-container *ngIf="columnDef.colId === 'submissionTime'; else renderNext_1">
<mat-cell *matCellDef="let element" [style.flex]="columnDef.colWidth || 1">{{
element['formattedSubmissionTime'] }}</mat-cell>
</ng-container>

<ng-container *ngIf="columnDef.colId === 'lastStateChangeTime'; else renderNext_1">
<mat-cell *matCellDef="let element" [style.flex]="columnDef.colWidth || 1">{{
element['formattedlastStateChangeTime'] }}</mat-cell>
</ng-container>

<ng-template #renderNext_1>
<ng-container
*ngIf="columnDef.colId === 'usedResource' || columnDef.colId === 'pendingResource'; else renderNext_1">
<mat-cell *matCellDef="let element" [style.flex]="columnDef.colWidth || 1">
<ng-container *ngIf="columnDef.colFormatter; else showAppRawData">
<ng-container *ngIf="columnDef.colFormatter(element[columnDef.colId]) as colValue">
<mat-chip-set aria-label="Resources" [attr.data-test]="formatResources(colValue)">
<ng-container *ngFor="let resource of formatResources(colValue); let i = index">
<mat-chip class="mat-chip" *ngIf="i<2">
{{ resource }}
</mat-chip>
<mat-chip class="mat-chip" *ngIf="i>=2 && detailToggle">
{{ resource }}
</mat-chip>
</ng-container>
</mat-chip-set>
</ng-container>
</ng-container>
<ng-template #showAppRawData>
<span>{{ element[columnDef.colId] }}</span>
</ng-template>
</mat-cell>
</ng-container>

<ng-template #renderNext_1>
<ng-container *ngIf="columnDef.colFormatter; else renderNext_2">
<mat-cell *matCellDef="let element">
<span [innerText]="columnDef.colFormatter(element[columnDef.colId])"></span>
</mat-cell>
</ng-container>
</ng-template>
</ng-template>

<ng-template #renderNext_2>
<mat-cell *matCellDef="let element">{{ element[columnDef.colId] || 'n/a' }}</mat-cell>
</ng-template>
</ng-container>

<ng-container matColumnDef="indicatorIcon">
<mat-header-cell *matHeaderCellDef class="indicator-icon"></mat-header-cell>
<mat-cell *matCellDef="let element" class="indicator-icon">
<span>
<i class="fas fa-plus-circle" *ngIf="!element.isSelected"></i>
<i class="fas fa-minus-circle" *ngIf="element.isSelected"></i>
</span>
</mat-cell>
</ng-container>

<ng-container matColumnDef="noRecord">
<mat-footer-cell *matFooterCellDef>
<div class="no-record">No records found</div>
</mat-footer-cell>
</ng-container>

<mat-header-row *matHeaderRowDef="appColumnIds"></mat-header-row>

<mat-row *matRowDef="let row; columns: appColumnIds; let i = index" [class.selected-row]="selectedRow === row"
(click)="toggleRowSelection(row)" [ngClass]="{'even-row': i % 2 === 0, 'row': true}"></mat-row>

<mat-footer-row *matFooterRowDef="['noRecord']"
[ngStyle]="{ display: isAppDataSourceEmpty() ? '' : 'none' }"></mat-footer-row>
</mat-table>

<mat-paginator #appsViewMatPaginator [pageSizeOptions]="[10, 20, 50, 100]" pageSize="50"
[ngStyle]="{ display: isAppDataSourceEmpty() ? 'none' : '' }" (page)="onPaginatorChanged()"
showFirstLastButtons></mat-paginator>
</div>
<ng-container #drawerContainer></ng-container>
<ng-container #mfeContainer></ng-container>


</div>
Loading

0 comments on commit c8b905c

Please sign in to comment.