mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
52 lines
1.9 KiB
Cheetah
52 lines
1.9 KiB
Cheetah
{{define "content"}}
|
|
{{if .Infos.message }}
|
|
<div class="row justify-content-center">
|
|
<div class="col-4">
|
|
<div class="alert alert-info p-3 text-center fs-3" role="alert">
|
|
<i class="bi-info-circle-fill me-3"></i>
|
|
{{.Infos.message}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<div class="row">
|
|
<div class="col">
|
|
<h2>Clusters</h2>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Running Jobs</th>
|
|
<th>Total Jobs</th>
|
|
{{if .User.HasRole .Roles.admin}}
|
|
<th>Status View</th>
|
|
<th>System View</th>
|
|
{{end}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{if .User.HasRole .Roles.admin}}
|
|
{{range .Infos.clusters}}
|
|
<tr>
|
|
<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/status/{{.ID}}">Status View</a></td>
|
|
<td><a href="/monitoring/systems/{{.ID}}">System View</a></td>
|
|
</tr>
|
|
{{end}}
|
|
{{else}}
|
|
{{range .Infos.clusters}}
|
|
<tr>
|
|
<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>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{end}}
|