dashboard #1
@@ -1,9 +1,16 @@
|
|||||||
|
<style>
|
||||||
|
.spinner {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<button mat-button (click)="createNewDashboard()">New</button>
|
<button mat-button (click)="createNewDashboard()">New</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="loading">
|
<div *ngIf="loading" class="spinner">
|
||||||
loading
|
<mat-spinner></mat-spinner>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!loading">
|
<div *ngIf="!loading">
|
||||||
<table mat-table [dataSource]="dataSource" >
|
<table mat-table [dataSource]="dataSource" >
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ public class DashboardController {
|
|||||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public DashboardList getDashboards() throws IOException {
|
public DashboardList getDashboards() throws IOException {
|
||||||
|
|
||||||
final List<Dashboard> dashboards = new ArrayList<>(Files.list(baseDir)//
|
final List<Dashboard> dashboards = new ArrayList<>(Files.list(baseDir)//
|
||||||
.filter(p -> p.getFileName().toString().endsWith(".json"))//
|
.filter(p -> p.getFileName().toString().endsWith(".json"))//
|
||||||
.map(FileUtils::readSilent)//
|
.map(FileUtils::readSilent)//
|
||||||
|
|||||||
Reference in New Issue
Block a user