summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-08-14 15:05:51 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-08-15 22:52:11 +0200
commitf0654de84b6f51a9f712181b31a5c48835063fb2 (patch)
treebfe9b582a4ea05ed259e54059a5177add7ad7ab6
parent0c016120f41afb04a9ecb784c37eff63900c53d5 (diff)
Add two new node states: 'preparing' and 'ready'.
-rw-r--r--src/ws/node.js8
-rw-r--r--src/ws/view.js6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ws/node.js b/src/ws/node.js
index fd4a9d7..2f93dac 100644
--- a/src/ws/node.js
+++ b/src/ws/node.js
@@ -389,6 +389,14 @@ Node.prototype.setAttribute = function(name, value)
{
this.state_element.style.backgroundColor = "#da4343";
}
+ else if(value == "preparing")
+ {
+ this.state_element.style.backgroundColor = "#f1e0b4";
+ }
+ else if(value == "ready")
+ {
+ this.state_element.style.backgroundColor = "#bad0aa";
+ }
else
{
this.state_element.style.backgroundColor = "#ebedf0";
diff --git a/src/ws/view.js b/src/ws/view.js
index 5b69a24..70d938a 100644
--- a/src/ws/view.js
+++ b/src/ws/view.js
@@ -424,6 +424,12 @@ function changeState(e)
break;
default:
case "todo":
+ update(id, "state", "preparing");
+ break;
+ case "preparing":
+ update(id, "state", "ready");
+ break;
+ case "ready":
update(id, "state", "in-progress");
break;
}