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.
* 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
This adds the silenced query parameter to the /alerts API endpoint. In
addition it changes the default in the UI. Previously silenced alerts
were displayed by default. This PR hides silenced alerts by default.
* Create set of labelKeys
* Wip (compiling)
* Add naive levenshtein distance
Need to check out the fzf fuzzy algo, this is just
a place holder for now.
https://github.com/junegunn/fzf/blob/master/src/algo/algo.go
* Hack a groupBy into the code
This needs massive cleanup and is just a
late-night spike. Everything in this commit needs
to be re-organized, most likely.
* Update some html/css
* Set input validation for label filtering
* Add Jaro-Winkler string comparison
* remove levenshtein stuff
* Fix match tests
* Read actual Jaro definition
if ml == 0, then the distance == 0
* Use correct searchLength implementation
* Limit searching string to matchRange
Only search matchRange when looking for matches,
instead of going through every value and then
deciding if it should be checked based on its
position.
Data generated from
https://ellie-app.com/38cXFnRLjcga1/1
matchCharmatchChar2delta
mean ops/sec
346,928.55 (stddev: 12,306.94, 3.55%)
364,551.61 (stddev: 10,561.94, 2.9%) +5.08%
mean runtime
2.886ns (stddev: 103.748µs, 3.59%)
2.745ns (stddev: 80.856µs, 2.95%) -4.87%
total runtime
5.022s
5.052s
sampling
48 runs of 30,000 calls
46 runs of 40,000 calls
* Fix off-by-one error in List slicing
* Simplify transition calculation
* Keyboard controls for the autocomplete
* Fix clicking on the results
* Rename AutoComplete to GroupBar
* Broke apart the view function
* Fix the layout
* Change button style
* Synchronize grouping with URL
* Fix tests
* Added toggle silenced alerts
* Remove comment
* Roll back the labelButton
* Always fetch the alerts
* Disable show silenced
* Extract alert groups
* Rename tests
* Use more generic number instead of int
* Restore showSilenced
* Update ui/bindata.go
* Update template/internal/deftmpl/bindata.go
* Update bindata.go
* Reformat with updated elm-format
* Anchor silence regex rules
When user creates a new silence with regex match it's left to the user to anchor it, which is not consistent with Prometheus regex handling (promql/functions.go#L818).
* Serialize AlertStatus as 'status'
AlertStatus doesn't have json tag with the field name, so it's serialized into 'Status', and it's the only uppercase field in the alert object. Tag it with 'status' name for consistency
* Fix lock usage in the types package
Locking is a bit tricky there since some state-modifying methods will call to other methods that also modify marker state, simple defer won't work.
* Throw error when continue in route root of Alertmanager config
* Fix alert status handling in UI
* Fixes#746
Found that we are only defining MarshalJSON for the Regexp type for
references not for the direct object
Also took the time to simplify the json.Unmarshal usage in cli/config.go
* Added unit test for continue in root route error (#768)
* Added unit test for continue in root route error
* replaced %v with %q
* Fix broken link to silence from alert
* Fix broken link to silence from alert
* *: cut v0.6.2 (#777)
* Show startsAt time for pending silences (#778)
* docs: Add note to not load balance Alert trafic
* Anchor silence regex rules
When user creates a new silence with regex match it's left to the user to anchor it, which is not consistent with Prometheus regex handling (promql/functions.go#L818).
* Serialize AlertStatus as 'status'
AlertStatus doesn't have json tag with the field name, so it's serialized into 'Status', and it's the only uppercase field in the alert object. Tag it with 'status' name for consistency
* Fix lock usage in the types package
Locking is a bit tricky there since some state-modifying methods will call to other methods that also modify marker state, simple defer won't work.
* Throw error when continue in route root of Alertmanager config
* Fix alert status handling in UI
* Fixes#746
Found that we are only defining MarshalJSON for the Regexp type for
references not for the direct object
Also took the time to simplify the json.Unmarshal usage in cli/config.go
* Added unit test for continue in root route error (#768)
* Added unit test for continue in root route error
* replaced %v with %q
* Fix broken link to silence from alert
* Fix broken link to silence from alert
* *: cut v0.6.2 (#777)
* Show startsAt time for pending silences (#778)