Files
TDI-Dashboard/templates/_base.html
T
Yan Xell 956f8aec56
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/tag/ci Pipeline failed
ci/woodpecker/tag/deploy-test Pipeline was successful
prevedi un postgres sql
2026-05-19 15:34:27 +02:00

122 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>${title} — RPA Report</title>
<style>${css}</style>
<style>${page_css}</style>
</head>
<body>
<div id="page-loader"><div class="page-loader-ring"></div></div>
<header>
<div class="hdr-left">
<a href="/" class="hdr-nav ${nav_dashboard}">Dashboard</a>
<a href="/calendar" class="hdr-nav ${nav_calendar}">Calendario</a>
<a href="/schema" class="hdr-nav ${nav_schema}">Schema</a>
<a href="/runs" class="hdr-nav ${nav_runs}">Processi RPA</a>
<a href="/logs" class="hdr-nav ${nav_logs}">Log DB</a>
</div>
<h1>${h1_title}</h1>
<div class="hdr-right">
<span class="ts">${now} &nbsp;|&nbsp; ${db_name}</span>
<button class="refresh-btn" title="Aggiorna dati" onclick="location.reload()">&#8635;</button>
<div class="wrench-menu">
<button class="wrench-btn" title="Impostazioni">&#9881;</button>
<div class="wrench-drop">
<a href="/change-db">&#128194; Cambia DB&hellip;</a>
<button onclick="document.getElementById('modal-db-types').classList.add('open');this.closest('.wrench-drop').classList.remove('open')">&#128203; Tipi di Dashboard&hellip;</button>
<button onclick="document.getElementById('modal-db-conn').classList.add('open');this.closest('.wrench-drop').classList.remove('open')">&#128225; Sorgente Dati&hellip;</button>
<button onclick="document.getElementById('modal-login-settings').classList.add('open');this.closest('.wrench-drop').classList.remove('open')">&#128274; Impostazioni Login&hellip;</button>
</div>
</div>
${logout_btn}
</div>
</header>
<nav>
${nav_step_link}
${nav_report_link}
${nav_sharepoint_link}
${nav_pec_link}
</nav>
<main>
${content}
</main>
<footer>RPA Process &mdash; Dashboard &nbsp;&bull;&nbsp; vi<span style="color:#22c55e;font-weight:700">XE</span>vo</footer>
<div id="modal-db-types" class="modal-overlay">
<div class="modal-box">
<button class="modal-close" onclick="document.getElementById('modal-db-types').classList.remove('open')" title="Chiudi">&#10005;</button>
<h3>&#128203; Dashboard</h3>
<p class="modal-subtitle">DB supportati:</p>
<ul>
<li>RPA Corsi Intraziendali</li>
<li>RPA Regione Lombardia</li>
</ul>
</div>
</div>
${modal_login}
${modal_db_conn}
<script>${page_js}</script>
<script>
document.addEventListener('DOMContentLoaded',function(){
var l=document.getElementById('page-loader');
if(l) l.classList.add('hidden');
});
(function(){
var btn = document.querySelector('.wrench-btn');
var drop = document.querySelector('.wrench-drop');
if(btn && drop){
btn.addEventListener('click', function(e){
e.stopPropagation();
drop.classList.toggle('open');
});
document.addEventListener('click', function(){
drop.classList.remove('open');
});
}
})();
var _modalTypes = document.getElementById('modal-db-types');
if (_modalTypes) {
_modalTypes.addEventListener('click', function(e) {
if (e.target === this) this.classList.remove('open');
});
}
var _modalLogin = document.getElementById('modal-login-settings');
if (_modalLogin) {
_modalLogin.addEventListener('click', function(e) {
if (e.target === this) this.classList.remove('open');
});
}
var _modalDbConn = document.getElementById('modal-db-conn');
if (_modalDbConn) {
_modalDbConn.addEventListener('click', function(e) {
if (e.target === this) this.classList.remove('open');
});
}
document.querySelectorAll('th').forEach(function(th, i) {
th.style.cursor = 'pointer';
th.title = 'Clicca per ordinare';
var asc = true;
th.addEventListener('click', function() {
var tbody = th.closest('table').querySelector('tbody');
var rows = Array.prototype.slice.call(tbody.querySelectorAll('tr'));
rows.sort(function(a, b) {
var av = (a.cells[i] ? a.cells[i].textContent : '').trim();
var bv = (b.cells[i] ? b.cells[i].textContent : '').trim();
return asc ? av.localeCompare(bv, 'it', {numeric: true}) : bv.localeCompare(av, 'it', {numeric: true});
});
rows.forEach(function(r) { tbody.appendChild(r); });
th.closest('thead').querySelectorAll('th').forEach(function(h) { h.classList.remove('sort-asc','sort-desc'); });
th.classList.add(asc ? 'sort-asc' : 'sort-desc');
asc = !asc;
});
});
</script>
</body>
</html>