mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-22 05:46:53 +00:00
Use elm reactor for dev assets (#1133)
* Serve assets from elm reactor * Update bindata.go
This commit is contained in:
parent
7d795d8c03
commit
f9e96fce3d
4
Makefile
4
Makefile
@ -68,14 +68,14 @@ go-bindata:
|
||||
template/internal/deftmpl/bindata.go: template/default.tmpl
|
||||
@go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl
|
||||
|
||||
ui/bindata.go: ui/app/script.js ui/app/index.html ui/lib
|
||||
ui/bindata.go: ui/app/script.js ui/app/index.html ui/app/lib
|
||||
# Using "-mode 420" and "-modtime 1" to make assets make target deterministic.
|
||||
# It sets all file permissions and time stamps to 420 and 1
|
||||
@go-bindata $(bindata_flags) -mode 420 -modtime 1 -pkg ui -o \
|
||||
ui/bindata.go ui/app/script.js \
|
||||
ui/app/index.html \
|
||||
ui/app/favicon.ico \
|
||||
ui/lib/...
|
||||
ui/app/lib/...
|
||||
|
||||
ui/app/script.js: $(shell find ui/app/src -iname *.elm)
|
||||
cd $(FRONTEND_DIR) && $(MAKE) script.js
|
||||
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
@ -77,7 +77,7 @@ init flags location =
|
||||
if prod then
|
||||
location.pathname
|
||||
else
|
||||
"http://localhost:9093/"
|
||||
"/"
|
||||
in
|
||||
update (urlUpdate location)
|
||||
(Model
|
||||
|
228
ui/bindata.go
228
ui/bindata.go
File diff suppressed because one or more lines are too long
@ -67,7 +67,7 @@ func Register(r *route.Router, reloadCh chan<- struct{}, logger log.Logger) {
|
||||
r.Get("/lib/*filepath", ihf("lib_files",
|
||||
func(w http.ResponseWriter, req *http.Request) {
|
||||
fp := route.Param(req.Context(), "filepath")
|
||||
serveAsset(w, req, filepath.Join("ui/lib", fp), logger)
|
||||
serveAsset(w, req, filepath.Join("ui/app/lib", fp), logger)
|
||||
},
|
||||
))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user