diff --git a/package-lock.json b/package-lock.json
index 61b13fff6fc..9a3adde0be6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9490,9 +9490,9 @@
},
"dependencies": {
"nan": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
- "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
+ "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
}
}
},
diff --git a/src/components/ControlPanel.vue b/src/components/ControlPanel.vue
index fc08d2c396c..5a70507b346 100644
--- a/src/components/ControlPanel.vue
+++ b/src/components/ControlPanel.vue
@@ -1109,7 +1109,9 @@ export default {
if (self.debug.length > MAX_DEBUG_LINES) self.debug.shift()
var textarea = document.getElementById('debug_window')
- textarea.scrollTop = textarea.scrollHeight
+ if (textarea) { // textarea could be hidden
+ textarea.scrollTop = textarea.scrollHeight
+ }
}
})
diff --git a/src/components/Mesh.vue b/src/components/Mesh.vue
index bae22db6f23..4ab12b6bfb4 100644
--- a/src/components/Mesh.vue
+++ b/src/components/Mesh.vue
@@ -11,6 +11,9 @@
+
+
+
Download SVG
@@ -95,6 +98,13 @@ export default {
components: {
D3Network
},
+ watch: {
+ showLocation () {
+ for (const n of this.nodes) {
+ n.name = this.nodeName(n)
+ }
+ }
+ },
computed: {
activeNodes () {
return this.nodes.filter(n => n.node_id !== 0 && n.status !== 'Removed')
@@ -138,7 +148,8 @@ export default {
links: [],
fab: false,
selectedNode: null,
- showProperties: false
+ showProperties: false,
+ showLocation: false
}
},
methods: {
@@ -156,12 +167,17 @@ export default {
return {
id: n.node_id,
_cssClass: this.nodeClass(n),
- name: n.name ? n.name : n.product,
+ name: this.nodeName(n),
node_id: n.node_id,
status: n.status,
data: n
}
},
+ nodeName (n) {
+ if (n.data) n = n.data // works both with node object and mesh node object
+ var name = n.name || n.product || 'node ' + n.node_id
+ return name + (this.showLocation && n.loc ? ` (${n.loc})` : '')
+ },
nodeClass (n) {
if (n.node_id === 1) {
return 'controller'