Browse Source

Total Summe in Übersicht

pull/1541/head
geronet1 10 months ago
parent
commit
1a9da99f74
  1. 15
      src/web/html/index.html

15
src/web/html/index.html

@ -14,6 +14,7 @@
</p> </p>
<p> <p>
<span class="des">System Infos:</span> <span class="des">System Infos:</span>
<div id="total"></div>
<div id="iv"></div> <div id="iv"></div>
<div class="hr"></div> <div class="hr"></div>
<div id="warn_info"></div> <div id="warn_info"></div>
@ -111,6 +112,8 @@
function parseIv(obj, ts) { function parseIv(obj, ts) {
var p = div(["none"]); var p = div(["none"]);
var total = 0;
var count = 0;
for(var i of obj) { for(var i of obj) {
var icon = iconSuccess; var icon = iconSuccess;
var cl = "icon-success"; var cl = "icon-success";
@ -131,7 +134,9 @@
avail += "{#NOT_PRODUCING}"; avail += "{#NOT_PRODUCING}";
else { else {
icon = iconSuccessFull; icon = iconSuccessFull;
avail += "{#PRODUCING} " + i.cur_pwr + "W"; avail += "{#PRODUCING} " + i.cur_pwr + " W";
total += i.cur_pwr;
count += 1;
} }
} }
@ -149,6 +154,12 @@
} }
} }
document.getElementById("iv").replaceChildren(p); document.getElementById("iv").replaceChildren(p);
if (count > 1) {
p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("Total: " + total + " W"), br());
document.getElementById("total").replaceChildren(p);
document.getElementById("total").appendChild(div(["class=\"hr\""]));
}
} }
function parseWarn(warn) { function parseWarn(warn) {
@ -165,7 +176,7 @@
p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#UPDATE_AVAIL}: " + release), br()); p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#UPDATE_AVAIL}: " + release), br());
else if(getVerInt("{#VERSION}") > getVerInt(release)) else if(getVerInt("{#VERSION}") > getVerInt(release))
p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#USING_DEV_VERSION} {#VERSION}. {#DEV_ISSUE_RELEASE_VERSION}: " + release), br()); p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#USING_DEV_VERSION} {#VERSION}. {#DEV_ISSUE_RELEASE_VERSION}: " + release), br());
else else
p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#RELEASE_INSTALLED}: " + release), br()); p.append(svg(iconInfo, 30, 30, "icon icon-info"), span("{#RELEASE_INSTALLED}: " + release), br());
} }

Loading…
Cancel
Save