diff --git a/html/stats.php b/html/stats.php
index c41a971..02fb6bb 100644
--- a/html/stats.php
+++ b/html/stats.php
@@ -30,6 +30,7 @@
- Mattermost
- Nextcloud
+ - Synthèse
- Dernières 24h
- Dernière semaine
- Dernier mois
@@ -46,9 +48,11 @@
Mattermost
+ Synthèse
+
Dernières 24h
- Dernière semaine
+ Dernière semaine
Dernier mois
@@ -56,6 +60,8 @@
Nextcloud
+ Synthèse
+
Dernières 24h
Dernière semaine
diff --git a/print_stats.py b/print_stats.py
index 1ad8aa7..f7503ab 100755
--- a/print_stats.py
+++ b/print_stats.py
@@ -8,6 +8,7 @@ from dotenv import load_dotenv
from seleniumwire import webdriver
from seleniumwire.webdriver import FirefoxOptions
+
try:
os.chdir(os.path.dirname(os.path.abspath(__file__)))
load_dotenv()
@@ -15,19 +16,34 @@ try:
opts = FirefoxOptions()
opts.add_argument("--headless")
browser = webdriver.Firefox(options=opts,executable_path="/usr/local/bin/geckodriver")
- browser.set_window_size(3000, 1120)
def interceptor(request):
request.headers['Authorization'] = 'Basic '+os.environ["ES_TOKEN"]
browser.request_interceptor = interceptor
+ browser.set_window_size(3000, 285)
+
+ browser.get("https://mon.gnous.fr/app/dashboards#/view/813e0b00-8544-11ec-876e-0f6254f8a3d0?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-15m%2Cto%3Anow))&hide-filter-bar=true")
+ sleep(60)
+ browser.get_screenshot_as_file("html/ressources/stats/mmsyn.png")
+
+ browser.set_window_size(3000, 930)
+
for duration in ["24h", "7d", "1M", "1y"]:
- browser.get("https://mon.gnous.fr/app/dashboards#/view/380099d0-4944-11ec-81a9-95d7ffa23468?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
+ browser.get("https://mon.gnous.fr/app/dashboards#/view/562f3400-88f2-11ec-876e-0f6254f8a3d0?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
sleep(60)
browser.get_screenshot_as_file("html/ressources/stats/mm"+duration+".png")
+ browser.set_window_size(3000, 285)
+
+ browser.get("https://mon.gnous.fr/app/dashboards#/view/e4e742a0-88fc-11ec-876e-0f6254f8a3d0?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-15m%2Cto%3Anow))&hide-filter-bar=true")
+ sleep(60)
+ browser.get_screenshot_as_file("html/ressources/stats/ncsyn.png")
+
+ browser.set_window_size(3000, 930)
+
for duration in ["24h", "7d", "1M", "1y"]:
- browser.get("https://mon.gnous.fr/app/dashboards#/view/ef70de60-4947-11ec-81a9-95d7ffa23468?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
+ browser.get("https://mon.gnous.fr/app/dashboards#/view/14d78520-8a78-11ec-876e-0f6254f8a3d0?embed=true&_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-"+duration+"%2Cto%3Anow))&hide-filter-bar=true")
sleep(60)
browser.get_screenshot_as_file("html/ressources/stats/nc"+duration+".png")