Spaces:
Running
Running
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Relatórios - Mobile Test Pilot</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#21223a', | |
| secondary: '#ff580f', | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body class="bg-primary min-h-screen text-white"> | |
| <custom-sidebar></custom-sidebar> | |
| <main class="ml-64 p-8"> | |
| <div class="max-w-7xl mx-auto"> | |
| <div class="flex items-center justify-between mb-8"> | |
| <div> | |
| <h1 class="text-3xl font-bold mb-2">Relatórios</h1> | |
| <p class="text-gray-300">Análise detalhada do desempenho dos seus testes</p> | |
| </div> | |
| <div class="flex items-center gap-4"> | |
| <div class="relative"> | |
| <input type="text" placeholder="Buscar relatório..." class="bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 pl-10 text-white focus:border-secondary focus:ring-2 focus:ring-secondary focus:ring-opacity-50"> | |
| <i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i> | |
| </div> | |
| <button class="bg-secondary hover:bg-orange-600 text-white px-4 py-2 rounded-lg flex items-center gap-2"> | |
| <i data-feather="filter" class="w-4 h-4"></i> | |
| Filtrar | |
| </button> | |
| <button class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-lg flex items-center gap-2"> | |
| <i data-feather="download" class="w-4 h-4"></i> | |
| Exportar | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Estatísticas Gerais --> | |
| <div class="grid grid-cols-4 gap-6 mb-8"> | |
| <div class="bg-gray-800 p-6 rounded-2xl border border-gray-700"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-400 text-sm">Total de Testes</p> | |
| <p class="text-2xl font-bold">245</p> | |
| </div> | |
| <div class="w-12 h-12 bg-secondary bg-opacity-20 rounded-full flex items-center justify-center"> | |
| <i data-feather="bar-chart-2" class="text-secondary"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-2xl border border-gray-700"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-400 text-sm">Taxa de Sucesso</p> | |
| <p class="text-2xl font-bold text-green-400">89%</p> | |
| </div> | |
| <div class="w-12 h-12 bg-green-500 bg-opacity-20 rounded-full flex items-center justify-center"> | |
| <i data-feather="trending-up" class="text-green-400"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-2xl border border-gray-700"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-400 text-sm">Tempo Médio</p> | |
| <p class="text-2xl font-bold text-blue-400">28min</p> | |
| </div> | |
| <div class="w-12 h-12 bg-blue-500 bg-opacity-20 rounded-full flex items-center justify-center"> | |
| <i data-feather="clock" class="text-blue-400"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-800 p-6 rounded-2xl border border-gray-700"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-400 text-sm">Apps Testados</p> | |
| <p class="text-2xl font-bold text-purple-400">18</p> | |
| </div> | |
| <div class="w-12 h-12 bg-purple-500 bg-opacity-20 rounded-full flex items-center justify-center"> | |
| <i data-feather="smartphone" class="text-purple-400"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Gráficos --> | |
| <div class="grid grid-cols-2 gap-6 mb-8"> | |
| <!-- Gráfico de Status dos Testes --> | |
| <div class="bg-primary rounded-2xl border border-gray-700 p-6 shadow-2xl"> | |
| <h3 class="text-xl font-semibold mb-4">Status dos Testes</h3> | |
| <div class="h-64"> | |
| <canvas id="statusChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Gráfico de Performance por Plataforma --> | |
| <div class="bg-primary rounded-2xl border border-gray-700 p-6 shadow-2xl"> | |
| <h3 class="text-xl font-semibold mb-4">Performance por Plataforma</h3> | |
| <div class="h-64"> | |
| <canvas id="platformChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Tendência Temporal --> | |
| <div class="bg-primary rounded-2xl border border-gray-700 p-6 shadow-2xl mb-8"> | |
| <h3 class="text-xl font-semibold mb-4">Tendência de Testes (Últimos 30 dias)</h3> | |
| <div class="h-80"> | |
| <canvas id="trendChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Relatórios Detalhados --> | |
| <div class="bg-primary rounded-2xl border border-gray-700 p-6 shadow-2xl"> | |
| <div class="flex items-center justify-between mb-6"> | |
| <h3 class="text-xl font-semibold">Relatórios Detalhados</h3> | |
| <button class="bg-secondary hover:bg-orange-600 text-white px-4 py-2 rounded-lg flex items-center gap-2"> | |
| <i data-feather="plus" class="w-4 h-4"></i> | |
| Novo Relatório | |
| </button> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="w-full"> | |
| <thead> | |
| <tr class="border-b border-gray-700"> | |
| <th class="text-left py-3 px-4">Aplicativo</th> | |
| <th class="text-left py-3 px-4">Plataforma</th> | |
| <th class="text-left py-3 px-4">Data</th> | |
| <th class="text-left py-3 px-4">Status</th> | |
| <th class="text-left py-3 px-4">Métricas</th> | |
| <th class="text-left py-3 px-4">Ações</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr class="border-b border-gray-700 hover:bg-gray-800 transition-colors"> | |
| <td class="py-4 px-4"> | |
| <div class="flex items-center gap-3"> | |
| <div class="w-10 h-10 bg-secondary bg-opacity-20 rounded-lg flex items-center justify-center"> | |
| <i data-feather="smartphone" class="text-secondary"></i> | |
| </div> | |
| <div> | |
| <p class="font-semibold">App Banking</p> | |
| <p class="text-sm text-gray-400">v1.2.3</p> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="bg-green-500 text-white px-2 py-1 rounded-full text-xs">Android</span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <p class="text-sm">15/12/2024</p> | |
| <p class="text-xs text-gray-400">14:30</p> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="text-green-400 flex items-center gap-2"> | |
| <i data-feather="check-circle" class="w-4 h-4"></i> | |
| Concluído | |
| </span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="text-sm"> | |
| <p>CPU: 15% | Mem: 128MB</p> | |
| <p class="text-xs text-gray-400">FPS: 60 | Latência: 42ms</p> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="flex gap-2"> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Visualizar"> | |
| <i data-feather="eye" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Download"> | |
| <i data-feather="download" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Compartilhar"> | |
| <i data-feather="share" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="border-b border-gray-700 hover:bg-gray-800 transition-colors"> | |
| <td class="py-4 px-4"> | |
| <div class="flex items-center gap-3"> | |
| <div class="w-10 h-10 bg-blue-500 bg-opacity-20 rounded-lg flex items-center justify-center"> | |
| <i data-feather="shopping-cart" class="text-blue-400"></i> | |
| </div> | |
| <div> | |
| <p class="font-semibold">E-commerce App</p> | |
| <p class="text-sm text-gray-400">v2.0.1</p> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="bg-blue-500 text-white px-2 py-1 rounded-full text-xs">iOS</span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <p class="text-sm">14/12/2024</p> | |
| <p class="text-xs text-gray-400">11:15</p> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="text-green-400 flex items-center gap-2"> | |
| <i data-feather="check-circle" class="w-4 h-4"></i> | |
| Concluído | |
| </span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="text-sm"> | |
| <p>CPU: 18% | Mem: 156MB</p> | |
| <p class="text-xs text-gray-400">FPS: 58 | Latência: 38ms</p> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="flex gap-2"> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Visualizar"> | |
| <i data-feather="eye" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Download"> | |
| <i data-feather="download" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Compartilhar"> | |
| <i data-feather="share" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </td> | |
| </tr> | |
| <tr class="border-b border-gray-700 hover:bg-gray-800 transition-colors"> | |
| <td class="py-4 px-4"> | |
| <div class="flex items-center gap-3"> | |
| <div class="w-10 h-10 bg-red-500 bg-opacity-20 rounded-lg flex items-center justify-center"> | |
| <i data-feather="map" class="text-red-400"></i> | |
| </div> | |
| <div> | |
| <p class="font-semibold">Navigation App</p> | |
| <p class="text-sm text-gray-400">v3.1.0</p> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="bg-red-500 text-white px-2 py-1 rounded-full text-xs">Android</span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <p class="text-sm">13/12/2024</p> | |
| <p class="text-xs text-gray-400">16:45</p> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <span class="text-red-400 flex items-center gap-2"> | |
| <i data-feather="x-circle" class="w-4 h-4"></i> | |
| Falhou | |
| </span> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="text-sm"> | |
| <p>CPU: 85% | Mem: 256MB</p> | |
| <p class="text-xs text-gray-400">FPS: 12 | Latência: 120ms</p> | |
| </div> | |
| </td> | |
| <td class="py-4 px-4"> | |
| <div class="flex gap-2"> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Visualizar"> | |
| <i data-feather="eye" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Download"> | |
| <i data-feather="download" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 hover:bg-gray-700 rounded-lg transition-colors" title="Compartilhar"> | |
| <i data-feather="share" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <!-- Paginação --> | |
| <div class="flex items-center justify-between mt-6 pt-6 border-t border-gray-700"> | |
| <p class="text-sm text-gray-400">Mostrando 3 de 45 relatórios</p> | |
| <div class="flex gap-2"> | |
| <button class="px-3 py-1 border border-gray-700 rounded-lg text-gray-400 hover:bg-gray-800"> | |
| <i data-feather="chevron-left" class="w-4 h-4"></i> | |
| </button> | |
| <button class="px-3 py-1 bg-secondary text-white rounded-lg">1</button> | |
| <button class="px-3 py-1 border border-gray-700 rounded-lg text-gray-400 hover:bg-gray-800">2</button> | |
| <button class="px-3 py-1 border border-gray-700 rounded-lg text-gray-400 hover:bg-gray-800">3</button> | |
| <button class="px-3 py-1 border border-gray-700 rounded-lg text-gray-400 hover:bg-gray-800"> | |
| <i data-feather="chevron-right" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <script src="components/sidebar.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Atualizar sidebar para marcar a página ativa | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const sidebar = document.querySelector('custom-sidebar'); | |
| if (sidebar) { | |
| const navItems = sidebar.shadowRoot.querySelectorAll('.nav-item'); | |
| navItems.forEach(item => { | |
| if (item.querySelector('span').textContent === 'Relatórios') { | |
| item.classList.add('active'); | |
| } else { | |
| item.classList.remove('active'); | |
| } | |
| }); | |
| } | |
| // Inicializar gráficos | |
| initializeCharts(); | |
| }); | |
| function initializeCharts() { | |
| // Gráfico de Status dos Testes | |
| const statusCtx = document.getElementById('statusChart').getContext('2d'); | |
| new Chart(statusCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Concluídos', 'Falhas', 'Pausados', 'Em Execução'], | |
| datasets: [{ | |
| data: [218, 27, 12, 8], | |
| backgroundColor: [ | |
| '#10B981', | |
| '#EF4444', | |
| '#F59E0B', | |
| '#3B82F6' | |
| ], | |
| borderWidth: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| color: '#E5E7EB', | |
| font: { | |
| size: 12 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Gráfico de Performance por Plataforma | |
| const platformCtx = document.getElementById('platformChart').getContext('2d'); | |
| new Chart(platformCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Android', 'iOS'], | |
| datasets: [{ | |
| label: 'Taxa de Sucesso (%)', | |
| data: [92, 86], | |
| backgroundColor: '#FF580F', | |
| borderRadius: 6 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 100, | |
| grid: { | |
| color: '#374151' | |
| }, | |
| ticks: { | |
| color: '#9CA3AF' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| }, | |
| ticks: { | |
| color: '#9CA3AF' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| } | |
| } | |
| }); | |
| // Gráfico de Tendência Temporal | |
| const trendCtx = document.getElementById('trendChart').getContext('2d'); | |
| new Chart(trendCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['1', '5', '10', '15', '20', '25', '30'], | |
| datasets: [ | |
| { | |
| label: 'Testes Concluídos', | |
| data: [8, 12, 6, 14, 10, 16, 12], | |
| borderColor: '#10B981', | |
| backgroundColor: 'rgba(16, 185, 129, 0.1)', | |
| tension: 0.4, | |
| fill: true | |
| }, | |
| { | |
| label: 'Testes com Falha', | |
| data: [2, 3, 1, 4, 2, 3, 1], | |
| borderColor: '#EF4444', | |
| backgroundColor: 'rgba(239, 68, 68, 0.1)', | |
| tension: 0.4, | |
| fill: true | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| grid: { | |
| color: '#374151' | |
| }, | |
| ticks: { | |
| color: '#9CA3AF' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| color: '#374151' | |
| }, | |
| ticks: { | |
| color: '#9CA3AF' | |
| } | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| color: '#E5E7EB' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> |