Commit Graph
167 Commits
Author SHA1 Message Date
Łukasz Mierzwa 44deae4f11 More strict filter syntax checking
Current filter factory rules are very relaxed, anything that doesn't match filter syntax perfectly is passed down to the fuzzy filter, that happily accepts every input and doesn't complain. This change makes syntax checks more strict, we explicitly look for roughly <anything><any of the chars used as operators><anything> (in reality we match the first <anything> used filter specific regex, but that can still be any regex) and only if evaluated filter expression doesn't match this regex we pass it to the fuzzy filter. Once we have a match we check if operator is supported by the filter and we're more strict there, in case of a===b we currently accept = as the operator and ==b as the value, now operator will be === (as we match for any of the operator chars in use) and fail once that doesn't match.
2017-04-20 13:36:18 -07:00
Łukasz Mierzwa d06fff2890 Merge pull request #64 from cloudflare/reorder-version
Put the branch name first on the version string for docker master builds
2017-04-20 09:44:32 -07:00
Łukasz Mierzwa 8d9371e023 Put the branch name first on the version string for docker master builds
Docker Hub makes a shallow clone of the git repo, so we don't have tags anyway, we end up with commit-master (e.g. 289f849-master), put the branch first so it's more human readable (master-289f849)
2017-04-20 09:40:10 -07:00
Łukasz Mierzwa 81666a16b1 Merge pull request #63 from cloudflare/inhibited-green
If we only have silenced or inhibited alerts make the whole alert gro…
2017-04-20 08:03:32 -07:00
Łukasz Mierzwa 5fe3f706af If we only have silenced or inhibited alerts make the whole alert group green
This will make the UI present inhibited alerts same way as silenced. It also drops unused fields in the model, replacing SilencedCount & UnsilencedCount with only ActiveCount
2017-04-19 15:43:13 -07:00
Łukasz Mierzwa d91bf5e272 Merge pull request #62 from cloudflare/document-docker
Add a note about official docker images
2017-04-19 12:47:16 -07:00
Łukasz Mierzwa 50a5bb60af Add a note about official docker images 2017-04-19 12:45:12 -07:00
Łukasz Mierzwa 289f84937b Merge pull request #61 from cloudflare/docker-fix
SOURCE_COMMIT doesn't work, generate version from git
2017-04-18 16:39:03 -07:00
Łukasz Mierzwa 0a39b49df0 SOURCE_COMMIT doesn't work, generate version from git
SOURCE_COMMIT is always empty, for both manual and automated builds, work around it by running git
2017-04-18 16:18:04 -07:00
Łukasz Mierzwa 2cbcd5cbf5 Merge pull request #60 from cloudflare/docker
Set custom docker hub build hook to pass version variable to docker
2017-04-18 16:04:14 -07:00
Łukasz Mierzwa b98f53f310 Set custom docker hub build hook to pass version variable to docker
unsee version string is passed as a build arg for the docker build command, add a hook that will set it on hub.
2017-04-18 15:52:43 -07:00
Łukasz Mierzwa 3475381c3f Merge pull request #59 from cloudflare/reverse-ac
Use forked typeahead.js
2017-04-18 13:31:34 -07:00
Łukasz Mierzwa a95d9a9f43 Switch typeahead.js to a maintained fork
Module was abandoned by Twitter and have some bugs that are fixed in the fork, switch over as it's a drop in replacement
2017-04-18 13:25:37 -07:00
Łukasz Mierzwa e64010cbd1 Bloodhound will run init unless asked not to, remove explicit call 2017-04-18 13:25:37 -07:00
Łukasz Mierzwa e30d8b79e9 If internal autocomplete index doesn't have 12 elemts (UI limit) query remote 2017-04-18 13:25:36 -07:00
Łukasz Mierzwa ad3ed87aed Add a comment describing generateHints() use 2017-04-18 13:25:36 -07:00
Łukasz Mierzwa 9dc07d6cb9 Use relative path for autocomplete so it works with -web.prefix 2017-04-18 13:25:36 -07:00
Łukasz Mierzwa 2cc80f2dc1 Merge pull request #58 from cloudflare/travis-no-master
Drop Go master tests
2017-04-18 13:25:01 -07:00
Łukasz Mierzwa 966322cf8e Drop Go master tests
Master takes 2-3x longer than usual builds, slowing down CI checks, release builds take <1m while master can take >3m (https://travis-ci.org/cloudflare/unsee/builds/222971729)
2017-04-18 09:37:20 -07:00
Łukasz Mierzwa 54c2255dbc Merge pull request #57 from cloudflare/reset-fix
Fix settings reset button
2017-04-18 09:36:49 -07:00
Łukasz Mierzwa 79516e59c9 Fix settings reset button
Correctly remove save filter and reload the filter to the defaults by removing ?q= query arg
2017-04-18 09:31:29 -07:00
Łukasz Mierzwa 95a7d46c70 Merge pull request #56 from cloudflare/inhibited
Allow filtering inhibited alerts
2017-04-18 09:29:58 -07:00
Łukasz Mierzwa 03523641ed Set default filter for 'make run'
Use @inhibited=false as the default filter
2017-04-17 16:52:54 -07:00
Łukasz Mierzwa 188d7e41d8 Mark one of the mock alerts as inhibited 2017-04-17 16:16:34 -07:00
Łukasz Mierzwa 0a16da7604 Show inhibition status in the UI
Show it the same way as @silenced is being presented
2017-04-17 16:14:26 -07:00
Łukasz Mierzwa 24ac803ee4 Document @inhibited filter 2017-04-17 16:05:24 -07:00
Łukasz Mierzwa 0af0401c6d Add @inhibited filter 2017-04-17 16:01:52 -07:00
Łukasz Mierzwa 8f3fd319f4 Add inbibited label to exposed metrics 2017-04-17 14:06:30 -07:00
Łukasz Mierzwa 10ef33afdf Expose number of inhibited alerts in the /alerts.json response
This is so that the UI can take use of it
2017-04-17 14:06:30 -07:00
Łukasz Mierzwa ad8f3b7780 Merge pull request #55 from cloudflare/transport-fix
Fix transport package
2017-04-17 14:05:18 -07:00
Łukasz Mierzwa c2c5abd1de Fix transport package
Transport refactoring introduced a bug where HTTP(S) response body is closed before it's fully read (depending on whenever gzip is used or not), this change fixes it and makes the code easier to follow by removing duplicated code and enforcing all transport packages to implement ReaderCloser interface.
2017-04-17 12:52:27 -07:00
Łukasz Mierzwa 72651bb53d Add missing /
Fis issue introduced in commit 7612a8a
2017-04-16 18:11:56 +01:00
Łukasz Mierzwa 1ccb0ce417 Merge pull request #50 from cloudflare/transport
Support file:// URIs
2017-04-16 08:34:03 -07:00
Łukasz Mierzwa 438c5f9465 Document supported URI schemes 2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 7612a8a8aa Use local files for 'make run' 2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 5d9ec5da64 Use ReadJSON everywhere, remove GetJSONFromURL 2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 940eb77c69 Add ReadJSON that will replace GetJSONFromURL 2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 781d2cbd69 Add http transport reader
Copy code from GetJSONFromURL into a http reader constructor
2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 436017b032 Add file transport reader
This simply returns os.File reader
2017-04-16 08:31:07 -07:00
Łukasz Mierzwa 8d972ed431 Add a helper function GetAbsoluteMockPath
Split this code into a dedicated function, will use later
2017-04-16 08:31:06 -07:00
Łukasz Mierzwa e8bc2fe8f7 Merge pull request #51 from cloudflare/drop-govalidator
Drop govalidator
2017-04-16 08:30:39 -07:00
Łukasz Mierzwa bec682a14a Update vendor, remove govalidator
It's no longer needed, no package uses it
2017-04-16 08:27:41 -07:00
Łukasz Mierzwa ea525794f1 Use url.Parse instead of govalidator for hiding passwords 2017-04-16 08:27:41 -07:00
Łukasz Mierzwa 34ab5094f4 Use url.Parse instead of govalidator for detecting links 2017-04-16 08:27:41 -07:00
Łukasz Mierzwa b2aae22086 Merge pull request #53 from cloudflare/travis
Travis updates
2017-04-15 10:04:01 -07:00
Łukasz Mierzwa 1f1f8b2e85 Test against latest Go snapshot, but ignore failures with it 2017-04-15 08:07:07 -07:00
Łukasz Mierzwa e3937acec9 Use latest 1.7 and 1.8 Go releases on travis 2017-04-15 08:06:18 -07:00
Łukasz Mierzwa eac0520963 Merge pull request #52 from cloudflare/go1.8.1
Use Go 1.8.1 when building docker image
2017-04-15 07:58:52 -07:00
Łukasz Mierzwa 4e32acf3f6 Use Go 1.8.1 when building docker image 2017-04-15 00:01:28 -07:00
Łukasz Mierzwa 8bc141929b Merge pull request #49 from cloudflare/underscore-templates
Rewrite clientside-haml-js templates using underscore
v0.3.0
2017-04-10 14:12:19 -07:00