* 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
* 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