Skip to content

Commit

Permalink
Merge branch 'hoylabs:development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoopy-HSS authored Nov 19, 2024
2 parents b191dcf + 61aa32a commit a31b24f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/WebApi_powerlimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void WebApiPowerLimiterClass::onMetaData(AsyncWebServerRequest* request)
JsonObject obj = inverters.add<JsonObject>();
obj["serial"] = inv->serialString();
obj["pos"] = i;
obj["order"] = config.Inverter[i].Order;
obj["name"] = String(config.Inverter[i].Name);
obj["poll_enable"] = config.Inverter[i].Poll_Enable;
obj["poll_enable_night"] = config.Inverter[i].Poll_Enable_Night;
Expand Down
1 change: 1 addition & 0 deletions webapp/src/types/PowerLimiterConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface PowerLimiterInverterInfo {
serial: string;
pos: number;
order: number;
name: string;
poll_enable: boolean;
poll_enable_night: boolean;
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/views/PowerLimiterAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,12 @@ export default defineComponent({
inverters.push(newInv);
}
inverters = inverters.sort((a, b) => {
const orderA = this.getInverterInfo(a.serial).order;
const orderB = this.getInverterInfo(b.serial).order;
return orderA < orderB ? -1 : 1;
});
return inverters;
},
savePowerLimiterConfig(e: Event) {
Expand Down

0 comments on commit a31b24f

Please sign in to comment.