cc-backend/web/templates/home.tmpl

42 lines
1.6 KiB
Cheetah
Raw Normal View History

{{define "content"}}
<div class="row">
2022-02-15 10:03:09 +01:00
<div class="col">
2021-12-09 16:27:48 +01:00
<h2>Clusters</h2>
<table class="table">
<thead>
<tr>
2021-12-17 15:49:22 +01:00
<th>Name</th>
2023-06-09 09:09:41 +02:00
<th>Running Jobs</th>
2022-02-16 12:29:54 +01:00
<th>Total Jobs</th>
{{if .User.HasRole .Roles.admin}}
2022-02-16 12:29:54 +01:00
<th>System View</th>
<th>Analysis View</th>
{{end}}
2021-12-09 16:27:48 +01:00
</tr>
</thead>
<tbody>
{{if .User.HasRole .Roles.admin}}
2022-02-16 12:29:54 +01:00
{{range .Infos.clusters}}
<tr>
2023-06-09 09:09:41 +02:00
<td>{{.ID}}</td>
<td><a href="/monitoring/jobs/?cluster={{.ID}}&state=running">{{.RunningJobs}} jobs</a></td>
<td><a href="/monitoring/jobs/?cluster={{.ID}}">{{.TotalJobs}} jobs</a></td>
<td><a href="/monitoring/systems/{{.ID}}">System View</a></td>
<td><a href="/monitoring/analysis/{{.ID}}">Analysis View</a></td>
2022-02-16 12:29:54 +01:00
</tr>
{{end}}
{{else}}
{{range .Infos.clusters}}
<tr>
2023-06-09 09:09:41 +02:00
<td>{{.ID}}</td>
<td><a href="/monitoring/jobs/?cluster={{.ID}}&state=running">{{.RunningJobs}} jobs</a></td>
<td><a href="/monitoring/jobs/?cluster={{.ID}}">{{.TotalJobs}} jobs</a></td>
2022-02-16 12:29:54 +01:00
</tr>
{{end}}
2021-12-09 16:27:48 +01:00
{{end}}
</tbody>
</table>
</div>
</div>
{{end}}