UI: Replaced enum infavor of hash keys

This commit is contained in:
Luis-Hebendanz
2023-08-14 19:08:15 +02:00
parent 3489ebc5c4
commit c020cce56b
3 changed files with 24 additions and 8 deletions

View File

@@ -1,20 +1,22 @@
export interface TableData {
name: string;
id: string;
status: NodeStatus;
status: NodeStatusKeys;
last_seen: number;
}
export enum NodeStatus {
Online,
Offline,
Pending,
export const NodeStatus = {
Online: "Online",
Offline: "Offline",
Pending: "Pending",
}
export type NodeStatusKeys = typeof NodeStatus[keyof typeof NodeStatus];
function createData(
name: string,
id: string,
status: NodeStatus,
status: NodeStatusKeys,
last_seen: number,
): TableData {
return {