mirror of
https://github.com/nxshock/gron.git
synced 2025-07-01 00:13:36 +05:00
New updates
* Rework job status * Group WebUI files * New WebUI details page
This commit is contained in:
parent
236507c5c0
commit
1c00dfabc9
9 changed files with 391 additions and 241 deletions
57
webui/index.htm
Normal file
57
webui/index.htm
Normal file
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>gron</title>
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">☰ Menu</button>
|
||||
<div class="dropdown-content">
|
||||
<a href="/reloadJobs">⟳ Reload jobs</a>
|
||||
<a>
|
||||
<hr>
|
||||
</a>
|
||||
<a href="/shutdown">⏻ Shutdown</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Job list</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Cron</th>
|
||||
<th>Status</th>
|
||||
<th>Start time</th>
|
||||
<th>Finish time</th>
|
||||
<th>Duration</th>
|
||||
<th>Next launch</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
{{range .}}
|
||||
<tr>
|
||||
<td class="no-padding">
|
||||
<form action="/start" method="get" id="form-{{.Name}}"></form>
|
||||
<button{{if gt .CurrentRunningCount 0}} class="runningbg" {{else}}{{if .LastError}} class="errorbg" {{end}}{{end}} type="submit" form="form-{{.Name}}" name="jobName" value="{{.Name}}" {{if gt .CurrentRunningCount 0}} disabled{{end}}>{{.Name}}</button>
|
||||
</td>
|
||||
<td class="smaller">{{.JobConfig.Description}}</td>
|
||||
<td class="nowrap" align="right">
|
||||
<pre>{{.JobConfig.Cron}}</pre>
|
||||
</td>
|
||||
<td class="nowrap">{{if eq .Status 0}}⯀ inactive{{end}}{{if eq .Status 1}}<span class="green">⯈ running</span>{{end}}{{if eq .Status 2}}<span class="red">⯁ error</span>{{end}}{{if eq .Status 3}}<span class="orange">⟳ restarting</span>{{end}}</td>
|
||||
<td>{{.LastStartTime}}</td>
|
||||
<td>{{.LastEndTime}}</td>
|
||||
<td align="right">{{.LastExecutionDuration}}</td>
|
||||
<td>{{.NextLaunch}}</td>
|
||||
<td class="centered"><a href="/details?jobName={{.Name}}">open</a></td>
|
||||
</tr>{{end}}
|
||||
</table>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue