last seen

This commit is contained in:
Ben Wilson 2023-08-06 18:00:03 -04:00
parent 1516f90712
commit ad9f831b91
4 changed files with 10 additions and 3 deletions

View File

@ -77,7 +77,7 @@
<p-table [rowHover]="true" groupRowsBy="name" dataKey="name" rowGroupMode="subheader"
[value]="clientInfo.workers" [tableStyle]="{ 'min-width': '50rem' }">
[value]="clientInfo.workers" [tableStyle]="{ 'min-width': '50rem' }" dataKey="sessionId">
<ng-template pTemplate="header">
@ -87,6 +87,7 @@
<th>Hash Rate</th>
<th>Session Best Difficulty</th>
<th>Uptime</th>
<th>Last Seen</th>
</tr>
</ng-template>
@ -111,8 +112,9 @@
{{getBestDifficulty(worker.name, clientInfo.workers) | numberSuffix}}
</td>
<td>
{{getTotalUptime(worker.name, clientInfo.workers) | dateAgo}} (cumulative)
</td>
<td></td>
</tr>
</ng-template>
@ -124,6 +126,7 @@
<td>{{worker.hashRate | hashSuffix}}</td>
<td>{{worker.bestDifficulty | numberSuffix}}</td>
<td>{{worker.startTime | dateAgo}}</td>
<td>{{worker.lastSeen | dateAgo}}</td>
</tr>
</ng-template>

View File

@ -22,6 +22,7 @@ export class DashboardComponent {
public networkInfo$: Observable<any>;
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: {

View File

@ -52,6 +52,7 @@ export class WorkerGroupComponent {
this.chartOptions = {
maintainAspectRatio: false,
plugins: {
legend: {
labels: {

View File

@ -52,6 +52,7 @@ export class WorkerComponent {
this.chartOptions = {
maintainAspectRatio: false,
plugins: {
legend: {
labels: {