4 Commits
v1.0.1 ... main

Author SHA1 Message Date
4440054fce Added Screenshots 2025-07-18 09:31:26 +02:00
367b18fedc Delete main.exe 2025-07-17 09:11:56 +02:00
69c6d39a7b Update .gitea/workflows/build-and-release.yml 2025-07-17 09:10:28 +02:00
1ae9e64ea3 Unified design 2025-07-17 06:57:08 +00:00
8 changed files with 79 additions and 31 deletions

View File

@@ -40,6 +40,10 @@ jobs:
with:
path: ./dist
- name: Flatten all artifacts into ./dist
run: |
find ./dist -type f -name 'app-*' -exec mv {} ./dist/ \;
- name: Create Release & Attach Files
uses: rosven9856/gitea_creating_release_action@master
with:

View File

@@ -6,3 +6,7 @@ A self-contained Go application that:
- Tracks uploads/downloads with timestamps
- Displays an admin dashboard with a Bootstrap UI and Chart.js graphs
- Serves all frontend files locally (no CDN)
![Main Site](screenshots/go-fileserver-index.png)
![Dashboard Download](screenshots/go-fileserver-dashboard.png)
![Dashboard Upload](screenshots/go-fileserver-dashboard-upload.png)

View File

@@ -2,45 +2,85 @@
<html lang="en" data-bs-theme="dark">
<head>
<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">
</head>
<body class="bg-dark text-light">
<div class="container py-4">
<h1>🧠 Admin Dashboard</h1>
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab" href="#uploads">Uploads</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#downloads">Downloads</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab" href="#chart">Chart</a></li>
<body class="bg-dark text-light d-flex flex-column min-vh-100">
<div class="container py-5 flex-grow-1">
<h1 class="mb-4 text-center">🧠 Admin Dashboard</h1>
<ul class="nav nav-tabs mb-4" id="dashboardTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="uploads-tab" data-bs-toggle="tab" data-bs-target="#uploads" type="button" role="tab">Uploads</button>
</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>
<div class="tab-content mt-3">
<div class="tab-pane fade show active" id="uploads">
<table class="table table-dark table-bordered">
<thead><tr><th>IP</th><th>File</th><th>Time</th></tr></thead>
<tbody>
{{range .Events}} {{if eq .Action "upload"}}
<tr><td>{{.IP}}</td><td>{{.File}}</td><td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td></tr>
{{end}} {{end}}
</tbody>
</table>
<div class="tab-content bg-dark p-3 rounded shadow">
<div class="tab-pane fade show active" id="uploads" role="tabpanel">
<h4 class="mb-3">Uploads</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>
{{range .Events}} {{if eq .Action "upload"}}
<tr>
<td>{{.IP}}</td>
<td>{{.File}}</td>
<td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td>
</tr>
{{end}} {{end}}
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="downloads">
<table class="table table-dark table-bordered">
<thead><tr><th>IP</th><th>File</th><th>Time</th></tr></thead>
<tbody>
{{range .Events}} {{if eq .Action "download"}}
<tr><td>{{.IP}}</td><td>{{.File}}</td><td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td></tr>
{{end}} {{end}}
</tbody>
</table>
<div class="tab-pane fade" id="downloads" role="tabpanel">
<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>
{{range .Events}} {{if eq .Action "download"}}
<tr>
<td>{{.IP}}</td>
<td>{{.File}}</td>
<td>{{.Timestamp.Format "2006-01-02 15:04:05"}}</td>
</tr>
{{end}} {{end}}
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="chart">
<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">
<canvas id="downloadChart" height="120"></canvas>
</div>
</div>
</div>
<div class="text-center mt-5">
<a href="/" class="btn btn-outline-info">Go Back</a>
</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/chart.min.js"></script>
<script>
@@ -56,8 +96,8 @@
},
options: {
scales: {
x: { ticks: { color: "white" } },
y: { ticks: { color: "white" }, beginAtZero: true }
x: { ticks: { color: "#000" } },
y: { ticks: { color: "#000" }, beginAtZero: true }
}
}
})

BIN
main.exe

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB