diff --git a/src/public/index.html b/src/public/index.html index f8cd8c7..a12b5a1 100644 --- a/src/public/index.html +++ b/src/public/index.html @@ -454,6 +454,43 @@ + +
+
+
MQTT
+
Topics this node sent packets to.
+
+ +
+
Other
@@ -553,6 +590,7 @@ selectedNode: null, selectedNodeDeviceMetrics: [], + selectedNodeMqttMetrics: [], moment: window.moment, @@ -567,6 +605,7 @@ window._onNodeClick = (node) => { this.selectedNode = node; this.loadNodeDeviceMetrics(node.node_id); + this.loadNodeMqttMetrics(node.node_id); }; }, @@ -592,6 +631,14 @@ this.renderDeviceMetricCharts(); }); }, + loadNodeMqttMetrics: function(nodeId) { + this.selectedNodeMqttMetrics = []; + window.axios.get(`/api/v1/nodes/${nodeId}/mqtt-metrics`).then((response) => { + this.selectedNodeMqttMetrics = response.data.mqtt_metrics; + }).catch(() => { + // do nothing + }); + }, renderDeviceMetricCharts: function() { this.updateBatteryLevelChart(); this.updateVoltageChart();