rrd graph peer display

This commit is contained in:
Eduardo Silva 2025-02-21 16:28:53 -03:00
parent 5b0ab72c49
commit 590e86b331
4 changed files with 11 additions and 8 deletions

View File

@ -14,9 +14,6 @@ RUN apt-get update && apt-get install -y \
openssl \
dnsutils \
rrdtool \
gcc \
librrd-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# those are the really necessary packages

View File

@ -11,7 +11,6 @@ pypng==0.20220715.0
pytz==2024.2
qrcode==8.0
requests==2.32.3
rrdtool-bindings==0.2.0
sqlparse==0.5.3
typing_extensions==4.12.2
urllib3==2.3.0

View File

@ -47,6 +47,11 @@
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-12">
<img src="/rrd/graph/?peer={{ current_peer.uuid }}">
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="d-flex justify-content-between align-items-center">

View File

@ -59,10 +59,12 @@ def view_rrd_graph(request):
"CDEF:rx_mb=rxdata,1048576,/",
"VDEF:tx_total=tx_mb,TOTAL",
"VDEF:rx_total=rx_mb,TOTAL",
"LINE1:txdata#FF0000:Transmitted",
"GPRINT:tx_total:Total Tx\\: %6.2lf MB",
"LINE1:rxdata#0000FF:Received",
"GPRINT:rx_total:Total Rx\\: %6.2lf MB"
"LINE1:txdata#FF0000:Transmitted ",
"GPRINT:tx_total:%6.2lf MB",
"COMMENT:\\n",
"LINE1:rxdata#0000FF:Received ",
"GPRINT:rx_total:%6.2lf MB",
"COMMENT:\\n"
]
try: