Add generation date to html
This commit is contained in:
parent
591de32e85
commit
ca47562f27
18
README.md
18
README.md
@ -1,11 +1,3 @@
|
||||
|
||||
|
||||
WIP
|
||||
===
|
||||
|
||||
- [ ] Date de génération dans la page html
|
||||
|
||||
|
||||
Ultra-light docker monitor
|
||||
==========================
|
||||
|
||||
@ -62,8 +54,8 @@ It is simple, just run:
|
||||
venv/bin/python generate_html.py
|
||||
```
|
||||
|
||||
The report is now accessible in `stats.html.
|
||||
`
|
||||
The report is now accessible in `stats.html`.
|
||||
|
||||
**Note:** if the stats file is in a remote server, one can use `scp` to get it:
|
||||
```bash
|
||||
scp eunuque.caracals.org:/home/caracals/outils/docker-stats-histo/stats.sqlite .
|
||||
@ -71,9 +63,9 @@ scp eunuque.caracals.org:/home/caracals/outils/docker-stats-histo/stats.sqlite .
|
||||
|
||||
Advanced parameters
|
||||
-------------------
|
||||
Both python scripts can have a finer configuration. To see all accepted parameters use `-h` flag, like
|
||||
Both python scripts can have a finer configuration (sqlite and html paths).
|
||||
To see all accepted parameters use `-h` flag, like
|
||||
```bash
|
||||
python save_dcker_stats.py -h
|
||||
python save_docker_stats.py -h
|
||||
python generate_html.py -h
|
||||
```
|
||||
|
||||
|
@ -4,6 +4,7 @@ import argparse
|
||||
import logging
|
||||
import os
|
||||
import sqlite3
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
import pandas as pd
|
||||
@ -62,10 +63,10 @@ def generate_html_report(sqlite_fn: Path, html_fn: Path):
|
||||
fig.for_each_trace(lambda trace: trace.update(fillcolor=trace.line.color))
|
||||
fig["layout"].pop("updatemenus") # optional, drop animation buttons
|
||||
fig.update_layout(transition={"duration": 1e12})
|
||||
now = datetime.now()
|
||||
fig.update_layout(
|
||||
title="Utilisation de RAM pour les docker-compose de l'eunuque"
|
||||
" (pour voir une stat, mettre la sourie sur le haut des courbes,"
|
||||
" vers les points)",
|
||||
title="Utilisation de RAM pour les docker-compose de l'eunuque (pour voir une stat, mettre la sourie sur "
|
||||
f"le haut des courbes, vers les points), généré le {now.strftime('%d/%m/%Y %H:%M:%S')}",
|
||||
xaxis_title="Temps",
|
||||
yaxis_title="RAM",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user