added location and nodename

This commit is contained in:
2024-03-28 13:32:22 +01:00
parent c6f3c7c018
commit 1c13d20b49
2 changed files with 59 additions and 45 deletions

View File

@@ -1,17 +1,17 @@
class GaugeGroup {
constructor(nodeId, gaugesCount, maxGaugeValues, dataTypes) {
constructor(nodeId, Location, gaugesCount, maxGaugeValues, dataTypes) {
this.nodeId = nodeId;
this.gaugesCount = gaugesCount;
this.maxGaugeValues = maxGaugeValues; // Maximum value the gauge can display
this.dataTypes = dataTypes; // Array of data type names for each gauge
this.location = Location;
// Create a new div element
this.element = document.createElement("div");
this.element.className = "gaugeGroup";
// Set the HTML of the new div
this.element.innerHTML = `
<h2 class="groupTitle">Gauge Group for Node ${this.nodeId}</h2>
<h2 class="groupTitle">${this.nodeId} - ${this.location}</h2>
<div class="Node">
${Array(this.gaugesCount).fill().map((_, i) => `
<div class="Sensorvalues">