Commit Graph

16 Commits

Author SHA1 Message Date
Andrey Kuzmin 6fa697ae17 Populate the silence form from location (#1148)
* Populate new silence form from location

* Update bindata.go
2017-12-18 10:18:12 +01:00
Christopher Taylor af63c85161 Let the browser remember the creator of a silence (#1112)
* wire default creator through Elm

* wire defaultCreator into localStorage

* add ui/bindata.go

* fix indentation

* change defaultCreator type from (Maybe String) to String

use an empty string as default value

* update ui/bindata.go
2017-12-08 12:54:44 +01:00
stuart nelson a7981e4693 Inconsistent use of baseUrl and apiUrl arguments (#1008)
* Inconsistent use of baseUrl and apiUrl arguments

Both are Strings, so flipping the order between
one invocation and another didn't raise any
argument from the compiler. The baseUrl argument
is actually unnecessary, and has been removed.

* Update bindata.go
2017-09-29 14:16:03 +02:00
conorbroderick 5597a76ad4 Added confirmation dialog when expiring silences 2017-09-14 16:41:55 +01:00
Max Leonard Inden dd7ffe0515
Serve FontAwesome & Bootstrap ourself
Instead of using external CDNs for Bootstrap and FontAwesome, this patch
makes Alertmanager serve these libraries itself.
2017-06-07 22:40:18 +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 562f99566e Improved Validation (#827)
* Restructure the validation

* Validate on blur

* Extract alerts from the silence

* Use string for the error type

* Use ApiData everywhere

* Validate the form

* Remove redirect on failure

* Code review fixes

* Hide the delete button if there is one matcher

* Rename silence2

* Update bindata.go

* Fix the tests

* Actually hide the delete button

* Update bindata.go
2017-05-28 12:53:25 +02:00
Andrey Kuzmin 30749037a9 Style the silences list (#809)
* Get rid of old css lib

* Cleanup the models and updates

* Styled the silences view

* Update that bindata stuff
2017-05-22 13:36:31 +02:00
stuart nelson 91e802c4f3 Extract Alert Filter Bar (#755)
* Extract Alert Filter Bar

* Add FilterBar to silenceList page

* Prevent empty key= in query string
2017-05-08 10:42:42 +02:00
Max Leonard Inden 30c62c2f9f
Switch to /alerts endpoint and restlye alerts list page
Instead of using the /alerts/groups endpoint to retriev alerts this
commit introduces usage of the /alerts endpoint. This bypasses a lot of
complexity by ignoring alert groups and alert blocks. Groups and blocks
are left as a pure back-end detail.

Fixes #694
2017-05-02 09:46:20 +02:00
stuart nelson dc90e8dec3 Allow filtering receiver with a regex
e.g.:
http://localhost:5000/#/alerts?receiver=~(backend|ops)-warn
2017-04-23 21:04:53 +02:00
Andrey Kuzmin 88ec956973 Improve filter (#714)
* Update elm-tools/parser

* Improve filter UI

* Pressing backspace edits the last matcher

* Put escape char back into the output

* Allow editing the matcher

* Update bindata.go

* Const for key codes

* Use qualified imports

* Update bindata.go

* Commented the backspacePressed attribute
2017-04-18 20:49:52 +02:00
stuart nelson 8e4c29f5b8 Click alert matchers (#690)
* Clicks update alerts filter text

- Normal click replaces filter with selected label
- Modifier (ctrl, cmd) + click appends to filter

* Auto-filter when clicking labels

* ctrl+click removes already present matcher

* Match arbitrary whitespace before/after comma

* Run elm make with --yes

* Always add labels to the filter

* Updating filter currently sends Noop msg

For now we are still going to require the user to
explicitly click "filter" before we send an API
request to update the list.
2017-04-08 13:00:21 +02:00
Andrey Kuzmin bdd65fdfd7
Extract a model for the silence form (#22)
* Extract a model for the silence form

* Use empty in initSilenceForm

* Use plural silences in urls

* Populate matchers from alert

* Updating bindata.go file
2017-03-29 22:13:35 +02:00
Max Leonard Inden 85ee536937
Merge commit '62c9421f2438bf572663d05ec16d84fecf0d0dcd' into ui-rewrite
Subtree commit from https://github.com/stuartnelson3/am-ui/
2017-03-24 18:21:54 +01:00
Max Leonard Inden 0faf0f531f
Add Elm UI rewrite from github.com/stuartnelson3/am-ui with history
* Including glue between Alertmanager server and Elm UI.
* Rebuilding assets (ui/bindata.go).
* Exact commit: 'bd78de6b16bcefaacf4229304d439b33aa09cc72'
* Subdirectory: ui/app
2017-03-24 17:48:50 +01:00