remove sort
parent
311a3b0698
commit
e6f8c9ccf1
|
@ -5,6 +5,7 @@
|
|||
|
||||
<!-- Hash -->
|
||||
<mat-form-field>
|
||||
<mat-label>Hash</mat-label>
|
||||
<input matInput [(ngModel)]="hash" name="hash">
|
||||
</mat-form-field>
|
||||
|
||||
|
@ -13,14 +14,14 @@
|
|||
|
||||
</form>
|
||||
|
||||
<mat-progress-bar *ngIf="dataSource && gateways" mode="determinate" [value]="dataSource.data.length / gateways.length * 100">
|
||||
<mat-progress-bar *ngIf="hash && dataSource && gateways" mode="determinate" [value]="dataSource.data.length / gateways.length * 100">
|
||||
</mat-progress-bar>
|
||||
|
||||
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
||||
|
||||
<!-- Result Column -->
|
||||
<ng-container matColumnDef="error">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Status </th>
|
||||
<th mat-header-cell *matHeaderCellDef> Status </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div [ngSwitch]="element.error">
|
||||
<div *ngSwitchCase="null">✅</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTable, MatTableDataSource } from '@angular/material/table';
|
||||
import { GatewayService } from '../services/gateway.service';
|
||||
|
||||
|
@ -20,7 +19,6 @@ export class PagesComponent implements OnInit {
|
|||
];
|
||||
|
||||
@ViewChild(MatTable, { static: false }) matTable: MatTable<Result>;
|
||||
@ViewChild(MatSort, { static: false }) sort: MatSort;
|
||||
|
||||
constructor(
|
||||
private readonly gatewayService: GatewayService
|
||||
|
@ -28,7 +26,6 @@ export class PagesComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
this.dataSource = new MatTableDataSource([]);
|
||||
this.dataSource.sort = this.sort;
|
||||
this.gatewayService.list().subscribe(gateways => this.gateways = gateways);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue