|
|
@ -19,6 +19,7 @@ import ( |
|
|
|
"net/http" |
|
|
|
"net/http" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"path" |
|
|
|
"path" |
|
|
|
|
|
|
|
"path/filepath" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/shurcooL/httpfs/filter" |
|
|
|
"github.com/shurcooL/httpfs/filter" |
|
|
@ -32,7 +33,7 @@ var Assets = func() http.FileSystem { |
|
|
|
panic(err) |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
} |
|
|
|
var assetsPrefix string |
|
|
|
var assetsPrefix string |
|
|
|
switch path.Base(wd) { |
|
|
|
switch filepath.Base(wd) { |
|
|
|
case "prometheus": |
|
|
|
case "prometheus": |
|
|
|
// When running Prometheus (without built-in assets) from the repo root.
|
|
|
|
// When running Prometheus (without built-in assets) from the repo root.
|
|
|
|
assetsPrefix = "./web/ui" |
|
|
|
assetsPrefix = "./web/ui" |
|
|
|