mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 04:51:39 +02:00
Merge branch 'hotfix' of https://github.com/ClusterCockpit/cc-backend into hotfix
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
<th>Running Jobs</th>
|
||||
<th>Total Jobs</th>
|
||||
{{if .User.HasRole .Roles.admin}}
|
||||
<th>Status View</th>
|
||||
<th>System View</th>
|
||||
<th>Analysis View</th>
|
||||
{{end}}
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -21,8 +21,8 @@
|
||||
<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>
|
||||
<td><a href="/monitoring/analysis/{{.ID}}">Analysis View</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
|
18
web/web.go
18
web/web.go
@@ -9,6 +9,7 @@ import (
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/ClusterCockpit/cc-backend/internal/auth"
|
||||
@@ -46,6 +47,23 @@ func init() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if path == "templates/imprint.tmpl" {
|
||||
if _, err := os.Stat("./var/imprint.tmpl"); err == nil {
|
||||
log.Info("overwrite imprint.tmpl with local file")
|
||||
templates[strings.TrimPrefix(path, "templates/")] =
|
||||
template.Must(template.Must(base.Clone()).ParseFiles("./var/imprint.tmpl"))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if path == "templates/privacy.tmpl" {
|
||||
if _, err := os.Stat("./var/privacy.tmpl"); err == nil {
|
||||
log.Info("overwrite privacy.tmpl with local file")
|
||||
templates[strings.TrimPrefix(path, "templates/")] =
|
||||
template.Must(template.Must(base.Clone()).ParseFiles("./var/privacy.tmpl"))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
templates[strings.TrimPrefix(path, "templates/")] = template.Must(template.Must(base.Clone()).ParseFS(templateFiles, path))
|
||||
return nil
|
||||
}); err != nil {
|
||||
|
Reference in New Issue
Block a user