<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Medi-WOL - Logs</title>
    <!-- Favicon -->
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png">
    <!-- Stylesheets -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <link href="/static/style.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-4">
        <div class="row">
            <div class="col-12">
                <div class="app-header mb-4">
                    <img src="/static/logo.png" alt="medisoftware Logo" />
                    <h1>Medi-WOL</h1>
                </div>
                
                <!-- Navigation -->
                <nav class="navbar navbar-expand-lg navbar-light bg-light mb-4">
                    <div class="container-fluid">
                        <ul class="navbar-nav">
                            <li class="nav-item">
                                <a class="nav-link" href="/">
                                    <i class="fas fa-desktop"></i> PCs
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link active" href="/logs">
                                    <i class="fas fa-list-alt"></i> Logs
                                </a>
                            </li>
                        </ul>
                    </div>
                </nav>
            </div>
        </div>

        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h5 class="mb-0">
                            <i class="fas fa-list-alt"></i> Wake-on-LAN Logs
                        </h5>
                    </div>
                    <div class="card-body">
                        <div class="logs-container">
                            <div class="logs-table-container">
                                <table class="logs-table">
                                    <thead>
                                        <tr>
                                            <th>Zeitstempel</th>
                                            <th>PC-Name</th>
                                            <th>MAC-Adresse</th>
                                            <th>Auslöser</th>
                                        </tr>
                                    </thead>
                                    <tbody id="logsTableBody">
                                        <!-- Log-Einträge werden hier dynamisch eingefügt -->
                                    </tbody>
                                </table>
                            </div>
                            
                            <div class="loading" id="loading">
                                <div class="spinner"></div>
                                <p>Lade Logs...</p>
                            </div>
                            
                            <div class="no-logs" id="noLogs" style="display: none;">
                                <p>Keine Log-Einträge gefunden.</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="/static/logs.js"></script>
</body>
</html>
