158 lines
5.3 KiB
HTML
158 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>HTTPS Proxy - Logs</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #1a1a2e;
|
|
color: #e0e0e0;
|
|
min-height: 100vh;
|
|
}
|
|
.header {
|
|
background: #16213e;
|
|
padding: 20px 30px;
|
|
border-bottom: 2px solid #0f3460;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
.header h1 { color: #00d4ff; font-size: 1.5em; }
|
|
.header-right { display: flex; align-items: center; gap: 15px; }
|
|
.badge {
|
|
background: #0f3460;
|
|
color: #00d4ff;
|
|
padding: 5px 15px;
|
|
border-radius: 20px;
|
|
font-size: 0.85em;
|
|
}
|
|
.nav-link {
|
|
color: #00d4ff;
|
|
text-decoration: none;
|
|
font-size: 0.9em;
|
|
}
|
|
.nav-link:hover { text-decoration: underline; }
|
|
.container { max-width: 1400px; margin: 30px auto; padding: 0 20px; }
|
|
.card {
|
|
background: #16213e;
|
|
border-radius: 10px;
|
|
padding: 25px;
|
|
margin-bottom: 25px;
|
|
border: 1px solid #0f3460;
|
|
}
|
|
.card h2 {
|
|
color: #00d4ff;
|
|
margin-bottom: 20px;
|
|
font-size: 1.2em;
|
|
border-bottom: 1px solid #0f3460;
|
|
padding-bottom: 10px;
|
|
}
|
|
.controls {
|
|
display: flex;
|
|
gap: 15px;
|
|
margin-bottom: 20px;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.85em;
|
|
font-weight: 600;
|
|
transition: all 0.2s;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
}
|
|
.btn-primary { background: #00d4ff; color: #1a1a2e; }
|
|
.btn-primary:hover { background: #00b8d4; }
|
|
.btn-active { background: #00d4ff; color: #1a1a2e; }
|
|
.btn-inactive { background: #0f3460; color: #8899aa; }
|
|
.btn-inactive:hover { background: #1a3a6e; color: #e0e0e0; }
|
|
select {
|
|
background: #1a1a2e;
|
|
border: 1px solid #0f3460;
|
|
color: #e0e0e0;
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
font-size: 0.85em;
|
|
}
|
|
.log-output {
|
|
background: #0d0d1a;
|
|
border: 1px solid #0f3460;
|
|
border-radius: 6px;
|
|
padding: 15px;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 0.8em;
|
|
line-height: 1.6;
|
|
overflow-x: auto;
|
|
max-height: 70vh;
|
|
overflow-y: auto;
|
|
white-space: pre;
|
|
color: #b0b0b0;
|
|
}
|
|
.empty-log {
|
|
color: #8899aa;
|
|
text-align: center;
|
|
padding: 40px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>HTTPS Reverse Proxy - Logs</h1>
|
|
<div class="header-right">
|
|
<a href="/" class="nav-link">Proxy-Ziele</a>
|
|
<a href="/logout" class="nav-link">Abmelden</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="card">
|
|
<h2>Nginx Logs</h2>
|
|
|
|
<div class="controls">
|
|
<a href="/logs?type=access&lines={{ lines }}"
|
|
class="btn {{ 'btn-active' if log_type == 'access' else 'btn-inactive' }}">Access Log</a>
|
|
<a href="/logs?type=error&lines={{ lines }}"
|
|
class="btn {{ 'btn-active' if log_type == 'error' else 'btn-inactive' }}">Error Log</a>
|
|
|
|
<form method="GET" action="/logs" style="display:flex;gap:10px;align-items:center;">
|
|
<input type="hidden" name="type" value="{{ log_type }}">
|
|
<label style="color:#8899aa;font-size:0.85em;">Zeilen:</label>
|
|
<select name="lines" onchange="this.form.submit()">
|
|
<option value="50" {{ "selected" if lines == 50 }}>50</option>
|
|
<option value="100" {{ "selected" if lines == 100 }}>100</option>
|
|
<option value="250" {{ "selected" if lines == 250 }}>250</option>
|
|
<option value="500" {{ "selected" if lines == 500 }}>500</option>
|
|
<option value="1000" {{ "selected" if lines == 1000 }}>1000</option>
|
|
</select>
|
|
</form>
|
|
|
|
<a href="/logs?type={{ log_type }}&lines={{ lines }}" class="btn btn-primary">Aktualisieren</a>
|
|
</div>
|
|
|
|
{% if log_content %}
|
|
<div class="log-output">{{ log_content }}</div>
|
|
{% else %}
|
|
<div class="empty-log">
|
|
<p>Keine Log-Eintraege vorhanden.</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Auto-scroll to bottom
|
|
const logOutput = document.querySelector('.log-output');
|
|
if (logOutput) {
|
|
logOutput.scrollTop = logOutput.scrollHeight;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|