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 & 0xFFFFFFFF)));
|
||||
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>
|
||||
<th scope="col">Serial</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -68,6 +69,9 @@
|
||||
maxlength="31"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
{{ editInverterData.type }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" class="icon">
|
||||
<BIconCheck v-on:click="onEditSubmit(inverter.id)" />
|
||||
@ -84,6 +88,9 @@
|
||||
<td>
|
||||
{{ inverter.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ inverter.type }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" class="icon">
|
||||
<BIconTrash v-on:click="onDelete(inverter.id)" />
|
||||
@ -121,6 +128,7 @@ export default {
|
||||
id: "",
|
||||
serial: "",
|
||||
name: "",
|
||||
type: "",
|
||||
},
|
||||
inverters: [],
|
||||
alertMessage: "",
|
||||
@ -199,6 +207,7 @@ export default {
|
||||
this.editId = inverter.id;
|
||||
this.editInverterData.serial = inverter.serial;
|
||||
this.editInverterData.name = inverter.name;
|
||||
this.editInverterData.type = inverter.type;
|
||||
},
|
||||
onCancel() {
|
||||
this.editId = "-1";
|
||||
@ -233,6 +242,7 @@ export default {
|
||||
this.editId = "-1";
|
||||
this.editInverterData.serial = "";
|
||||
this.editInverterData.name = "";
|
||||
this.editInverterData.type = "";
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user