From ad9f831b91c54cc19658fb2e2808e8fc0cdc0eed Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Sun, 6 Aug 2023 18:00:03 -0400 Subject: [PATCH] last seen --- src/app/components/dashboard/dashboard.component.html | 7 +++++-- src/app/components/dashboard/dashboard.component.ts | 4 +++- src/app/components/worker-group/worker-group.component.ts | 1 + src/app/components/worker/worker.component.ts | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/components/dashboard/dashboard.component.html b/src/app/components/dashboard/dashboard.component.html index 98675e6..8c82087 100644 --- a/src/app/components/dashboard/dashboard.component.html +++ b/src/app/components/dashboard/dashboard.component.html @@ -77,7 +77,7 @@ + [value]="clientInfo.workers" [tableStyle]="{ 'min-width': '50rem' }" dataKey="sessionId"> @@ -87,6 +87,7 @@ Hash Rate Session Best Difficulty Uptime + Last Seen @@ -111,8 +112,9 @@ {{getBestDifficulty(worker.name, clientInfo.workers) | numberSuffix}} - {{getTotalUptime(worker.name, clientInfo.workers) | dateAgo}} (cumulative) + + @@ -124,6 +126,7 @@ {{worker.hashRate | hashSuffix}} {{worker.bestDifficulty | numberSuffix}} {{worker.startTime | dateAgo}} + {{worker.lastSeen | dateAgo}} diff --git a/src/app/components/dashboard/dashboard.component.ts b/src/app/components/dashboard/dashboard.component.ts index 14ec3b7..e4ab7cf 100644 --- a/src/app/components/dashboard/dashboard.component.ts +++ b/src/app/components/dashboard/dashboard.component.ts @@ -22,6 +22,7 @@ export class DashboardComponent { public networkInfo$: Observable; + constructor( private clientService: ClientService, private route: ActivatedRoute, @@ -34,7 +35,7 @@ export class DashboardComponent { this.address = this.route.snapshot.params['address']; this.clientInfo$ = this.clientService.getClientInfo(this.address).pipe( shareReplay({ refCount: true, bufferSize: 1 }) - ) + ); const documentStyle = getComputedStyle(document.documentElement); @@ -98,6 +99,7 @@ export class DashboardComponent { this.chartOptions = { + maintainAspectRatio: false, plugins: { legend: { labels: { diff --git a/src/app/components/worker-group/worker-group.component.ts b/src/app/components/worker-group/worker-group.component.ts index 5abb11c..15d0641 100644 --- a/src/app/components/worker-group/worker-group.component.ts +++ b/src/app/components/worker-group/worker-group.component.ts @@ -52,6 +52,7 @@ export class WorkerGroupComponent { this.chartOptions = { + maintainAspectRatio: false, plugins: { legend: { labels: { diff --git a/src/app/components/worker/worker.component.ts b/src/app/components/worker/worker.component.ts index f438796..77fb927 100644 --- a/src/app/components/worker/worker.component.ts +++ b/src/app/components/worker/worker.component.ts @@ -52,6 +52,7 @@ export class WorkerComponent { this.chartOptions = { + maintainAspectRatio: false, plugins: { legend: { labels: {