0
0
mirror of https://github.com/rls-moe/nyx synced 2025-08-20 12:04:16 +00:00

Resource Fixes

This commit is contained in:
Tim Schuster
2017-03-15 14:39:57 +01:00
parent bc23a66bb0
commit e5cdbe7211
14 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Config.Site.Title}} Admin Login</title>
<link rel="stylesheet" href="/@/style.css">
<link rel="stylesheet" href="/@/custom.css">
<link rel="stylesheet" href="/@/admin.css">
</head>
<body>
<div class="admin login">
<form action="/admin/login.sh" method="POST">
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
<div class="admin form row">
<input
class="admin form input"
type="text"
name="id"
placeholder="admin id"
minlength="3"/>
</div>
<div class="admin form row">
<input
class="admin form input"
type="password"
name="pass"
placeholder="password"
minlength="3"/>
</div>
<div class="admin form row">
<input class="admin form input halfsize" type="submit" value="Login"/>
<input class="admin form input halfsize" type="reset" value="Reset"/>
</div>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,240 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Config.Site.Title}} Admin Panel</title>
<link rel="stylesheet" href="/@/style.css">
<link rel="stylesheet" href="/@/custom.css">
<link rel="stylesheet" href="/@/admin.css">
</head>
<body>
<div class="welcome">
Welcome {{.Admin.Id}}<br>
<form class="form logout" method="POST" action="/admin/logout.sh">
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
<input type="submit" value="Logout" />
</form>
</div>
<br clear="left" /><hr />
<div class="postarea">
<form action="/admin/new_board.sh" method="POST">
<table>
<tbody>
<tr>
<td class="postblock">
Action
</td>
<td>
New Board
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
</td>
</tr>
<tr>
<td class="postblock">
Short Name
</td>
<td>
<input type="text" placeholder="shortname" name="shortname"/>
</td>
</tr>
<tr>
<td class="postblock">
Long Name
</td>
<td>
<input type="text" placeholder="longname" name="longname"/>
</td>
</tr>
<tr>
<td class="postblock"></td>
<td>
<input type="submit" value="Create Board" />
<input type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
<div class="postarea">
<form action="/admin/new_admin.sh" method="POST">
<table>
<tbody>
<tr>
<td class="postblock">
Action
</td>
<td>
New Administrator
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
</td>
</tr>
<tr>
<td class="postblock">
ID
</td>
<td>
<input type="text"
minlength="4"
maxlength="255"
name="adminid"
required />
</td>
</tr>
<tr>
<td class="postblock">
Password
</td>
<td>
<input type="password"
minlength="12"
maxlength="255"
name="adminpass"
required />
</td>
</tr>
<tr>
<td class="postblock"></td>
<td>
<input type="submit" value="Create Admin ID" />
<input type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
<div class="postarea">
<form action="/admin/del_admin.sh" method="POST">
<table>
<tbody>
<tr>
<td class="postblock">
Action
</td>
<td>
Delete Administrator
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
</td>
</tr>
<tr>
<td class="postblock">
ID
</td>
<td>
<input type="text"
minlength="4"
maxlength="255"
name="adminid"
required />
</td>
</tr>
<tr>
<td class="postblock"></td>
<td>
<input type="submit" value="Delete Admin ID" />
<input type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
<div class="postarea">
<form action="/admin/cleanup.sh" method="POST">
<table>
<tbody>
<tr>
<td class="postblock">
Action
</td>
<td>
Cleanup Database
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
</td>
</tr>
<tr>
<td class="postblock"></td>
<td>
<input type="submit" value="Start Cleanup" />
<input type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
<div class="postarea">
<form action="/admin/set_rules.sh" method="POST">
<table>
<tbody>
<tr>
<td class="postblock">
Action
</td>
<td>
Set Board Rules
<input
type="hidden"
name="csrf_token"
value="{{ .CSRFToken }}" />
</td>
</tr>
<tr>
<td class="postblock">
Board Name (Short)
</td>
<td>
<input type="text"
name="shortname"
required />
</td>
</tr>
<tr>
<td class="postblock">
Rules
</td>
<td>
<textarea
rows="4"
cols="48"
minlength="5"
name="rules"
required>
</textarea>
</td>
</tr>
<tr>
<td class="postblock"></td>
<td>
<input type="submit" value="Set Rules" />
<input type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
</body>
</html>

View File

@@ -0,0 +1,125 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Config.Site.Title}} Status</title>
<link rel="stylesheet" href="/@/style.css">
<link rel="stylesheet" href="/@/custom.css">
<link rel="stylesheet" href="/@/admin.css">
</head>
<body>
<div class="banner logo">
<h2>Runtime Statistics</h2>
</div>
<br/>
<br/>
<div class="postarea">
<form id="postform1" action="/admin/new_board.sh" method="POST">
<table>
<tbody>
<tr><td class="postblock">
Start Time
</td><td>
{{.Uptime.human}}
</td></tr>
<tr><td class="postblock">
Uptime (Precise)
</td><td>
{{ .Uptime.hours | printf "%.4f"}} hours<br/>
{{ .Uptime.seconds | printf "%.4f"}} seconds
</td></tr>
<tr><td class="postblock">
Num. CPU
</td><td>
{{.GC.numcpu}}
</td></tr>
<tr><td class="postblock">
Num. GoRoutines
</td><td>
{{.GC.numgor}}
</td></tr>
<tr><td class="postblock">
Go Version<br/>
Arch/OS/Compiler
</td><td>
{{.GC.version}}<br/>
{{.GC.arch}} / {{.GC.os}} / {{.GC.compiler}}
</td></tr>
<tr><td class="postblock">
Current Allocs
</td><td>
{{.GC.memory.alloc}}
</td></tr>
<tr><td class="postblock">
Cumulative Allocs
</td><td>
{{.GC.memory.calloc}}
</td></tr>
<tr><td class="postblock">
Used Sys Memory
</td><td>
{{.GC.memory.sysmem}}
</td></tr>
<tr><td class="postblock">
Pointer Lookups
</td><td>
{{.GC.memory.lookups}}
</td></tr>
<tr><td class="postblock">
MAllocs
</td><td>
{{.GC.memory.mallocs}}
</td></tr>
<tr><td class="postblock">
MFrees
</td><td>
{{.GC.memory.frees}}
</td></tr>
<tr><td class="postblock">
Live Objects
</td><td>
{{.GC.memory.liveobj}}
</td></tr>
<tr><td class="postblock">
Heap Allocated
</td><td>
{{.GC.memory.heapalloc}}
</td></tr>
<tr><td class="postblock">
Heap Released
</td><td>
{{.GC.memory.heaprelease}}
</td></tr>
<tr><td class="postblock">
GC Metadata
</td><td>
{{.GC.memory.gcmeta}}
</td></tr>
<tr><td class="postblock">
GC Pause
</td><td>
{{.GC.memory.pause}}
</td></tr>
<tr><td class="postblock">
GC Invokations
</td><td>
{{.GC.memory.gctimes}}
</td></tr>
<tr><td class="postblock">
GC Forced
</td><td>
{{.GC.memory.fgctimes}}
</td></tr>
<tr><td class="postblock">
GC CPU Usage
</td><td>
{{.GC.memory.cpufrac}}
</td></tr>
</tbody>
</table>
</form>
</div>
<br clear="left" /><hr />
</body>
</html>