Skip to content

Commit

Permalink
spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
mlapaglia committed Jun 11, 2021
1 parent f6fb273 commit c18a292
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,20 @@
</tr>
<tr mat-row *matRowDef="let row; columns: ['expandedDetail']" class="example-detail-row"></tr>
</table>
<mat-paginator
<div fxLayout="row" fxLayoutAlign="end" fxPerpendicularAlign="end" style="margin-top: 15px;">
<div *ngIf="isLoading" style="display: flex; align-items: center; justify-content: center; margin-right:10px;">
<mat-progress-spinner
color="primary"
mode="indeterminate"
diameter="25">
</mat-progress-spinner>
</div>
<mat-paginator
[pageSizeOptions]="[5, 10, 25, 100]"
[length]="totalNumberOfPlates"
(page)="onPaginatorPage($event)"></mat-paginator>
</div>

</div>
<div>
<mat-card class="example-card">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class PlatesComponent implements OnInit, OnDestroy, AfterViewInit {

public addingToIgnoreList: boolean;
public deletingPlate: boolean;
public isLoading: boolean;

private pageSize: number = 10;
private pageNumber: number = 0;
Expand Down Expand Up @@ -144,9 +145,11 @@ export class PlatesComponent implements OnInit, OnDestroy, AfterViewInit {
request.filterIgnoredPlates = this.filterIgnoredPlates;
request.regexSearchEnabled = this.regexSearchEnabled;

this.isLoading = true;
this.plateService.searchPlates(request).subscribe(result => {
this.totalNumberOfPlates = result.totalCount;
this.plates = new MatTableDataSource<Plate>(result.plates);
this.isLoading = false;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatDividerModule } from '@angular/material/divider';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';

@NgModule({
declarations: [
Expand All @@ -40,6 +41,7 @@ import { NgxChartsModule } from '@swimlane/ngx-charts';
MatInputModule,
MatButtonModule,
MatFormFieldModule,
MatProgressSpinnerModule,
ReactiveFormsModule,
FormsModule,
MatCheckboxModule,
Expand Down
1 change: 1 addition & 0 deletions OpenAlprWebhookProcessor/OpenAlprWebhookProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<UserSecretsId>eb21a92f-53a0-4b29-8342-fb1def2e11f1</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>.</DockerfileContext>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit c18a292

Please sign in to comment.