mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Pass complete status to Status node and filter to editor
This commit is contained in:
@@ -38,7 +38,12 @@ function handleCommsEvent(event) {
|
||||
publish(event.topic,event.data,event.retain);
|
||||
}
|
||||
function handleStatusEvent(event) {
|
||||
publish("status/"+event.id,event.status,true);
|
||||
var status = {
|
||||
text: event.status.text,
|
||||
fill: event.status.fill,
|
||||
shape: event.status.shape
|
||||
};
|
||||
publish("status/"+event.id,status,true);
|
||||
}
|
||||
function handleRuntimeEvent(event) {
|
||||
runtime.log.trace("runtime event: "+JSON.stringify(event));
|
||||
|
@@ -377,18 +377,17 @@ class Flow {
|
||||
return;
|
||||
}
|
||||
var message = {
|
||||
status: {
|
||||
text: "",
|
||||
source: {
|
||||
id: node.id,
|
||||
type: node.type,
|
||||
name: node.name
|
||||
}
|
||||
}
|
||||
};
|
||||
status: clone(statusMessage)
|
||||
}
|
||||
if (statusMessage.hasOwnProperty("text")) {
|
||||
message.status.text = statusMessage.text.toString();
|
||||
}
|
||||
message.status.source = {
|
||||
id: node.id,
|
||||
type: node.type,
|
||||
name: node.name
|
||||
}
|
||||
|
||||
targetStatusNode.receive(message);
|
||||
handled = true;
|
||||
});
|
||||
|
Reference in New Issue
Block a user