remove sort

merge-requests/2/merge^2
Nato Boram 2019-11-29 02:50:12 -05:00
parent 311a3b0698
commit e6f8c9ccf1
No known key found for this signature in database
GPG Key ID: C035B4A0E33CF552
3 changed files with 7033 additions and 8113 deletions

View File

@ -5,6 +5,7 @@
<!-- Hash --> <!-- Hash -->
<mat-form-field> <mat-form-field>
<mat-label>Hash</mat-label>
<input matInput [(ngModel)]="hash" name="hash"> <input matInput [(ngModel)]="hash" name="hash">
</mat-form-field> </mat-form-field>
@ -13,14 +14,14 @@
</form> </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> </mat-progress-bar>
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8"> <table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
<!-- Result Column --> <!-- Result Column -->
<ng-container matColumnDef="error"> <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"> <td mat-cell *matCellDef="let element">
<div [ngSwitch]="element.error"> <div [ngSwitch]="element.error">
<div *ngSwitchCase="null"></div> <div *ngSwitchCase="null"></div>

View File

@ -1,6 +1,5 @@
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { MatSort } from '@angular/material/sort';
import { MatTable, MatTableDataSource } from '@angular/material/table'; import { MatTable, MatTableDataSource } from '@angular/material/table';
import { GatewayService } from '../services/gateway.service'; import { GatewayService } from '../services/gateway.service';
@ -20,7 +19,6 @@ export class PagesComponent implements OnInit {
]; ];
@ViewChild(MatTable, { static: false }) matTable: MatTable<Result>; @ViewChild(MatTable, { static: false }) matTable: MatTable<Result>;
@ViewChild(MatSort, { static: false }) sort: MatSort;
constructor( constructor(
private readonly gatewayService: GatewayService private readonly gatewayService: GatewayService
@ -28,7 +26,6 @@ export class PagesComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.dataSource = new MatTableDataSource([]); this.dataSource = new MatTableDataSource([]);
this.dataSource.sort = this.sort;
this.gatewayService.list().subscribe(gateways => this.gateways = gateways); this.gatewayService.list().subscribe(gateways => this.gateways = gateways);
} }

5428
yarn.lock

File diff suppressed because it is too large Load Diff