Commit Graph

7 Commits

Author SHA1 Message Date
Andrey Kuzmin e768371a39
Upgrade Alertmanager UI to Elm 0.19 (#1539)
* Run elm-upgrade
* Make compile
* Update index.html
* Upgrade tests
* Finalize the upgrade
* Optimize!
2018-09-06 18:08:51 +02:00
stuart nelson 2cf38e4c2e Fix external web url (#836)
Infer path from Navigation.Location

Build uses template, local dev uses elm-reactor

Remove unneeded local dev go server

Add script.js make target

Compiles and uglifies script.js

Before:
~570kb

After:
~170kb

Bootstrap loading state

Add trailing slash via JS & add routePrefix console param

Add Javascript script tag to `index.html` which adds a trailing slash to
the url pathname if none is present. This is done to ensure assets like
`script.js` are loaded properly.

Example without patch:
If the pathname is "mxinden.com/alertmanager" the browser will try to
download the `script.js` asset from "mxinden.com/script.js". This
request will fail.

Example with patch:
If the pathname is "mxinden.com/alertmanager", Javascript redirects the
browser to "mxinden.com/alertmanager/" and then the `script.js` asset
will be downloaded from "mxinden.com/alertmanager/script.js". This
request will succeed.

Add `-web.route-prefix` as a console parameter. This configures a
Prefix for the internal routes of web endpoints. Defaults to path of
-web.external-url like in *Prometheus*.

Trim slashes off of route prefix and add one slash at the beginning.
Make sure route prefix is not empty or just a slash before prefixing
router.
2017-06-07 22:38:39 +02:00
Andrey Kuzmin 3f60d01592 Add favicon (#839)
* Add favicon

* Fix the node version

* Update bindata.go
2017-06-01 10:13:20 +02:00
Andrey Kuzmin eff5341dec Show alert annotations (#833)
* Show annotations

* Update bindata.go

* Fix the versions of elm modules
2017-05-30 21:04:49 +02:00
Max Leonard Inden 9ec25d84c5
test: Introduce elm-test package
Adding two basic (fuzz-) tests for Utils.Filter.parseMatcher. Including
tests in Travis runs. Adding make target "test" and "dev-server".
2017-04-25 12:03:02 +02:00
Max Leonard Inden a8d7f92c66 test: Ensure bindata.go is always up to date
This adds three more steps to the Travis tests.
1. Compile Elm -> script.js
2. Bundle html.index & script.js -> bindata.go
3. Check if bindata.go hasn't changed
2017-04-25 11:33:57 +02:00
Max Leonard Inden f50a9ef9db test: Add elm-format + elm-make job to ci
This runs elm-format and elm-make inside a docker container which servs
the Elm environment.

Related to issue #671
2017-04-07 11:19:42 +02:00