dashboard gauge settings wip
This commit is contained in:
parent
84ffd44a5e
commit
e528371d09
3 changed files with 14 additions and 3 deletions
include
|
@ -91,6 +91,11 @@ void Webserver_Init() {
|
|||
webserver.on("/grow/dashboard/", HTTP_POST, WebPage_grow_dashboard);
|
||||
webserver.on("/grow/dashboard/gaugeAdd", HTTP_GET, WebPage_grow_dashboard_gaugeAdd);
|
||||
webserver.on("/grow/dashboard/gaugeAdd", HTTP_POST, WebPage_grow_dashboard_gaugeAdd);
|
||||
webserver.on("/grow/dashboard/chartAdd", HTTP_GET, WebPage_grow_dashboard_chartAdd);
|
||||
webserver.on("/grow/dashboard/chartAdd", HTTP_POST, WebPage_grow_dashboard_chartAdd);
|
||||
//webserver.on("/grow/dashboard/dataAdd", HTTP_GET, WebPage_grow_dashboard_dataAdd);
|
||||
//webserver.on("/grow/dashboard/dataAdd", HTTP_POST, WebPage_grow_dashboard_dataAdd);
|
||||
|
||||
/* api */
|
||||
//webserver.on("/api/sensor", HTTP_GET, Api_sensor_data);
|
||||
webserver.on("/api/sensor/", HTTP_GET, Api_sensor_data);
|
||||
|
|
|
@ -1009,6 +1009,8 @@ String Proc_WebPage_grow_dashboard(const String& var) {
|
|||
}
|
||||
}
|
||||
return html;
|
||||
|
||||
/* Charts */
|
||||
} else if(var == "TR_TD_CHART") {
|
||||
String html;
|
||||
for(byte i = 0; i < Max_Dashboard_Chart; i++) {
|
||||
|
@ -1025,6 +1027,9 @@ String html;
|
|||
} else {
|
||||
html += FPSTR(Sensor_Read_descr[SensorIndex[config.system.sensor.type[config.grow.dashboard.chartSensor[i]]].read[config.grow.dashboard.chartRead[i]]]);
|
||||
}
|
||||
html += F("</td><td style='background-color: ");
|
||||
html += config.grow.dashboard.chartColor[i];
|
||||
html += F(";'>");
|
||||
html += F("</td><td>");
|
||||
// edit button
|
||||
html += F("<form class='linkForm' action='/grow/dashboard/chartAdd' method='get'>");
|
||||
|
|
|
@ -105,13 +105,14 @@ const char Page_grow_dashboard_HTML[] PROGMEM = R"(%HEADER%
|
|||
<hr>
|
||||
|
||||
<h3>Chart</h3>
|
||||
<a class='button %ADD_DISABLED%' href='/system/sensor/add'>➕ Add chart</a>
|
||||
<a class='button %ADD_DISABLED%' href='/grow/dashboard/chartAdd''>➕ Add chart</a>
|
||||
<table class='centered'>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Read</th>
|
||||
<th>Color</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
%TR_TD_CHART%
|
||||
</table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue