Skip to content

Commit

Permalink
feat: show if worker is unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Jun 9, 2024
1 parent 6a33dfd commit e4ce81a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/WorkersPage/WorkerStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ export function workerStatus(worker: BlockchainApiWorker): {
if (worker.jailed) {
return { label: 'Jailed', color: 'error', tip: worker.jailReason || 'Unknown' };
} else if (!worker.online) {
return { label: 'Offline', color: 'default' };
return {
label: 'Offline',
color: 'default',
tip: worker.dialOk === false ? 'Unreachable' : undefined,
};
}

return { label: 'Online', color: 'success' };
case Status.Registering:
return { label: 'Registering', color: 'default' };
case Status.Deregistering:
return { label: 'Unregistring', color: 'default' };
return { label: 'Deregistering', color: 'default' };
case Status.Deregistered:
return { label: 'Deregistered', color: 'default' };
}
Expand Down

0 comments on commit e4ce81a

Please sign in to comment.