modifcation du CSS et nettoyage

This commit is contained in:
Yacine31
2025-04-18 00:30:37 +02:00
parent 22232d89e3
commit a63254eeae
2 changed files with 41 additions and 47 deletions

View File

@@ -1,3 +1,4 @@
#!/bin/bash
export LANG=en_US
DATETIME=`date +%Y%m%d%H%M`
HNAME=$(hostname)
@@ -23,7 +24,7 @@ do
echo "<h1>Configuration système</h1>" >> ${HTML_FILE}
for f in sh/*.sh
do
/bin/sh $f >> ${HTML_FILE}
bash $f >> ${HTML_FILE}
done
echo "<br><br>" >> ${HTML_FILE}
@@ -33,7 +34,6 @@ do
echo "<h1>Configuration de l'instance ASM</h1>" >> ${HTML_FILE}
for f in asm/*.sql
do
# sed '1 s/^/SET PAGES 999 FEEDBACK OFF MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP OFF\n/' $f | sqlplus -s / as sysdba >> ${HTML_FILE}
cat asm/sql_header.txt $f | sqlplus -s / as sysdba >> ${HTML_FILE}
done
fi
@@ -51,8 +51,7 @@ do
echo "<h1>Configuration de la base de données ${ORACLE_SID}</h1>" >> ${HTML_FILE}
for f in sql/*.sql
do
# sed '1 s/^/SET PAGES 999 FEEDBACK OFF MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP OFF\n/' $f | sqlplus -s / as sysdba >> ${HTML_FILE}
cat sql/sql_header.txt $f | sqlplus -s / as sysdba >> ${HTML_FILE}
cat sql/sql_header.txt $f | sqlplus -s / as sysdba >> ${HTML_FILE}
done
# exécution des scripts dans sh/local si présents
@@ -62,31 +61,17 @@ do
# Exécution des scripts locaux si le dossier existe
if [ -d "$LOCAL_DIR" ]; then
echo "[INFO] Détection du dossier local : $LOCAL_DIR"
for script in "$LOCAL_DIR"/*.sh; do
[ -f "$script" ] || continue
echo "[INFO] Exécution du script local : $script"
bash "$script" >> ${HTML_FILE}
for f in "$LOCAL_DIR"/*.sh; do
[ -f "$f" ] || continue
echo "[INFO] Exécution du script local : $f"
bash "$f" >> ${HTML_FILE}
done
else
echo "[INFO] Aucun script local détecté dans ${LOCAL_DIR}."
fi
# modification du html pour le CSS
sed -i 's/<table.*>$/<table class="table table-striped">/g' ${HTML_FILE}
cat sql/99_html_footer.html >> ${HTML_FILE}
# coloriage des mots clé en rouge ou en vert
for txt in INVALID FAILED NOARCHIVELOG OFFLINE MOUNTED
do
sed -i "s#<td>${txt}</td>#<td style='color: red; background-color: yellow;'>${txt}</td>#g" ${HTML_FILE}
done
for txt in COMPLETED
do
sed -i "s#<td>${txt}</td>#<td style='color: white; background-color: green;'>${txt}</td>#g" ${HTML_FILE}
done
echo Rapport dans le fichier html : ${HTML_FILE}
done

View File

@@ -6,30 +6,39 @@
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Rapport Base Oracle</title>
<title>Rapport de Base Oracle</title>
<style type="text/css">
body {font:12pt Arial,Helvetica,Geneva,sans-serif; color:black; background:white;}
h1 {font-size:16pt; font-weight:bold; color:#336699; border-bottom:1px solid #336699; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;}
h2 {font-size:14pt; font-weight:bold; color:#336699; margin-top:10pt; margin-bottom:0pt;}
h3 {font-size:12pt; font-weight:bold; color:#336699; margin-top:4pt; margin-bottom:0pt;}
pre {font:10pt monospace,Monaco,"Courier New",Courier; display: inline-block; padding: 10px; border: 1px solid #000; border-radius: 5px; background-color: #f5f5f5; overflow: auto;}
a {color:#663300;}
table {font-size:10pt; border-collapse:collapse; empty-cells:show; white-space:nowrap; border:1px solid #336699;}
li {font-size:10pt; color:black; padding-left:4px; padding-right:4px; padding-bottom:2px;}
th {font-weight:bold; color:white; background:#0066CC; padding-left:4px; padding-right:4px; padding-bottom:2px;}
tr {color:black; background:white;}
tr:hover {color:white; background:#0066AA;}
tr.main {color:black; background:white;}
tr.main:hover {color:black; background:white;}
td {vertical-align:top; border:1px solid #336699;padding-left: 5px;padding-right: 5px;}
td.c {text-align:center;}
font.n {font-size:10pt; font-style:italic; color:#336699;}
font.f {font-size:10pt; color:#999999; border-top:1px solid #336699; margin-top:30pt;}
div.google-chart {width:&&edb360_chart_width.; height:500px;}
.highlight {background: red;}
.pct_warning {background: yellowgreen;}
.pct_error {background: red}
</style>
<style type="text/css">
body { font:12pt; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f9f9f9; padding: 20px; color: #333; }
h1 { font-size:16pt; font-weight:bold; color:#336699; border-bottom:1px solid #336699; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px; }
h2 { font-size:14pt; font-weight:bold; color:#336699; margin-top:10pt; margin-bottom:0pt; }
h3 { font-size:14pt; font-weight:normal; color:#336699; margin-top:4pt; margin-bottom:0pt; }
p { line-height: 1.0; margin-bottom: 1.2em; }
pre { display: inline-block; background-color: #f8f8f8; border: 1px solid #ccc; padding: 1em; overflow-x: auto; font-family: monospace; font-size: 0.9em; line-height: 1.2; color: #333; white-space: pre-wrap; word-break: break-all; }
a {color:#663300; }
table { font-size:10pt; border-collapse: collapse; margin: 10px 0; background-color: #fff; empty-cells:show; white-space:nowrap; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
li { font-size:10pt; color:black; padding-left:4px; padding-right:4px; padding-bottom:2px; }
tr { color:black; background:white; }
tr:hover { color:white; background:#0066CC; }
tr.main { color:black; background:white; }
tr.main:hover { color:black; background:white; }
tr.selected { background-color: #d1eaff !important; }
td { padding: 1px 5px; border: 1px solid #ddd; }
th { background-color: #0066CC; color: white; font-weight:normal; cursor: pointer; }
th:hover { background-color: #0066AA; }
th.asc::after { content: " 🔼"; }
th.desc::after { content: " 🔽"; }
td.c { text-align:center; }
font.n { font-size:10pt; font-style:italic; color:#336699; }
font.f { font-size:10pt; color:#999999; border-top:1px solid #336699; margin-top:30pt; }
.highlight { background: red; }
.pct_warning { background: yellowgreen; }
.pct_error { background: red; }
/* Style pour les couleurs conditionnelles */
.orange { background-color: #ff9800; }
.red { background-color: #f44336; }
/* Alignement des cellules numériques à droite */
.numeric { text-align: right; }
</style>