Commit Graph
178 Commits
Author SHA1 Message Date
Łukasz Mierzwa 0ca17211af Escape silenceID output just in case 2017-04-20 21:32:10 -07:00
Łukasz Mierzwa b407204aff Add an icon to error messages 2017-04-20 21:30:52 -07:00
Łukasz Mierzwa 6558735751 Drop bogus checkbox classes from outer div
This is breaking checkbox and label alignment.
2017-04-20 21:24:16 -07:00
Łukasz Mierzwa 0417be1cca Drop duplicated classes
Both are already provided by attrs.class
2017-04-20 21:17:57 -07:00
Łukasz Mierzwa 952eb3467c Drop labels above comment and email inputs
They both have placeholder text, so label is redundant
2017-04-20 21:15:05 -07:00
Łukasz Mierzwa 42f2f33084 Add labels above duration datetime picker fileds
Make it more obvious which fields is used for what
2017-04-20 21:14:22 -07:00
Łukasz Mierzwa 385efc5173 Merge pull request #66 from cloudflare/silence-form
Add support for creating silences directly from unsee UI
2017-04-20 17:12:58 -07:00
Łukasz Mierzwa d5916c81cf Add support for creating silences directly from unsee UI
It adds a button next to the @silenced filter that shows a modal window with a silence form. API request is send via AJAX call from user browser.
2017-04-20 17:01:52 -07:00
Łukasz Mierzwa ed03c0f234 Merge pull request #65 from cloudflare/strict-filters
Strict filters
2017-04-20 17:01:17 -07:00
Łukasz Mierzwa 61aba84eba Fix marking invalid filters in the UI
Label classes are incorrectly set on the filter text span, rather than the label under which that span is placed.
2017-04-20 13:37:47 -07:00
Łukasz Mierzwa 82fb5ce0d6 Add more test to cover more filter expressions 2017-04-20 13:36:37 -07:00
Ł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