add web gui
This commit is contained in:
9
cmd/web/server/templates/401.html
Normal file
9
cmd/web/server/templates/401.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>You are not allowed</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>401 Unauthorized</h1>
|
||||
</body>
|
||||
</html>
|
||||
9
cmd/web/server/templates/500.html
Normal file
9
cmd/web/server/templates/500.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>An error occured</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>500 Internal Server Error</h1>
|
||||
</body>
|
||||
</html>
|
||||
38
cmd/web/server/templates/dashboard.html
Normal file
38
cmd/web/server/templates/dashboard.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dashboard</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<span class="navbar-brand mb-0 h1">CloudSave</span>
|
||||
<a class="muted" href="/web/system">v{{.Version}}</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container" style="margin-top: 1rem;">
|
||||
<div class="list-group">
|
||||
{{range .Saves}}
|
||||
<a href="/web/{{.ID}}" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex w-100 justify-content-between">
|
||||
<h5 class="mb-1">{{.Name}}</h5>
|
||||
<small>{{.Date}}</small>
|
||||
</div>
|
||||
<p class="mb-1">Version: {{.Version}}</p>
|
||||
<small>{{.ID}}</small>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
</html>
|
||||
54
cmd/web/server/templates/detailled.html
Normal file
54
cmd/web/server/templates/detailled.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Save.Name}}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<span class="navbar-brand mb-0 h1">CloudSave</span>
|
||||
<a class="muted" href="/web/system">v{{.Version}}</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container" style="margin-top: 1rem;">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/web">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{.Save.ID}}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="list-group">
|
||||
<h1>{{.Save.Name}} <span class="badge text-bg-success">Version {{.Save.Version}}</span></h1>
|
||||
<hr />
|
||||
<h3>Details</h3>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">UUID: {{.Save.ID}}</li>
|
||||
<li class="list-group-item">Last Upload: {{.Save.Date}}</li>
|
||||
<li class="list-group-item">Hash (MD5): {{.Hash}}</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
<h3>Backup</h3>
|
||||
{{ range .BackupMetadata}}
|
||||
<div class="card" style="margin-top: 1rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{.CreatedAt}}</h5>
|
||||
<h6 class="card-subtitle mb-2 text-body-secondary">{{.UUID}}</h6>
|
||||
<p class="card-text">MD5: {{.MD5}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
</html>
|
||||
52
cmd/web/server/templates/information.html
Normal file
52
cmd/web/server/templates/information.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>System Information</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<span class="navbar-brand mb-0 h1">CloudSave</span>
|
||||
<span class="muted">v{{.Version}}</span>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container" style="margin-top: 1rem;">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/web">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">System</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="list-group">
|
||||
<h3>Client</h3>
|
||||
<hr />
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">Version: {{.Client.Version}}</li>
|
||||
<li class="list-group-item">API Version: {{.Client.APIVersion}}</li>
|
||||
<li class="list-group-item">Go Version: {{.Client.GoVersion}}</li>
|
||||
<li class="list-group-item">OS: {{.Client.OSName}}/{{.Client.OSArchitecture}}</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
<h3>Server</h3>
|
||||
<hr />
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">Version: {{.Server.Version}}</li>
|
||||
<li class="list-group-item">API Version: {{.Server.APIVersion}}</li>
|
||||
<li class="list-group-item">Go Version: {{.Server.GoVersion}}</li>
|
||||
<li class="list-group-item">OS: {{.Server.OSName}}/{{.Server.OSArchitecture}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user