show error message when loading dashboards failed
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
<style>
|
||||
.spinner {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.center {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.is-error {
|
||||
font-size: 2rem;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
<div class="toolbar">
|
||||
<button mat-button (click)="createNewDashboard()">New</button>
|
||||
</div>
|
||||
<div *ngIf="loading" class="spinner">
|
||||
|
||||
<div *ngIf="loading" class="center">
|
||||
<mat-spinner></mat-spinner>
|
||||
</div>
|
||||
<div *ngIf="!loading">
|
||||
<div *ngIf="error" class="center is-error">
|
||||
{{error}}
|
||||
</div>
|
||||
|
||||
<div *ngIf="!loading && !error">
|
||||
<div class="toolbar">
|
||||
<button mat-button (click)="createNewDashboard()">New</button>
|
||||
</div>
|
||||
<table mat-table [dataSource]="dataSource" >
|
||||
|
||||
<!-- Name Column -->
|
||||
|
||||
Reference in New Issue
Block a user