mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-27 05:49:04 +01:00
parent
7e468a7b8d
commit
5f12b49145
@ -100,9 +100,10 @@ func setupRoutes(router *mux.Router, routes []Route) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
title := route.Title
|
||||||
infos := route.Setup(map[string]interface{}{}, r)
|
infos := route.Setup(map[string]interface{}{}, r)
|
||||||
if id, ok := infos["id"]; ok {
|
if id, ok := infos["id"]; ok {
|
||||||
route.Title = strings.Replace(route.Title, "<ID>", id.(string), 1)
|
title = strings.Replace(route.Title, "<ID>", id.(string), 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
username, isAdmin := "", true
|
username, isAdmin := "", true
|
||||||
@ -112,7 +113,7 @@ func setupRoutes(router *mux.Router, routes []Route) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
page := templates.Page{
|
page := templates.Page{
|
||||||
Title: route.Title,
|
Title: title,
|
||||||
User: templates.User{Username: username, IsAdmin: isAdmin},
|
User: templates.User{Username: username, IsAdmin: isAdmin},
|
||||||
Config: conf,
|
Config: conf,
|
||||||
Infos: infos,
|
Infos: infos,
|
||||||
|
Loading…
Reference in New Issue
Block a user