dashboard gauge wip

This commit is contained in:
DeltaLima 2025-04-07 20:51:41 +02:00
parent da445e1048
commit 117450f435

View file

@ -52,7 +52,7 @@ String Proc_WebPage_root(const String& var) {
html += F("' style='float:left; ");
/* if it is the last gauge, dont add a margin */
if(gaugeNrLine < Max_Dashboard_Gauge_PerLine) {
if((gaugeNrLine < Max_Dashboard_Gauge_PerLine) || (gaugeNr < gaugeCount)) {
html += F("margin-right: 10px;'>");
} else {
html += F("'>");
@ -66,9 +66,9 @@ String Proc_WebPage_root(const String& var) {
/* rest of the gauge body, its always the same */
html += FPSTR(Common_HTML_Gauge_Body);
if(gaugeNrLine >= Max_Dashboard_Gauge_PerLine) {
if((gaugeNrLine >= Max_Dashboard_Gauge_PerLine) || (gaugeNr >= gaugeCount)) {
/* close gauge wrapper div*/
html += F("</div>\n");
html += F("</div><div style='clear: both;'></div>\n");
/* reset to 0 , max gauges per line reached */
gaugeNrLine = 0;
}