All checks were successful
continuous-integration/drone/push Build is passing
We would like to apologize for the inconvenience caused and we would like to thank you for the quick report.
200 lines
7.5 KiB
Plaintext
200 lines
7.5 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<link rel="stylesheet" href="/public/css/login.css">
|
|
<title>Confidentialité et Sécurité</title>
|
|
<link rel="icon" href="/public/assets/homelab_logo.png" />
|
|
|
|
<style>
|
|
.modal {
|
|
display: none; /* Hidden by default */
|
|
position: fixed; /* Stay in place */
|
|
z-index: 1; /* Sit on top */
|
|
padding-top: 100px; /* Location of the box */
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%; /* Full width */
|
|
height: 100%; /* Full height */
|
|
overflow: auto; /* Enable scroll if needed */
|
|
background-color: rgb(0,0,0); /* Fallback color */
|
|
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
}
|
|
|
|
/* Modal Content */
|
|
.modal-content {
|
|
background-color: #fefefe;
|
|
margin: auto;
|
|
padding: 20px;
|
|
border: 1px solid #888;
|
|
width: 80%;
|
|
}
|
|
|
|
/* The Close Button */
|
|
.close {
|
|
color: #aaaaaa;
|
|
float: right;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.close:hover,
|
|
.close:focus {
|
|
color: #000;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.custom-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: inherit;
|
|
font-weight: 500;
|
|
font-size: 14px; /* réduit la taille de la police */
|
|
padding: 0.6em 1.2em; /* réduit le padding */
|
|
color: white;
|
|
background: linear-gradient(0deg, rgba(77,54,208,1) 0%, rgba(132,116,254,1) 100%);
|
|
border: none;
|
|
box-shadow: 0 0.7em 1.5em -0.5em #4d36d0be;
|
|
letter-spacing: 0.05em;
|
|
border-radius: 15em; /* réduit le rayon de la bordure */
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
|
|
</style>
|
|
</head>
|
|
|
|
<body class="light-mode animate">
|
|
<div class="container mt-4 table-container animate">
|
|
<h2 class="text-center">Confidentialité et Sécurité</h2><br>
|
|
|
|
|
|
<h2>Données d'analyse</h2>
|
|
<div class="row">
|
|
<% reports && reports.forEach((report, index) => { %>
|
|
<% if (report) { %>
|
|
<div class="col-md-4 text-center">
|
|
<button class="btn btn-primary custom-btn reportName" data-index="<%= index %>"><%= report.name %></button>
|
|
</div>
|
|
<% if ((index + 1) % 3 === 0) { %>
|
|
</div><div class="row">
|
|
<% } %>
|
|
<div id="myReportModal<%= index %>" class="modal">
|
|
<div class="modal-content">
|
|
<span class="close" data-index="<%= index %>">×</span>
|
|
<pre><%= report.content %></pre>
|
|
</div>
|
|
</div>
|
|
<% } %>
|
|
<% }); %>
|
|
</div>
|
|
|
|
<br><div class="d-flex justify-content-center align-items-center">
|
|
<a class="dropdown-item text-center text-white no-hover custom-btn" href="/dpanel/dashboard/admin/" style="max-width: 250px; padding: 10px;">
|
|
<i class="fas fa-sign-out-alt text-white "></i> Retourner au dashboard admin
|
|
</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="d-flex justify-content-center animate">
|
|
<button id="themeSwitcher" class="btn btn-warning mt-3 animate ">Changer de Thème</button>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var logNames = document.getElementsByClassName("logName");
|
|
var closeButtons = document.getElementsByClassName("close");
|
|
|
|
// Add event listeners to all log names
|
|
for (var i = 0; i < logNames.length; i++) {
|
|
logNames[i].addEventListener("click", function(event) {
|
|
var index = event.target.getAttribute("data-index");
|
|
var modal = document.getElementById("myModal" + index);
|
|
modal.style.display = "block";
|
|
});
|
|
}
|
|
|
|
// Add event listeners to all close buttons
|
|
for (var i = 0; i < closeButtons.length; i++) {
|
|
closeButtons[i].addEventListener("click", function(event) {
|
|
var index = event.target.getAttribute("data-index");
|
|
var modal = document.getElementById("myModal" + index);
|
|
modal.style.display = "none";
|
|
});
|
|
}
|
|
|
|
// When the user clicks anywhere outside of the modal, close it
|
|
window.onclick = function(event) {
|
|
if (event.target.className === "modal") {
|
|
event.target.style.display = "none";
|
|
}
|
|
}
|
|
|
|
var reportNames = document.getElementsByClassName("reportName");
|
|
var reportCloseButtons = document.getElementsByClassName("close");
|
|
|
|
// Add event listeners to all report names
|
|
for (var i = 0; i < reportNames.length; i++) {
|
|
reportNames[i].addEventListener("click", function(event) {
|
|
var index = event.target.getAttribute("data-index");
|
|
var modal = document.getElementById("myReportModal" + index);
|
|
modal.style.display = "block";
|
|
});
|
|
}
|
|
|
|
// Add event listeners to all close buttons
|
|
for (var i = 0; i < reportCloseButtons.length; i++) {
|
|
reportCloseButtons[i].addEventListener("click", function(event) {
|
|
var index = event.target.getAttribute("data-index");
|
|
var modal = document.getElementById("myReportModal" + index);
|
|
modal.style.display = "none";
|
|
});
|
|
}
|
|
|
|
// When the user clicks anywhere outside of the modal, close it
|
|
window.onclick = function(event) {
|
|
if (event.target.className === "modal") {
|
|
event.target.style.display = "none";
|
|
}
|
|
}
|
|
const body = document.body;
|
|
|
|
document.getElementById('themeSwitcher').addEventListener('click', function () {
|
|
if (body.classList.contains('dark-mode')) {
|
|
body.classList.remove('dark-mode');
|
|
body.classList.add('light-mode');
|
|
} else {
|
|
body.classList.remove('light-mode');
|
|
body.classList.add('dark-mode');
|
|
}
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const darkModeSwitch = document.getElementById('darkModeSwitch');
|
|
|
|
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
|
|
body.classList.toggle('dark-mode', darkModeMediaQuery.matches);
|
|
|
|
darkModeMediaQuery.addListener(function (e) {
|
|
body.classList.toggle('dark-mode', e.matches);
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</script>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |