mirror of
https://github.com/StefBuwalda/dashboard_test.git
synced 2025-10-30 03:09:59 +00:00
Renamed split_graph() to prepare_chart_data()
This commit is contained in:
4
app.py
4
app.py
@@ -11,7 +11,7 @@ import json
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
|
||||||
def split_graph(logs: list[log]) -> tuple[list[str], list[Optional[int]]]:
|
def prepare_chart_data(logs: list[log]) -> tuple[list[str], list[Optional[int]]]:
|
||||||
if len(logs) <= 0:
|
if len(logs) <= 0:
|
||||||
return ([], [])
|
return ([], [])
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ def chart(id: int):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return abort(code=403)
|
return abort(code=403)
|
||||||
x, y = split_graph(logs=logs)
|
x, y = prepare_chart_data(logs=logs)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"chart.html",
|
"chart.html",
|
||||||
|
|||||||
Reference in New Issue
Block a user