aqhome-cgi: more code sharing, adding page handling

allows to define your own pages with graphs, sensors and actors.
This commit is contained in:
Martin Preuss
2025-10-27 23:15:28 +01:00
parent 1b0145c97d
commit 7c5abc0f3b
9 changed files with 1205 additions and 111 deletions

View File

@@ -86,13 +86,13 @@ void AQH_ModDevices_RunSetData(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *se
pbuf=GWEN_Buffer_new(0, 256, 0, 1);
if (sValueName && *sValueName) {
GBAS(pbuf, "Location: /aqbt/devices/value.html?device=");
GBAS(pbuf, "Location: value.html?device=");
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
GBAS(pbuf, "&value=");
GWEN_Text_EscapeToBuffer(sValueName, pbuf);
}
else {
GBAS(pbuf, "Location: /aqbt/devices/values.html?device=");
GBAS(pbuf, "Location: values.html?device=");
GWEN_Text_EscapeToBuffer(sDeviceName, pbuf);
}
AQCGI_Request_AddResponseHeaderData(rq, GWEN_Buffer_GetStart(pbuf));