mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update status and catch node labels in group mode
This commit is contained in:
parent
26a770e490
commit
a78da0db1e
@ -41,7 +41,9 @@
|
|||||||
if (this.name) {
|
if (this.name) {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
if (this.scope) {
|
if (this.scope === "group") {
|
||||||
|
return this._("catch.catchGroup");
|
||||||
|
} else if (Array.isArray(this.scope)) {
|
||||||
return this._("catch.catchNodes",{number:this.scope.length});
|
return this._("catch.catchNodes",{number:this.scope.length});
|
||||||
}
|
}
|
||||||
return this.uncaught?this._("catch.catchUncaught"):this._("catch.catch")
|
return this.uncaught?this._("catch.catchUncaught"):this._("catch.catch")
|
||||||
|
@ -33,7 +33,15 @@
|
|||||||
outputs:1,
|
outputs:1,
|
||||||
icon: "status.svg",
|
icon: "status.svg",
|
||||||
label: function() {
|
label: function() {
|
||||||
return this.name||(this.scope?this._("status.statusNodes",{number:this.scope.length}):this._("status.status"));
|
if (this.name) {
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
if (this.scope === "group") {
|
||||||
|
return this._("status.statusGroup");
|
||||||
|
} else if (Array.isArray(this.scope)) {
|
||||||
|
return this._("status.statusNodes",{number:this.scope.length});
|
||||||
|
}
|
||||||
|
return this._("status.status")
|
||||||
},
|
},
|
||||||
labelStyle: function() {
|
labelStyle: function() {
|
||||||
return this.name?"node_label_italic":"";
|
return this.name?"node_label_italic":"";
|
||||||
|
@ -94,6 +94,7 @@
|
|||||||
},
|
},
|
||||||
"catch": {
|
"catch": {
|
||||||
"catch": "catch: all",
|
"catch": "catch: all",
|
||||||
|
"catchGroup": "catch: in same group",
|
||||||
"catchNodes": "catch: __number__",
|
"catchNodes": "catch: __number__",
|
||||||
"catchUncaught": "catch: uncaught",
|
"catchUncaught": "catch: uncaught",
|
||||||
"label": {
|
"label": {
|
||||||
@ -109,6 +110,7 @@
|
|||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"status": "status: all",
|
"status": "status: all",
|
||||||
|
"statusGroup": "status: in same group",
|
||||||
"statusNodes": "status: __number__",
|
"statusNodes": "status: __number__",
|
||||||
"label": {
|
"label": {
|
||||||
"source": "Report status from",
|
"source": "Report status from",
|
||||||
|
Loading…
Reference in New Issue
Block a user