Ł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
Łukasz Mierzwa
d977c2ff44
Enable development mode
...
This prevents errors from console, alert and other browser functions
2017-04-27 21:26:34 -07:00
Łukasz Mierzwa
bec2255a59
Add config file for jshint
...
This will enable more checks, first for undefined or unused variables
2017-04-27 20:53:01 -07:00
Łukasz Mierzwa
410d17e1c2
Merge pull request #83 from cloudflare/fix-regex-silence
...
Correctly anchor regex silences
2017-04-27 09:29:34 -07:00
Łukasz Mierzwa
dd6c3b1057
Correctly anchor regex silences
...
Silence regex rules are not anchored, be explicit
2017-04-26 20:00:45 -07:00
Łukasz Mierzwa
106175b756
Merge pull request #82 from cloudflare/event-listener-leak
...
Don't leak event listeners in the silence form
2017-04-26 18:54:04 -07:00
Łukasz Mierzwa
7f3c414189
Don't leak event listeners in the silence form
...
Event listeners are setup on the modal div, but that div is not removed when the modal is hidden, only its children. This means that event listeners are stacked every time you show and hide a form. To reproduce this issue:
1. open silence form, click up button above hours, it will increment from 1 to 2
2. hide the form
3. re-open silence form, click up button above hours, it will increment from 1 to 3
4. repeat and every time increment will get a new listener that will cause higher value bump
This PR moves all listeners to the silence form element, which is removed when modal is closed, so all even listeners are destroyed properly and this bug no longer gets triggered.
Same fix is applied to the quick filter modal, it's present there but the effect there isn't as visible
2017-04-26 17:37:13 -07:00
Łukasz Mierzwa
2fa9c5cffe
Merge pull request #81 from cloudflare/really-fix-events
...
This should be the real fix for the even recursion
2017-04-26 17:07:32 -07:00
Łukasz Mierzwa
0e7fe10b46
This should be the real fix for the even recursion
...
There's a bogus duplicated mouse event for a.silence-duration-btn, which I added to fix css issues, get rid of it and replace with proper css selectors. And with that drop the event.stopPropagation call as it shouldn't be needed anymore
2017-04-26 16:56:54 -07:00
Łukasz Mierzwa
efa1c2025b
Merge pull request #80 from cloudflare/fix-silence-json-padding
...
Add some space between submit button and the silence JSON preview
v0.4.0
2017-04-26 14:59:35 -07:00
Łukasz Mierzwa
aed3cf1f29
Add some space between submit button and the silence JSON preview
2017-04-26 14:17:33 -07:00
Łukasz Mierzwa
47b245efcf
Merge pull request #79 from cloudflare/raven-init
...
Better sentry javascript handling
2017-04-26 07:50:36 -07:00
Łukasz Mierzwa
bd5b9688ac
Handle load exceptions better
...
If js fails on startup (syntax error, can't load some files) then instead of showing blank page that doesn't work render a message with exception
2017-04-25 23:05:22 -07:00
Łukasz Mierzwa
45ba69cf76
Ensure raven-js is loaded first and works if enabled
...
This moves raven init into a dedicated file where it's configured on load, we no longer load it on /help, but there's only css there so there wasn't anything that could fail anyway. We will also now fail in the most visible way if the value passed to raven is invalid (as in invalid syntax)
2017-04-25 23:05:22 -07:00
Łukasz Mierzwa
1e9d1edc14
Merge pull request #78 from cloudflare/jshint-fixes
...
Jshint fixes
2017-04-25 20:24:25 -07:00
Łukasz Mierzwa
fcebd0dba7
Install nodejs & jshint on travis
2017-04-25 20:22:08 -07:00
Łukasz Mierzwa
5a53aa1ff7
Add jshint comments in modules that require ES6
...
This is to supress warnings about ES6 syntax usage, all modern browsers support 'class' so it's ok
2017-04-25 20:21:47 -07:00
Łukasz Mierzwa
acabd448ae
Ignore lru.js when running jshint tests
...
This is third party module not present on cdnjs, requires es6 so jshint generates warnings
2017-04-25 20:15:28 -07:00
Łukasz Mierzwa
9f7a7dd899
Run optional jshint tests if it's installed
2017-04-25 20:15:27 -07:00
Łukasz Mierzwa
9152aeff04
Prevent a chain of click events
...
Click events in some weird cases cause this function to be called twice, ensure that we stop processing this event after first pass
2017-04-25 19:14:18 -07:00
Łukasz Mierzwa
0c37254a71
Fix jshint warnings
2017-04-25 18:51:10 -07:00
Łukasz Mierzwa
21c7318ed4
Merge pull request #77 from cloudflare/fix-silence-label
...
Polish silence form UI
2017-04-25 17:08:22 -07:00
Łukasz Mierzwa
46ea7ebc94
Remove dead element
...
This isn't used by anything
2017-04-25 16:42:52 -07:00
Łukasz Mierzwa
ca0b70f3a8
Better logic for updating minutes in the duration
...
This makes it more consistien when user resets the duration to the minimum of 1 minute
2017-04-25 16:19:21 -07:00
Łukasz Mierzwa
3460b3003a
Add a delay to the top labels popover
2017-04-25 14:59:45 -07:00
Łukasz Mierzwa
c425952b62
Don't fail if startsAt wasn't yet initialized
2017-04-25 14:59:45 -07:00
Łukasz Mierzwa
e76531a165
Make decr button reset duration to minimun if needed
...
With this the user is able to reset duration to minimum by clickin on the day button when only 1 hour duration is set
2017-04-25 14:59:45 -07:00
Łukasz Mierzwa
e56ec68752
Correctly update min date of the silence end time
...
Move it to the right place, having it in silenceFormCalculateDuration means that we can trigger recursive updates
2017-04-25 14:59:45 -07:00
Łukasz Mierzwa
c07402d353
Fix warning from jshint
...
jshint needs to be added to 'make lint' target eventually, let's start with fixing some of the warnings it's generating
2017-04-25 14:59:44 -07:00
Łukasz Mierzwa
e26bb6e492
Cleanup silence form controls
...
Drop separators and replace submit button text with an icon
2017-04-25 14:59:44 -07:00
Łukasz Mierzwa
92efd51adc
Merge pull request #76 from cloudflare/cache-flush
...
Always flush cache after timer run
2017-04-25 14:59:06 -07:00