formatting

This commit is contained in:
Ben Wilson
2023-06-22 09:31:24 -04:00
parent b9337ae636
commit 48516e468e
2 changed files with 4 additions and 4 deletions

View File

@@ -15,8 +15,8 @@
<tr [routerLink]="[worker.id]"> <tr [routerLink]="[worker.id]">
<td>{{worker.name}}</td> <td>{{worker.name}}</td>
<td>{{worker.id}}</td> <td>{{worker.id}}</td>
<td>{{worker.hashRate}}</td> <td>{{worker.hashRate}} Gh/s</td>
<td>{{worker.bestDifficulty}}</td> <td>{{worker.bestDifficulty | numberSuffix}}</td>
</tr> </tr>
</ng-template> </ng-template>
</p-table> </p-table>

View File

@@ -30,7 +30,7 @@ export class WorkerComponent {
this.chartData$ = this.workerInfo$.pipe( this.chartData$ = this.workerInfo$.pipe(
map((workerInfo: any) => { map((workerInfo: any) => {
const GROUP_SIZE = 20; const GROUP_SIZE = 60;
const slice = workerInfo.hashData.length % GROUP_SIZE == 0 ? workerInfo.hashData : workerInfo.hashData.slice(0, workerInfo.hashData.length - workerInfo.hashData.length % GROUP_SIZE) const slice = workerInfo.hashData.length % GROUP_SIZE == 0 ? workerInfo.hashData : workerInfo.hashData.slice(0, workerInfo.hashData.length - workerInfo.hashData.length % GROUP_SIZE)
const reducedData = ((slice as any[]) const reducedData = ((slice as any[])
.reduce((pre, cur, idx, arr) => { .reduce((pre, cur, idx, arr) => {
@@ -105,7 +105,7 @@ export class WorkerComponent {
y: { y: {
ticks: { ticks: {
color: textColorSecondary, color: textColorSecondary,
callback: (value: number) => value + 'GH/s', callback: (value: number) => value + ' GH/s',
}, },
grid: { grid: {
color: surfaceBorder, color: surfaceBorder,