120 lines
4.5 KiB
HTML
120 lines
4.5 KiB
HTML
<div class="p-3">
|
|
<div class="d-flex flex-row">
|
|
<mat-form-field class="mb-3 pe-3">
|
|
<mat-label>Search by Name</mat-label>
|
|
<input matInput (keyup)="applyFilter($event)" placeholder="type in..." #input />
|
|
</mat-form-field>
|
|
<div id="btn-group" class="col-md-3 ps-3 mt-3">
|
|
<button mat-raised-button color="primary" (click)="reloadTable()" >
|
|
<mat-icon>replay</mat-icon><span>Reload</span>
|
|
</button>
|
|
<!--
|
|
<button mat-raised-button color="primary" (click)="openDialogAdd()">
|
|
<mat-icon>add</mat-icon><span>Add new</span>
|
|
</button>
|
|
-->
|
|
<button mat-raised-button color="primary" (click)="openFacetComposer()">
|
|
<mat-icon>add</mat-icon><span>Add new</span>
|
|
</button>
|
|
<!--
|
|
<button mat-raised-button color="primary" routerLink="/addResource">New Resource</button>
|
|
<button mat-raised-button color="primary" routerLink="/facetComposer">Facet Composer</button>
|
|
<button mat-raised-button color="primary" routerLink="/dynamicFormComponent">Form Dinamica</button>
|
|
<button mat-raised-button color="primary" routerLink="/formComposer">Form Composer</button>
|
|
-->
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- TEST-CRUD begin -->
|
|
|
|
-------
|
|
<h2>Form da dialog: </h2>
|
|
<ul>
|
|
<li *ngFor="let dm of dummies">
|
|
Id: {{dm.uid}}, Name: {{dm.name}}, Type: {{dm.type}}
|
|
</li>
|
|
</ul>
|
|
-------
|
|
|
|
<!-- TEST-CRUD end -->
|
|
|
|
<div class="mat-elevation-z4">
|
|
<table mat-table [dataSource]="dataSource" matSort>
|
|
<ng-container matColumnDef="name">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header color="primary">Name</th>
|
|
<td mat-cell *matCellDef="let item">{{ item.name }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="id">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Id</th>
|
|
<td mat-cell *matCellDef="let item" >{{ item.id }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="status">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>
|
|
<td mat-cell *matCellDef="let item">{{ item.status }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="lastMod">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Last Modified</th>
|
|
<td mat-cell *matCellDef="let item">{{ item.lastMod }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="avMemory">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header disabled>Available Memory</th>
|
|
<td mat-cell *matCellDef="let item">{{ item.avMemory }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="hdSpace">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header disabled>HD Space</th>
|
|
<td mat-cell *matCellDef="let item">{{ item.hdSpace }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="actions">
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header disabled>Actions</th>
|
|
<td mat-cell *matCellDef="let item">
|
|
<!--<div class="d-flex flex-row py-4">-->
|
|
<div class="d-flex flex-row">
|
|
<button mat-button class="action-btn" color="primary" (click)="addTab(this.item.id)" ><mat-icon>visibility</mat-icon></button>
|
|
<button mat-button class="action-btn" color="primary" ><mat-icon>edit</mat-icon></button>
|
|
<button mat-button class="action-btn" color="primary"><mat-icon>delete</mat-icon></button>
|
|
</div>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<!-- rows visualization -->
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
|
|
<!-- Rows shown when there is no matching data. -->
|
|
<tr class="mat-row" *matNoDataRow>
|
|
<td class="mat-cell" colspan="4">No data matching the filter "{{ input.value }}"</td>
|
|
</tr>
|
|
</table>
|
|
<mat-paginator [pageSizeOptions]="[10, 20, 30]" showFirstLastButtons> </mat-paginator>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="p-3">
|
|
<mat-tab-group [selectedIndex]="selectedIdx">
|
|
<ng-container *ngFor="let tab of tabs; let index = index">
|
|
<mat-tab>
|
|
<!-- tab begin-->
|
|
<ng-template mat-tab-label>
|
|
<div class="col" style="margin-left: 20px">{{ tab.title }}</div>
|
|
<button *ngIf="tab.title !== 'JSON View'" style="color: black" mat-icon-button (click)="closeTab(index)">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
</ng-template>
|
|
<!-- tab close-->
|
|
<div *ngIf="tab.title !== 'JSON View'; else defaultTab">
|
|
<jhi-rawjson-pane [chosenId]="tab.id" [resourceTypeName]="typeObject.name" ></jhi-rawjson-pane>
|
|
</div>
|
|
<ng-template #defaultTab>
|
|
</ng-template>
|
|
</mat-tab>
|
|
</ng-container>
|
|
</mat-tab-group>
|
|
</div>
|