From 514755c55961971ad710be1799f674ead4066ff9 Mon Sep 17 00:00:00 2001 From: Josue Date: Thu, 29 Apr 2021 15:38:36 -0400 Subject: [PATCH] feat: add constants for handling states and decorators --- .../Anvils/CONSTS.ts => lib/consts/ANVILS.ts} | 0 striker-ui/lib/consts/NODES.ts | 9 +++++++++ striker-ui/lib/consts/SERVERS.ts | 12 ++++++++++++ 3 files changed, 21 insertions(+) rename striker-ui/{components/Anvils/CONSTS.ts => lib/consts/ANVILS.ts} (100%) create mode 100644 striker-ui/lib/consts/NODES.ts create mode 100644 striker-ui/lib/consts/SERVERS.ts diff --git a/striker-ui/components/Anvils/CONSTS.ts b/striker-ui/lib/consts/ANVILS.ts similarity index 100% rename from striker-ui/components/Anvils/CONSTS.ts rename to striker-ui/lib/consts/ANVILS.ts diff --git a/striker-ui/lib/consts/NODES.ts b/striker-ui/lib/consts/NODES.ts new file mode 100644 index 00000000..292c659c --- /dev/null +++ b/striker-ui/lib/consts/NODES.ts @@ -0,0 +1,9 @@ +const nodeState: ReadonlyMap = new Map([ + ['unknown', 'Unknown'], + ['off', 'Off'], + ['on', 'On'], + ['accessible', 'Accessible'], + ['ready', 'Ready'], +]); + +export default nodeState; diff --git a/striker-ui/lib/consts/SERVERS.ts b/striker-ui/lib/consts/SERVERS.ts new file mode 100644 index 00000000..aba4b1c0 --- /dev/null +++ b/striker-ui/lib/consts/SERVERS.ts @@ -0,0 +1,12 @@ +const serverState: ReadonlyMap = new Map([ + ['running', 'Running'], + ['idle', 'Idle'], + ['paused', 'Paused'], + ['in_shutdown', 'Shutting Down'], + ['shut_off', 'Off'], + ['crashed', 'crashed'], + ['pmsuspended', 'Suspended'], + ['migrating', 'Migrating'], +]); + +export default serverState;