fix: change server status value to match what's in the specs

main
Josue 4 years ago committed by Tsu-ba-me
parent 64f0c2d756
commit 936057f39e
  1. 4
      striker-ui/components/Servers.tsx
  2. 8
      striker-ui/lib/consts/SERVERS.ts
  3. 4
      striker-ui/types/AnvilServers.d.ts

@ -37,7 +37,7 @@ const selectDecorator = (state: string): Colours => {
switch (state) {
case 'running':
return 'ok';
case 'shut_off':
case 'shut off':
return 'off';
case 'crashed':
return 'error';
@ -86,7 +86,7 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
}
/>
</Box>
{server.server_state !== 'shut_off' &&
{server.server_state !== 'shut off' &&
server.server_state !== 'crashed' &&
anvil[
anvil.findIndex((a) => a.anvil_uuid === uuid)

@ -2,10 +2,10 @@ const serverState: ReadonlyMap<string, string> = new Map([
['running', 'Running'],
['idle', 'Idle'],
['paused', 'Paused'],
['in_shutdown', 'Shutting Down'],
['shut_off', 'Off'],
['crashed', 'crashed'],
['pmsuspended', 'Suspended'],
['in shutdown', 'Shutting Down'],
['shut off', 'Off'],
['crashed', 'Crashed'],
['pmsuspended', 'PM Suspended'],
['migrating', 'Migrating'],
]);

@ -5,8 +5,8 @@ declare type AnvilServer = {
| 'running'
| 'idle'
| 'paused'
| 'in_shutdown'
| 'shut_off'
| 'in shutdown'
| 'shut off'
| 'crashed'
| 'pmsuspended'
| 'migrating';

Loading…
Cancel
Save