diff --git a/utility/embed-static.sh b/utility/embed-static.sh index 31a852d8d..86ddd208d 100755 --- a/utility/embed-static.sh +++ b/utility/embed-static.sh @@ -14,7 +14,8 @@ do cd "${dir}" echo "\"$(basename ${dir})\": {" - find . -type f | while read file + # Do not embed map files and the non-minified bootstrap files. + find . -type f \! -name \*.map \! -name bootstrap.js \! -name bootstrap-theme.css \! -name bootstrap.css | while read file do name=$(echo "${file}"|sed 's|\.\/||') echo "\"$name\": {" diff --git a/web/Makefile b/web/Makefile index 8b73782c8..275498c89 100644 --- a/web/Makefile +++ b/web/Makefile @@ -11,14 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -all: blob-stamp +all: blob -blob-stamp: templates/* +blob: $(MAKE) -C blob - touch $@ clean: $(MAKE) -C blob clean - -rm -f *-stamp -.PHONY: clean +.PHONY: clean blob diff --git a/web/blob/Makefile b/web/blob/Makefile index 41e3159d9..fa532c8f4 100644 --- a/web/blob/Makefile +++ b/web/blob/Makefile @@ -17,6 +17,7 @@ all: files.go SUFFIXES: +# Do not embed map files and the non-minified bootstrap files. files.go: $(shell find ../templates/ ../static/ -type f) ../../utility/embed-static.sh ../static ../templates | $(GOFMT) > $@ diff --git a/web/templates/_base.html b/web/templates/_base.html index 4d494f4e0..da26e8082 100644 --- a/web/templates/_base.html +++ b/web/templates/_base.html @@ -5,7 +5,7 @@ Prometheus Time Series Collection and Processing Server - + {{template "head" .}}