mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #626 from quinox/fix-625
#625 Fix incorrect consoles URL
This commit is contained in:
commit
e1b5f18dee
|
@ -29,7 +29,7 @@
|
||||||
<ul class="nav navbar-nav navbar-left">
|
<ul class="nav navbar-nav navbar-left">
|
||||||
{{$consoles := getConsoles}}
|
{{$consoles := getConsoles}}
|
||||||
{{if $consoles}}
|
{{if $consoles}}
|
||||||
<li><a href="{{ pathPrefix }}{{$consoles}}">Consoles</a></li>
|
<li><a href="{{$consoles}}">Consoles</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<li><a href="{{ pathPrefix }}alerts">Alerts</a></li>
|
<li><a href="{{ pathPrefix }}alerts">Alerts</a></li>
|
||||||
<li><a href="{{ pathPrefix }}graph">Graph</a></li>
|
<li><a href="{{ pathPrefix }}graph">Graph</a></li>
|
||||||
|
|
|
@ -139,11 +139,11 @@ func getTemplateFile(name string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getConsoles(pathPrefix string) string {
|
func getConsoles(pathPrefix string) string {
|
||||||
if _, err := os.Stat(pathPrefix + *consoleTemplatesPath + "/index.html"); !os.IsNotExist(err) {
|
if _, err := os.Stat(*consoleTemplatesPath + "/index.html"); !os.IsNotExist(err) {
|
||||||
return pathPrefix + "consoles/index.html"
|
return pathPrefix + "consoles/index.html"
|
||||||
}
|
}
|
||||||
if *userAssetsPath != "" {
|
if *userAssetsPath != "" {
|
||||||
if _, err := os.Stat(pathPrefix + *userAssetsPath + "/index.html"); !os.IsNotExist(err) {
|
if _, err := os.Stat(*userAssetsPath + "/index.html"); !os.IsNotExist(err) {
|
||||||
return pathPrefix + "user/index.html"
|
return pathPrefix + "user/index.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue