113 lines
5.0 KiB
HTML
113 lines
5.0 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<nav class="navbar navbar-expand-sm navbar-light bg-light">
|
|
<a class="navbar-brand" href="{{.Rel "/"}}">Nano-Run</a>
|
|
<div class="collapse navbar-collapse">
|
|
<ul class="navbar-nav mr-auto">
|
|
<li class="nav-item active">
|
|
<a class="nav-link" href="{{.Rel "/unit/"}}">All units</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{.Rel "/cron/"}}">All schedules</a>
|
|
</li>
|
|
{{if .Authorized}}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{.Rel "/auth/logout"}}">Logout</a>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
</div>
|
|
<span class="navbar-text">{{.Login}}</span>
|
|
</nav>
|
|
<br/>
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">All units</h5>
|
|
<div class="table-responsive">
|
|
<table class="table table-borderless table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Name</th>
|
|
<th>Mode</th>
|
|
<th>Concurrency</th>
|
|
<th>Attempts</th>
|
|
<th>Interval</th>
|
|
<th>Timeout</th>
|
|
<th>Max request size</th>
|
|
<th>Working directory</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Units}}
|
|
<tr>
|
|
<td>
|
|
{{with .}}
|
|
{{if .Private}}<span title="not exposed over API">🏠</span>
|
|
{{else if .Secured}}<span title="with authorization">🛡️</span>
|
|
{{end}}
|
|
{{if gt (len .Cron) 0}}
|
|
<span title="with scheduler">⏲</span>
|
|
{{end}}
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
<a href="{{.Name}}/">{{.Name}}</a>
|
|
</td>
|
|
<td>
|
|
<span class="unit-mode unit-mode-{{.Mode}}">{{.Mode}}</span>
|
|
</td>
|
|
<td>
|
|
<span class="unit-mode unit-mode-workers">{{.Workers}}</span>
|
|
</td>
|
|
<td>
|
|
{{.Attempts}}
|
|
</td>
|
|
<td>
|
|
<span class="unit-mode unit-mode-interval">{{.Interval}}</span>
|
|
</td>
|
|
<td>
|
|
{{with .Timeout}}
|
|
{{.}}
|
|
{{else}}
|
|
∞
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
{{with .MaxRequest}}
|
|
{{.}}
|
|
{{else}}
|
|
∞
|
|
{{end}}
|
|
</td>
|
|
<td>
|
|
{{with .WorkDir}}
|
|
<details>
|
|
<summary>static</summary>
|
|
<p>{{.}}</p>
|
|
</details>
|
|
{{else}}
|
|
<i>dynamic</i>
|
|
{{end}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<link rel="stylesheet" href="{{.Rel "/static" "css" "bootstrap-material-design.min.css"}}">
|
|
</body>
|
|
</html> |