From f2acc56ef7315413ea603f4432187e11d053d3f1 Mon Sep 17 00:00:00 2001 From: adrien Date: Tue, 22 Oct 2024 17:55:31 +0200 Subject: [PATCH] smb-shares-size template --- .gitignore | 2 +- config.php | 19 ++++++++++--------- datadir/smb-authentication.ini | 6 +++--- style.css | 1 + templates/hostScan.xsl | 33 +++++++++++++++++++++++++++++++++ templates/lib/serviceLabel.xsl | 30 ++++++++++++++++-------------- 6 files changed, 64 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 74fe73e..80d4458 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ scans/ -scripts/smb-authentication.ini +datadir/smb-authentication.ini test.php server.php diff --git a/config.php b/config.php index 10bfdd5..44a7d96 100644 --- a/config.php +++ b/config.php @@ -1,6 +1,6 @@ false, ], "host" => [ - '-Pn' => true, - '-F' => true, - '-sV' => true, - '-T' => 5, - '--script' => "http-info,smb-shares-size", - '--stylesheet' => "$BASEDIR/templates/hostScan.xsl", - 'refreshPeriod' => 60, - 'sudo' => true, + '-Pn' => true, + '-F' => true, + '-sV' => true, + '-T' => 5, + '--script' => "http-info,smb-shares-size", + '--script-args-file' => "smb-authentication.ini", + '--stylesheet' => "$BASEDIR/templates/hostScan.xsl", + 'refreshPeriod' => 60, + 'sudo' => true, ], ]; diff --git a/datadir/smb-authentication.ini b/datadir/smb-authentication.ini index e1f9089..a640f07 100644 --- a/datadir/smb-authentication.ini +++ b/datadir/smb-authentication.ini @@ -1,3 +1,3 @@ -smbdomain = -smbuser = -smbpassword = +smbdomain = auth.ad.e2.rie.gouv.fr +smbuser = application.drieat +smbpassword = d+iFiWn4!cAzdr3KopiM>EA diff --git a/style.css b/style.css index 6425104..aefe51c 100644 --- a/style.css +++ b/style.css @@ -58,6 +58,7 @@ main { --used-percent: calc(100% - 100%*var(--free-ratio)); --color: hsl(calc(120*var(--free-ratio)) 100% 50%); background-image: linear-gradient(to right, var(--color) var(--used-percent), transparent var(--used-percent), transparent) !important; + text-align: center !important; } .compact .ui.icon.buttons .mini.button { diff --git a/templates/hostScan.xsl b/templates/hostScan.xsl index 96e9c3f..039bfbc 100755 --- a/templates/hostScan.xsl +++ b/templates/hostScan.xsl @@ -118,6 +118,7 @@ $('.ui.dropdown').dropdown() Service Produit Version + Infos @@ -182,7 +183,21 @@ $('.ui.dropdown').dropdown() orange red + dropdown share-size + + + + + + --free: + + ; --total: + + + + + @@ -213,6 +228,14 @@ $('.ui.dropdown').dropdown() + + + + @@ -221,8 +244,18 @@ $('.ui.dropdown').dropdown() + + + + + + + + \ No newline at end of file diff --git a/templates/lib/serviceLabel.xsl b/templates/lib/serviceLabel.xsl index 8da475d..91ed7fd 100644 --- a/templates/lib/serviceLabel.xsl +++ b/templates/lib/serviceLabel.xsl @@ -24,10 +24,23 @@ red - mini dropdown button share-size + mini dropdown button share-size small + + + + + + --free: + + ; --total: + + + + + @@ -60,21 +73,10 @@ - - - - - - --free: - - ; --total: - - - - +