make the sidebar on the overviw page wider and show the round counter (#1570)

Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
CaCO3
2022-12-13 06:54:59 +01:00
committed by GitHub
parent f62f844134
commit 2dcd771c15
3 changed files with 25 additions and 6 deletions

View File

@@ -662,8 +662,6 @@ esp_err_t handler_uptime(httpd_req_t *req)
#ifdef DEBUG_DETAIL_ON
LogFile.WriteHeapInfo("handler_uptime - Start");
#endif
const char* resp_str;
std::string formatedUptime = getFormatedUptime(false);
@@ -680,9 +678,6 @@ esp_err_t handler_uptime(httpd_req_t *req)
}
esp_err_t handler_prevalue(httpd_req_t *req)
{
#ifdef DEBUG_DETAIL_ON

View File

@@ -128,6 +128,14 @@ esp_err_t info_get_handler(httpd_req_t *req)
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
else if (_task.compare("Round") == 0)
{
char formated[10] = "";
snprintf(formated, sizeof(formated), "%d", getCountFlowRounds());
httpd_resp_sendstr_chunk(req, formated);
httpd_resp_sendstr_chunk(req, NULL);
return ESP_OK;
}
else if (_task.compare("SDCardPartitionSize") == 0)
{
std::string zw;

View File

@@ -9,7 +9,7 @@
.tg {border-collapse:collapse;border-spacing:0;width:100%;color: darkslategray;border: inset;height:585px;}
.tg td{font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{height: 50px;font-size:24px;font-weight:bold;text-align:left;padding:0px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;background-color:#f0f0f0}
.tg .tg-1{width:77%;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
.tg .tg-1{width:700px;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
.tg .tg-2{font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
.tg .tg-3{height: 15px;font-size:14px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
</style>
@@ -60,6 +60,7 @@
<div id="cputemp" ></div>
<div id="rssi" ></div>
<div id="uptime" ></div>
<div id="round" ></div>
</td>
</tr>
</table>
@@ -89,6 +90,7 @@ function addZero(i) {
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
refresh();
});
@@ -164,6 +166,19 @@ function refresh() {
xhttp.open("GET", url, true);
xhttp.send();
}
function loadRoundCounter() {
url = basepath + '/info?type=Round';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var _rsp = xhttp.responseText;
$('#round').html("(Round: " + _rsp + ")");
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadValue(_type, _div, _style) {
url = basepath + '/value?all=true&type=' + _type;
@@ -215,6 +230,7 @@ function refresh() {
loadCPUTemp();
loadRSSI();
loadUptime();
loadRoundCounter();
}
init();