Commit Graph

289 Commits

Author SHA1 Message Date
Łukasz Mierzwa
4eb615c19b Remove outdated section
Issue 609 was fixed in Alertmanager >=0.6.1
2017-05-10 23:37:49 +01:00
Łukasz Mierzwa
5f10b53007 Merge pull request #101 from cloudflare/silence-move
Split silence form code to a dedicated file
2017-05-10 23:36:12 +01:00
Łukasz Mierzwa
46880fafd9 Split silence form code to a dedicated file
It's a lot of code, split it to a dedicated file so it's all in one place
2017-05-10 22:04:37 +01:00
Łukasz Mierzwa
2c23a640cb Merge pull request #100 from cloudflare/js-updates
Web asset updates
2017-05-10 21:39:53 +01:00
Łukasz Mierzwa
fcb6c5200d Update frontend assets 2017-05-10 15:26:26 +01:00
Łukasz Mierzwa
15b5afb1a8 Update masonry 2017-05-10 15:14:04 +01:00
Łukasz Mierzwa
0497e82128 Move assets target to a dedicated Makefile 2017-05-10 15:10:29 +01:00
Łukasz Mierzwa
47116e7fa1 Merge pull request #99 from cloudflare/vendor-update
Update vendored libs
2017-05-10 12:00:28 +01:00
Łukasz Mierzwa
40c23d135e Update vendored libs
Sync up with upstream
2017-05-10 11:21:43 +01:00
Łukasz Mierzwa
38505d0c37 Merge pull request #98 from cloudflare/unprocessed-color
Use gray color for alert groups with only unprocessed alerts
2017-05-10 11:00:52 +01:00
Łukasz Mierzwa
12521e25bc Use gray color for alert groups with only unprocessed alerts
Expose counts of all alert statuses in each group (active, suppressed, unprocessed) instead of only active, and if a group contains only unprocessed alerts then color it as gray
2017-05-10 10:58:19 +01:00
Łukasz Mierzwa
49a53414fb Merge pull request #97 from cloudflare/silence-form-json
Pre-render JSON silence payload when form is ready
2017-05-10 10:57:30 +01:00
Łukasz Mierzwa
847df373bf Pre-render JSON silence payload when form is ready
When silence form is ready we should generate initial JSON preview, so when user clicks to show it there's something to show. Right now it's only generated if user changes something.
2017-05-10 10:51:11 +01:00
Łukasz Mierzwa
5a95d869fc Merge pull request #96 from cloudflare/alertmanager-0.6.2
Alertmanager 0.6.2 support
2017-05-10 10:45:21 +01:00
Łukasz Mierzwa
4eb7d2ec71 Update docs on supported AM versions 2017-05-09 21:55:33 +01:00
Łukasz Mierzwa
ee301ffae1 Default to 0.6.2 mock data in 'make run' 2017-05-09 21:53:51 +01:00
Łukasz Mierzwa
2cfe0eaa2a Add 0.6.2 mock data
Generated from live Alertmanager instance
2017-05-09 21:53:07 +01:00
Łukasz Mierzwa
b9de72fc48 Add support for Alertmanager 0.6.2
Minor changes in the API.
2017-05-09 21:52:39 +01:00
Łukasz Mierzwa
f21d8a5c15 Merge pull request #95 from cloudflare/timer-logs-2
Provide more startup logs
2017-05-09 18:05:18 +01:00
Łukasz Mierzwa
9cbf784baf Provide more startup logs
This will help with debugging issues
2017-05-09 18:02:08 +01:00
Łukasz Mierzwa
86671e4823 Merge pull request #94 from cloudflare/timer-logs
Fix race condition in the matcher code
2017-05-09 17:55:28 +01:00
Łukasz Mierzwa
37304d615a Remove unused code
setOperator is no longer used, remove it as it's dangerous and useless
2017-05-09 17:49:24 +01:00
Łukasz Mierzwa
25d457b274 Fix race condition in the matcher code
We have a static list of matchers, one for each kind, but newMatcher() was writing to those on every filter creation. Remove writes, set the attribute on matcher init instead.
2017-05-09 17:47:32 +01:00
Łukasz Mierzwa
b36aa5d35e Merge pull request #93 from cloudflare/dedup
Deduplicate alerts
2017-05-08 15:38:48 +01:00
Łukasz Mierzwa
a4337345b3 Deduplicate alerts
Alertmanager 0.6.1 can return multiple instances of the same alert either in a different block object or as a duplicated alert group, ensure that we deduplicate those
2017-05-08 15:33:17 +01:00
Łukasz Mierzwa
1a3cfc8836 Merge pull request #92 from cloudflare/filters-validation
More strict filter validation
2017-05-06 16:51:38 +01:00
Łukasz Mierzwa
003010f73b Speed up filter matches by re-using global match object
Instead of compiling filter regexp on every filter match pre-compile it and use same instance
2017-05-06 16:46:06 +01:00
Łukasz Mierzwa
7bf0b9d5d0 More strict filter validation
@silenced=true should now be marked as invalid filter, but it isn't, this commit refactors it so that instead of looping over all filters and falling back to fuzzy (which is very relaxed checking and can't find typos in filter names like @statuz=active) we tokenize the expression into '<filter name> <operator> <value>' and only fallback to fuzzy if there's only a static text (no filter name and operator). This is more manual but provides stronger checks so now @silenced=true is correctly marked as invalid
2017-05-06 16:46:06 +01:00
Łukasz Mierzwa
4ade516f57 Merge pull request #91 from cloudflare/fix-grid-clear
Remove all alert groups in Grid.Clear()
2017-05-06 08:24:50 +01:00
Łukasz Mierzwa
817731857a Remove all alert groups in Grid.Clear()
Clear was only hiding elements so div objects were still present, ensure they are removed from the DOM
2017-05-05 17:32:16 +01:00
Łukasz Mierzwa
5e1cebfdaa Merge pull request #90 from cloudflare/status-filter
Replace @silenced & @inhibited filters with @status
2017-05-05 16:53:04 +01:00
Łukasz Mierzwa
0d55311a9d Replace @silenced & @inhibited filters with @status
Now that Alertmanager provides status=(unprocessed|suppressed|active) in the API it doesn't make sense to keep having separate filters for each value, merge @silenced & @inhibited into a single filter, update docs and UI
2017-05-05 13:56:48 +01:00
Łukasz Mierzwa
b65f2a1cc3 Merge pull request #89 from cloudflare/silence-empty-labels
Notify user when there are no labels for a new silence
2017-05-05 07:24:48 +01:00
Łukasz Mierzwa
b1873963df Notify user when there are no labels for a new silence
If user clicks on a silence button we make AJAX call to the /alerts.json endpoint to get all instances of given alert so we can allow user to select from all labels used. But it's possible that this alert will be resolved by the time user clicks on it, when this happens we simply list no labels, which might be confusing, show a message so user knows what happened.
2017-05-04 14:39:06 +01:00
Łukasz Mierzwa
e827b737cf Merge pull request #88 from cloudflare/legacy-classes
Rewrite js classes using prototypes
2017-05-03 10:11:24 +01:00
Łukasz Mierzwa
34c68ffb65 Rewrite js classes using prototypes
This removes the requirement on ES6 support in the browser, which will allow to use unsee on older browsers
2017-05-02 13:50:56 +01:00
Łukasz Mierzwa
f9bd5eb283 Merge pull request #87 from cloudflare/livemocks
Generate mock files from a live Alertmanager instance
2017-05-02 10:34:34 +01:00
Łukasz Mierzwa
cee9b2bef6 Generate mock data using livemock.py
Generate mock data for all Alertmanager releases that we can support (0.4 - 0.6) and switch tests to use them instead of old files
Fixes #67
2017-05-02 10:28:40 +01:00
Łukasz Mierzwa
f4ab8428d8 Add make target for generating mock API data from alertmanager
This will allow moving away from manually captured/edited mock API responses and start generating them by sending alerts & silences to a live Alertmanager instance
2017-05-02 10:28:39 +01:00
Łukasz Mierzwa
5ae8f43227 Merge pull request #86 from cloudflare/refactor-status
Refactor alert status attrs
2017-05-02 10:28:07 +01:00
Łukasz Mierzwa
b42953e87f Add validation tests 2017-05-01 22:20:12 +01:00
Łukasz Mierzwa
72808c0002 Add 0.6.1 mock data 2017-05-01 22:20:12 +01:00
Łukasz Mierzwa
487d7bcde8 Use alert status, inhibitedBy & silencedBy fields instead of silenced & inhibited 2017-05-01 22:20:12 +01:00
Łukasz Mierzwa
5df44def81 Add new attrs for tracking alert status and linking silences / inhibiting alerts
Those will replace Inhibited and Silenced
2017-05-01 18:43:03 +01:00
Łukasz Mierzwa
a001c6ed65 Merge pull request #85 from cloudflare/support-0.6.1
Add basic support for Alertmanager 0.6.1
2017-04-28 13:19:43 -07:00
Łukasz Mierzwa
3a1f6905e0 Add basic support for Alertmanager 0.6.1
This makes unsee work with 0.6.1, but the new status means that we should refactor unsee data model and pull inhibited and silenced into it, with a single filter
2017-04-28 12:40:04 -07:00
Łukasz Mierzwa
a6d2c287dd Merge pull request #84 from cloudflare/jshint-config
Jshint config
2017-04-27 22:54:31 -07:00
Łukasz Mierzwa
12832e2c29 Fix quotation mark inconsistencies
jshint tests passing again
2017-04-27 22:52:05 -07:00
Łukasz Mierzwa
ad897596b2 Enable quotation mark checks in jshint
Require double quote marks
2017-04-27 22:51:55 -07:00
Łukasz Mierzwa
4e97f4f0aa Fix unused and undefined variables warnings 2017-04-27 22:51:53 -07:00