Commit Graph

9 Commits

Author SHA1 Message Date
Andrey Kuzmin 0fa852217b Toggle silenced and inhibited alerts (#1049)
* Add inhibited checkbox

* Update ui/bindata.go
2017-10-23 11:00:17 +02:00
Andrey Kuzmin 250bd35c97 Linkify alert annotations (#946)
* Make links in annotations clickable

* Update test script and bindata.go

* Add target = _blank
2017-08-13 19:48:36 +02:00
stuart nelson 4f8ef26b28 Update matching algorithm (#910)
* Test for consecutive chars throughout string

Previously, we were only testing for consecutive
characters at the beginning of the string. Now,
the entire string being compared is searched
through for a matching character, and then the
consecutive search starts.

We were seeing weird situations where the text
entered matched the last half of certain terms,
but because it wasn't, but because we only
searched from the start, results that probably
shouldn't have been the top suggestion were being
suggested too high on the list.

* Weight consecutive matches more highly

Bit of a guess, this seemed to give better results
for my small test case.

* bindata
2017-07-19 11:50:33 +02:00
Andrey Kuzmin f4c11751a9 Receiver autocomplete (#900)
* Extract receivers

* Moved Match into Utils

* Implemented autocomplete

* Update bindata.go
2017-07-11 11:25:03 +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
Max Leonard Inden b9acb7a63f
Add 'silenced' query param to /alerts endpoint
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.
2017-05-17 18:59:20 +02:00
stuart nelson a0e6aceadb Merge GroupBy alerts (#775)
* 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
2017-05-16 00:10:30 +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 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