add logo configuration

This commit is contained in:
Simon Vieille 2019-06-13 11:02:49 +02:00
parent 4a12a1a736
commit 40d236345a
Signed by: deblan
GPG Key ID: 03383D15A1D31745
4 changed files with 18 additions and 1 deletions

View File

@ -53,6 +53,12 @@ Inclure les graphiques du jour générés par Munin (rapport mail uniquement) :
export MUNIN_DIRECTORY="/var/cache/munin/www/foo/bar/" export MUNIN_DIRECTORY="/var/cache/munin/www/foo/bar/"
``` ```
Utiliser votre logo :
```bash
export LOGO_URL=https://www.example.com/logo.png
```
Le projet inclut un rendu HTML et un rendu en texte. Le rendu par défaut est l'HTML. Le projet inclut un rendu HTML et un rendu en texte. Le rendu par défaut est l'HTML.
Vous pouvez créer vos templates (se référer au code source). Vous pouvez créer vos templates (se référer au code source).

3
report
View File

@ -8,6 +8,9 @@
# export MUNIN_DIRECTORY=/var/cache/munin/www/localhost/localhost # export MUNIN_DIRECTORY=/var/cache/munin/www/localhost/localhost
# export SMART_DEVICES="/dev/sda /dev/sdb /dev/sdc" # export SMART_DEVICES="/dev/sda /dev/sdb /dev/sdc"
# export LOGO_URL=
# -> default is: https://upload.deblan.org/u/2019-05/5cefbc0a.png
export PATH=/usr/sbin:/usr/bin:/sbin:/bin export PATH=/usr/sbin:/usr/bin:/sbin:/bin
export SCRIPT_NAME="$(realpath "$0")" export SCRIPT_NAME="$(realpath "$0")"

View File

@ -7,4 +7,12 @@
export hostname="$(get_hostname)" export hostname="$(get_hostname)"
export date="$(get_date)" export date="$(get_date)"
if [ -n "$LOGO_URL" ]; then
logo="$LOGO_URL"
else
logo="https://upload.deblan.org/u/2019-05/5cefbc0a.png"
fi
export logo
render_template header render_template header

View File

@ -48,7 +48,7 @@
<table width="100%"> <table width="100%">
<tr> <tr>
<td valign="middle" width="245"> <td valign="middle" width="245">
<img src="https://upload.deblan.org/u/2019-05/5cefbc0a.png"> <img src="${logo}">
</td> </td>
<td width="10"></td> <td width="10"></td>
<td valign="middle" style="font-size: 22px"> <td valign="middle" style="font-size: 22px">