Spaces:
Running
Running
como vou saber de quem é os computadores do administrativo que esta ruim, existe a possibilidade de quando eu clica em cima do 1 ruim do administrativo por exemplo abrir um pop up pequeno mostrando qual o computador, CPU MEMORIA, DISCO, Usuario
Browse files- index.html +123 -4
index.html
CHANGED
|
@@ -20,9 +20,42 @@
|
|
| 20 |
.status-great { background-color: #10b981; }
|
| 21 |
.status-good { background-color: #f59e0b; }
|
| 22 |
.status-regular { background-color: #f97316; }
|
| 23 |
-
.status-bad {
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
background: linear-gradient(90deg, rgba(245,158,11,0.2) 0%, rgba(245,158,11,0.6) 100%);
|
| 27 |
}
|
| 28 |
|
|
@@ -345,12 +378,98 @@
|
|
| 345 |
<p>© 2025 TechVision — Monitoramento de Ativos de TI</p>
|
| 346 |
</div>
|
| 347 |
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
|
| 349 |
<script>
|
| 350 |
feather.replace();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 352 |
// Simple animation for cards on load
|
| 353 |
-
|
| 354 |
const cards = document.querySelectorAll('.card');
|
| 355 |
cards.forEach((card, index) => {
|
| 356 |
card.style.opacity = '0';
|
|
|
|
| 20 |
.status-great { background-color: #10b981; }
|
| 21 |
.status-good { background-color: #f59e0b; }
|
| 22 |
.status-regular { background-color: #f97316; }
|
| 23 |
+
.status-bad {
|
| 24 |
+
background-color: #ef4444;
|
| 25 |
+
cursor: pointer;
|
| 26 |
+
}
|
| 27 |
+
.modal {
|
| 28 |
+
display: none;
|
| 29 |
+
position: fixed;
|
| 30 |
+
top: 0;
|
| 31 |
+
left: 0;
|
| 32 |
+
width: 100%;
|
| 33 |
+
height: 100%;
|
| 34 |
+
background-color: rgba(0,0,0,0.7);
|
| 35 |
+
z-index: 1000;
|
| 36 |
+
justify-content: center;
|
| 37 |
+
align-items: center;
|
| 38 |
+
}
|
| 39 |
+
.modal-content {
|
| 40 |
+
background-color: #1e293b;
|
| 41 |
+
padding: 2rem;
|
| 42 |
+
border-radius: 0.5rem;
|
| 43 |
+
width: 90%;
|
| 44 |
+
max-width: 500px;
|
| 45 |
+
max-height: 80vh;
|
| 46 |
+
overflow-y: auto;
|
| 47 |
+
}
|
| 48 |
+
.modal-header {
|
| 49 |
+
display: flex;
|
| 50 |
+
justify-content: space-between;
|
| 51 |
+
align-items: center;
|
| 52 |
+
margin-bottom: 1rem;
|
| 53 |
+
}
|
| 54 |
+
.close-modal {
|
| 55 |
+
cursor: pointer;
|
| 56 |
+
font-size: 1.5rem;
|
| 57 |
+
}
|
| 58 |
+
.gold-gradient {
|
| 59 |
background: linear-gradient(90deg, rgba(245,158,11,0.2) 0%, rgba(245,158,11,0.6) 100%);
|
| 60 |
}
|
| 61 |
|
|
|
|
| 378 |
<p>© 2025 TechVision — Monitoramento de Ativos de TI</p>
|
| 379 |
</div>
|
| 380 |
</footer>
|
| 381 |
+
<!-- Modal Structure -->
|
| 382 |
+
<div class="modal" id="assetModal">
|
| 383 |
+
<div class="modal-content">
|
| 384 |
+
<div class="modal-header">
|
| 385 |
+
<h3 class="text-xl font-bold">Detalhes do Ativo</h3>
|
| 386 |
+
<span class="close-modal text-slate-400">×</span>
|
| 387 |
+
</div>
|
| 388 |
+
<div id="modalBody">
|
| 389 |
+
<!-- Content will be inserted here by JS -->
|
| 390 |
+
</div>
|
| 391 |
+
</div>
|
| 392 |
+
</div>
|
| 393 |
|
| 394 |
<script>
|
| 395 |
feather.replace();
|
| 396 |
+
|
| 397 |
+
// Modal functionality
|
| 398 |
+
const modal = document.getElementById('assetModal');
|
| 399 |
+
const closeBtn = document.querySelector('.close-modal');
|
| 400 |
|
| 401 |
+
// Sample asset data - in real app this would come from API
|
| 402 |
+
const assetData = {
|
| 403 |
+
"administrativo-bad": [
|
| 404 |
+
{
|
| 405 |
+
id: "ADM-001",
|
| 406 |
+
name: "Estação ADM-001",
|
| 407 |
+
cpu: "Intel i5-8400",
|
| 408 |
+
memory: "8GB DDR4",
|
| 409 |
+
disk: "256GB SSD",
|
| 410 |
+
user: "João Silva",
|
| 411 |
+
os: "Windows 10 Pro",
|
| 412 |
+
status: "Ruim",
|
| 413 |
+
issues: ["Disco com 95% de uso", "Memória insuficiente"]
|
| 414 |
+
}
|
| 415 |
+
]
|
| 416 |
+
};
|
| 417 |
+
|
| 418 |
+
// Add click handlers to all status-bad elements
|
| 419 |
+
document.querySelectorAll('.status-bad').forEach(el => {
|
| 420 |
+
el.addEventListener('click', function() {
|
| 421 |
+
const sector = this.closest('tr').querySelector('td').textContent.toLowerCase().trim();
|
| 422 |
+
const status = this.classList.contains('status-bad') ? 'bad' : '';
|
| 423 |
+
const key = `${sector}-${status}`;
|
| 424 |
+
|
| 425 |
+
if(assetData[key]) {
|
| 426 |
+
const asset = assetData[key][0]; // Get first bad asset
|
| 427 |
+
|
| 428 |
+
document.getElementById('modalBody').innerHTML = `
|
| 429 |
+
<div class="space-y-4">
|
| 430 |
+
<div>
|
| 431 |
+
<p class="text-slate-400">Identificação</p>
|
| 432 |
+
<p class="text-white">${asset.id} - ${asset.name}</p>
|
| 433 |
+
</div>
|
| 434 |
+
<div>
|
| 435 |
+
<p class="text-slate-400">Usuário</p>
|
| 436 |
+
<p class="text-white">${asset.user}</p>
|
| 437 |
+
</div>
|
| 438 |
+
<div>
|
| 439 |
+
<p class="text-slate-400">Especificações</p>
|
| 440 |
+
<p class="text-white">CPU: ${asset.cpu}</p>
|
| 441 |
+
<p class="text-white">Memória: ${asset.memory}</p>
|
| 442 |
+
<p class="text-white">Disco: ${asset.disk}</p>
|
| 443 |
+
<p class="text-white">SO: ${asset.os}</p>
|
| 444 |
+
</div>
|
| 445 |
+
<div>
|
| 446 |
+
<p class="text-slate-400">Status</p>
|
| 447 |
+
<p class="text-red-400">${asset.status}</p>
|
| 448 |
+
<ul class="list-disc pl-5 text-red-400 mt-1">
|
| 449 |
+
${asset.issues.map(issue => `<li>${issue}</li>`).join('')}
|
| 450 |
+
</ul>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
`;
|
| 454 |
+
|
| 455 |
+
modal.style.display = 'flex';
|
| 456 |
+
}
|
| 457 |
+
});
|
| 458 |
+
});
|
| 459 |
+
|
| 460 |
+
// Close modal
|
| 461 |
+
closeBtn.addEventListener('click', () => {
|
| 462 |
+
modal.style.display = 'none';
|
| 463 |
+
});
|
| 464 |
+
|
| 465 |
+
// Close when clicking outside
|
| 466 |
+
window.addEventListener('click', (e) => {
|
| 467 |
+
if(e.target === modal) {
|
| 468 |
+
modal.style.display = 'none';
|
| 469 |
+
}
|
| 470 |
+
});
|
| 471 |
// Simple animation for cards on load
|
| 472 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 473 |
const cards = document.querySelectorAll('.card');
|
| 474 |
cards.forEach((card, index) => {
|
| 475 |
card.style.opacity = '0';
|