Added messages, fixed light property, more

This commit is contained in:
Anthony Hinsinger
2020-06-19 07:50:28 +02:00
parent 7980788687
commit c44a2684c4
10 changed files with 221 additions and 48 deletions
+12
View File
@@ -54,4 +54,16 @@ export function stateToColor(state) {
case 3:
return "status-error";
}
}
export function msgToColor(msg) {
if (msg.match(/\[INFO\]/)) {
return "status-ok";
} else if (msg.match(/\[WARNING\]/)) {
return "status-warning";
} else if (msg.match(/\[ERROR\]/)) {
return "status-error";
} else {
return "status-unknown";
}
}