bug background

This commit is contained in:
2026-08-15 16:22:11 +02:00
parent a404d198a4
commit c23350400c
+15
View File
@@ -72,6 +72,11 @@ REMOTE_SHUTDOWN_RUNTIME_SECONDS = 5 * 60
LOCAL_SHUTDOWN_RUNTIME_SECONDS = 200
BATTERY_CHARGE_MEAN_SAMPLES = 10
GRAPH_COLOR_ARGS = [
"--color", "BACK#F7F5EFFF",
"--color", "CANVAS#FFFFFFFF",
]
GRAPH_DIR = "/var/www/html/ups"
HTML_FILE = os.path.join(GRAPH_DIR, "index.html")
WEEKLY_HTML_FILE = os.path.join(GRAPH_DIR, "week.html")
@@ -695,6 +700,7 @@ def graph_status():
[
"graph",
GRAPH_STATUS,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 90 * 86400),
@@ -762,6 +768,7 @@ def graph_battery_1y():
[
"graph",
GRAPH_BATTERY_1Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 365 * 86400),
@@ -813,6 +820,7 @@ def graph_battery_5y():
[
"graph",
GRAPH_BATTERY_5Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 5 * 365 * 86400),
@@ -868,6 +876,7 @@ def graph_runtime_1y():
[
"graph",
GRAPH_RUNTIME_1Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 365 * 86400),
@@ -919,6 +928,7 @@ def graph_runtime_5y():
[
"graph",
GRAPH_RUNTIME_5Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 5 * 365 * 86400),
@@ -970,6 +980,7 @@ def graph_load():
[
"graph",
GRAPH_LOAD,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 90 * 86400),
@@ -1024,6 +1035,7 @@ def graph_power_1y():
[
"graph",
GRAPH_POWER_1Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 365 * 86400),
@@ -1069,6 +1081,7 @@ def graph_power_5y():
[
"graph",
GRAPH_POWER_5Y,
*GRAPH_COLOR_ARGS,
"--start",
str(now - 5 * 365 * 86400),
@@ -1116,6 +1129,7 @@ def graph_weekly_status():
run_rrdtool(
[
"graph", GRAPH_STATUS_1W,
*GRAPH_COLOR_ARGS,
"--start", str(now - 7 * 86400),
"--end", str(now),
"--width", "1000",
@@ -1153,6 +1167,7 @@ def graph_weekly_metric(
now = int(time.time())
command = [
"graph", output_file,
*GRAPH_COLOR_ARGS,
"--start", str(now - 7 * 86400),
"--end", str(now),
"--width", "1000",