Unified design
This commit is contained in:
@@ -2,45 +2,85 @@
|
|||||||
<html lang="en" data-bs-theme="dark">
|
<html lang="en" data-bs-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Dashboard</title>
|
<title>Admin Dashboard</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
<link href="/static/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-dark text-light">
|
<body class="bg-dark text-light d-flex flex-column min-vh-100">
|
||||||
<div class="container py-4">
|
<div class="container py-5 flex-grow-1">
|
||||||
<h1>🧠 Admin Dashboard</h1>
|
<h1 class="mb-4 text-center">🧠 Admin Dashboard</h1>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs mb-4" id="dashboardTabs" role="tablist">
|
||||||
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab" href="#uploads">Uploads</a></li>
|
<li class="nav-item" role="presentation">
|
||||||
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#downloads">Downloads</a></li>
|
<button class="nav-link active" id="uploads-tab" data-bs-toggle="tab" data-bs-target="#uploads" type="button" role="tab">Uploads</button>
|
||||||
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#chart">Chart</a></li>
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="downloads-tab" data-bs-toggle="tab" data-bs-target="#downloads" type="button" role="tab">Downloads</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="chart-tab" data-bs-toggle="tab" data-bs-target="#chart" type="button" role="tab">Chart</button>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content mt-3">
|
<div class="tab-content bg-dark p-3 rounded shadow">
|
||||||
<div class="tab-pane fade show active" id="uploads">
|
<div class="tab-pane fade show active" id="uploads" role="tabpanel">
|
||||||
<table class="table table-dark table-bordered">
|
<h4 class="mb-3">Uploads</h4>
|
||||||
<thead><tr><th>IP</th><th>File</th><th>Time</th></tr></thead>
|
<div class="table-responsive">
|
||||||
|
<table class="table table-dark table-hover mb-0 align-middle">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>IP</th>
|
||||||
|
<th>File</th>
|
||||||
|
<th>Time</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .Events}} {{if eq .Action "upload"}}
|
{{range .Events}} {{if eq .Action "upload"}}
|
||||||
<tr><td>{{.IP}}</td><td>{{.File}}</td><td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td></tr>
|
<tr>
|
||||||
|
<td>{{.IP}}</td>
|
||||||
|
<td>{{.File}}</td>
|
||||||
|
<td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td>
|
||||||
|
</tr>
|
||||||
{{end}} {{end}}
|
{{end}} {{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="downloads">
|
</div>
|
||||||
<table class="table table-dark table-bordered">
|
<div class="tab-pane fade" id="downloads" role="tabpanel">
|
||||||
<thead><tr><th>IP</th><th>File</th><th>Time</th></tr></thead>
|
<h4 class="mb-3">Downloads</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-dark table-hover mb-0 align-middle">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>IP</th>
|
||||||
|
<th>File</th>
|
||||||
|
<th>Time</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .Events}} {{if eq .Action "download"}}
|
{{range .Events}} {{if eq .Action "download"}}
|
||||||
<tr><td>{{.IP}}</td><td>{{.File}}</td><td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td></tr>
|
<tr>
|
||||||
|
<td>{{.IP}}</td>
|
||||||
|
<td>{{.File}}</td>
|
||||||
|
<td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td>
|
||||||
|
</tr>
|
||||||
{{end}} {{end}}
|
{{end}} {{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="chart">
|
</div>
|
||||||
|
<div class="tab-pane fade" id="chart" role="tabpanel">
|
||||||
|
<h4 class="mb-3">Downloads Chart</h4>
|
||||||
<div class="bg-light p-3 rounded text-dark">
|
<div class="bg-light p-3 rounded text-dark">
|
||||||
<canvas id="downloadChart" height="120"></canvas>
|
<canvas id="downloadChart" height="120"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-center mt-5">
|
||||||
|
<a href="/" class="btn btn-outline-info">Go Back</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer class="text-center py-3 bg-black text-muted border-top border-secondary mt-auto">
|
||||||
|
Powered by <strong>Golang</strong>
|
||||||
|
</footer>
|
||||||
<script src="/static/bootstrap.bundle.min.js"></script>
|
<script src="/static/bootstrap.bundle.min.js"></script>
|
||||||
<script src="/static/chart.min.js"></script>
|
<script src="/static/chart.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
@@ -56,8 +96,8 @@
|
|||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
scales: {
|
scales: {
|
||||||
x: { ticks: { color: "white" } },
|
x: { ticks: { color: "#000" } },
|
||||||
y: { ticks: { color: "white" }, beginAtZero: true }
|
y: { ticks: { color: "#000" }, beginAtZero: true }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user