update
This commit is contained in:
233
frontend/public/admin.html
Normal file
233
frontend/public/admin.html
Normal file
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Dashboard - Munich News Daily</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<style>
|
||||
.admin-container {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.admin-header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 30px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
margin-top: 0;
|
||||
color: #333;
|
||||
border-bottom: 2px solid #667eea;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.stat-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.stat-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.status-active {
|
||||
background: #10b981;
|
||||
}
|
||||
|
||||
.status-inactive {
|
||||
background: #ef4444;
|
||||
}
|
||||
|
||||
.status-warning {
|
||||
background: #f59e0b;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: #667eea;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: #5568d3;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: #6b7280;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: #4b5563;
|
||||
}
|
||||
|
||||
.performance-badge {
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.badge-excellent {
|
||||
background: #d1fae5;
|
||||
color: #065f46;
|
||||
}
|
||||
|
||||
.badge-good {
|
||||
background: #dbeafe;
|
||||
color: #1e40af;
|
||||
}
|
||||
|
||||
.badge-fair {
|
||||
background: #fef3c7;
|
||||
color: #92400e;
|
||||
}
|
||||
|
||||
.badge-slow {
|
||||
background: #fee2e2;
|
||||
color: #991b1b;
|
||||
}
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.error {
|
||||
background: #fee2e2;
|
||||
color: #991b1b;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.success {
|
||||
background: #d1fae5;
|
||||
color: #065f46;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.model-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.model-list li {
|
||||
padding: 8px;
|
||||
background: #f3f4f6;
|
||||
margin: 5px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.current-model {
|
||||
background: #dbeafe;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="admin-container">
|
||||
<div class="admin-header">
|
||||
<h1>🛠️ Admin Dashboard</h1>
|
||||
<p>Munich News Daily - System Status & Configuration</p>
|
||||
<button class="btn btn-secondary" onclick="window.location.href='/'">← Back to Home</button>
|
||||
<button class="btn" onclick="refreshAll()">🔄 Refresh All</button>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-grid">
|
||||
<!-- System Stats -->
|
||||
<div class="card">
|
||||
<h3>📊 System Statistics</h3>
|
||||
<div id="systemStats" class="loading">Loading...</div>
|
||||
</div>
|
||||
|
||||
<!-- Ollama Status -->
|
||||
<div class="card">
|
||||
<h3>🤖 AI Status (Ollama)</h3>
|
||||
<div id="ollamaStatus" class="loading">Loading...</div>
|
||||
</div>
|
||||
|
||||
<!-- GPU Status -->
|
||||
<div class="card">
|
||||
<h3>⚡ GPU Status</h3>
|
||||
<div id="gpuStatus" class="loading">Loading...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-grid">
|
||||
<!-- Performance Test -->
|
||||
<div class="card">
|
||||
<h3>🚀 Performance Test</h3>
|
||||
<div id="performanceTest" class="loading">Loading...</div>
|
||||
<button class="btn" onclick="runPerformanceTest()">Run Test</button>
|
||||
</div>
|
||||
|
||||
<!-- Available Models -->
|
||||
<div class="card">
|
||||
<h3>📦 Available Models</h3>
|
||||
<div id="modelsList" class="loading">Loading...</div>
|
||||
</div>
|
||||
|
||||
<!-- Configuration -->
|
||||
<div class="card">
|
||||
<h3>⚙️ Configuration</h3>
|
||||
<div id="configInfo" class="loading">Loading...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Clustering Stats -->
|
||||
<div class="card">
|
||||
<h3>🔗 AI Clustering & Aggregation</h3>
|
||||
<div id="clusteringStats" class="loading">Loading...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="admin.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user