Show detected inverter type in webapp
This commit is contained in:
parent
df45541ae8
commit
670c2d6762
@ -41,6 +41,13 @@ void WebApiInverterClass::onInverterList(AsyncWebServerRequest* request)
|
|||||||
((uint32_t)((config.Inverter[i].Serial >> 32) & 0xFFFFFFFF)),
|
((uint32_t)((config.Inverter[i].Serial >> 32) & 0xFFFFFFFF)),
|
||||||
((uint32_t)(config.Inverter[i].Serial & 0xFFFFFFFF)));
|
((uint32_t)(config.Inverter[i].Serial & 0xFFFFFFFF)));
|
||||||
obj[F("serial")] = buffer;
|
obj[F("serial")] = buffer;
|
||||||
|
|
||||||
|
auto inv = Hoymiles.getInverterBySerial(config.Inverter[i].Serial);
|
||||||
|
if (inv == nullptr) {
|
||||||
|
obj[F("type")] = F("Unknown");
|
||||||
|
} else {
|
||||||
|
obj[F("type")] = inv->typeName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,6 +47,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Serial</th>
|
<th scope="col">Serial</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
<th>Type</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -68,6 +69,9 @@
|
|||||||
maxlength="31"
|
maxlength="31"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ editInverterData.type }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" class="icon">
|
<a href="#" class="icon">
|
||||||
<BIconCheck v-on:click="onEditSubmit(inverter.id)" />
|
<BIconCheck v-on:click="onEditSubmit(inverter.id)" />
|
||||||
@ -84,6 +88,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{{ inverter.name }}
|
{{ inverter.name }}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ inverter.type }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" class="icon">
|
<a href="#" class="icon">
|
||||||
<BIconTrash v-on:click="onDelete(inverter.id)" />
|
<BIconTrash v-on:click="onDelete(inverter.id)" />
|
||||||
@ -121,6 +128,7 @@ export default {
|
|||||||
id: "",
|
id: "",
|
||||||
serial: "",
|
serial: "",
|
||||||
name: "",
|
name: "",
|
||||||
|
type: "",
|
||||||
},
|
},
|
||||||
inverters: [],
|
inverters: [],
|
||||||
alertMessage: "",
|
alertMessage: "",
|
||||||
@ -199,6 +207,7 @@ export default {
|
|||||||
this.editId = inverter.id;
|
this.editId = inverter.id;
|
||||||
this.editInverterData.serial = inverter.serial;
|
this.editInverterData.serial = inverter.serial;
|
||||||
this.editInverterData.name = inverter.name;
|
this.editInverterData.name = inverter.name;
|
||||||
|
this.editInverterData.type = inverter.type;
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.editId = "-1";
|
this.editId = "-1";
|
||||||
@ -233,6 +242,7 @@ export default {
|
|||||||
this.editId = "-1";
|
this.editId = "-1";
|
||||||
this.editInverterData.serial = "";
|
this.editInverterData.serial = "";
|
||||||
this.editInverterData.name = "";
|
this.editInverterData.name = "";
|
||||||
|
this.editInverterData.type = "";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user