Łukasz Mierzwa
0db288e5bf
Rewrite alerts.js as CommonJS, add tests
2017-07-29 13:47:06 -07:00
Łukasz Mierzwa
b2f99902f7
Fix tests
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
3dd04eb5f2
Rewrire ui.js as CommonJS, add tests
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
bc7be22e5f
Rewrite filters.js as CommonJS, add basic test
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
d166222a86
Rewrite summary.js as CommonJS, add tests
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
f6ca29d7a3
Add basic templates test
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
7301f40778
Rewrite sentry.js as CommonJS, add basic test
2017-07-29 13:45:33 -07:00
Łukasz Mierzwa
d083054409
Fix grid init(), add stub tests
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
3cb33754b2
Fix counter package import, add stub test file
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
c4f96b863c
Rewrite unsilence.js as CommonJS
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
a698a40577
Rewrite querystring.js as CommonJS, add basic tests
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
39204ea273
Rewrite progress.js as CommonJS, add tests
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
839c01d11e
Add missing jquery require to the counter.js
2017-07-29 13:45:32 -07:00
Łukasz Mierzwa
f22959f5d8
Rewrite colors.js as CommonJS, add tests
2017-07-29 13:45:29 -07:00
Łukasz Mierzwa
4799179e76
Rewrite template.js as CommonJS
2017-07-29 13:43:14 -07:00
Łukasz Mierzwa
4c95f2888e
Convert autocomplete to CommonJS and write tests
2017-07-29 13:43:14 -07:00
Łukasz Mierzwa
acc99e4f07
Add more watchdog tests
2017-07-29 13:43:14 -07:00
Łukasz Mierzwa
3c8be2dbad
Convert counter.js to CommonJS module
2017-07-29 13:43:13 -07:00
Łukasz Mierzwa
07a272e493
Fix watchdog tests
2017-07-29 13:43:13 -07:00
Łukasz Mierzwa
f8357689ad
Add basic tests for watchdog using jest
2017-07-29 13:43:13 -07:00
Łukasz Mierzwa
1474af8f07
Rewrite watchdog using CommonJS
2017-07-29 13:43:13 -07:00
Łukasz Mierzwa
f13628cb45
Show correct label colors in the silence form
...
When the silence form is rendered we make a new alerts.json request to pull all instances of the alert being silenced and populate select boxes, so that user can silence not only currently displayed alerts, but all firing ones. When we do that only alerts displayed (matching filters) are colored properly because only those had color data in the global state, so some instances in those select boxes will be missing color data. To fix this merge global color data (from filtered alerts) with colors for alerts we collected, so when rendering happens we have color data for all instances.
2017-07-25 15:17:31 -07:00
Łukasz Mierzwa
92074f5d29
Avoid caching all js files
2017-07-24 16:07:51 -07:00
Łukasz Mierzwa
3488072c8a
Switch lru.js to v2 version
...
v2 is an older implementation that doesn't require ES6, note from docs:
Note: If you need ES5 compatibility e.g. to use with older browsers, please use version 2 which has a slightly less feature-full API but is well-tested and about as fast as this implementation
2017-07-24 09:20:02 -07:00
Łukasz Mierzwa
c666d633aa
Allow unsilencing alerts from unsee UI
2017-07-10 09:43:53 -07:00
Łukasz Mierzwa
8e6b622d04
Add a helper to converting ajax() call errors into a string with description
...
There are many ways an ajax() call can fail but it's mostly the same pattern, capture it as a helper function and use for all calls
2017-07-10 09:30:03 -07:00
Łukasz Mierzwa
fdec73cc64
Fix silence payload preview
...
Alertmanager URI doesn't have /api/v1/silences path, only the domain, add it.
2017-07-10 08:58:25 -07:00
Łukasz Mierzwa
da063fbd83
Check for null values and set minimal refresh rate
2017-07-10 08:49:20 -07:00
Łukasz Mierzwa
60675fae19
Correctly update refresh interval if passed via query arg
2017-07-10 08:48:56 -07:00
Łukasz Mierzwa
a21be4db4d
Move tab visibility code from grid.js to unsee.js
...
Instead of grid update run a full update, after keeping tab in the background for too long some alert groups are kept in the DOM where they should be purged. Chrome does some really complex background tab throttling, interwebz states that after >=10s in the background a tab can only use 1% of the cpu. Future code might need to use Web Workers API, assuming other vendors will use it too (https://arstechnica.com/information-technology/2017/03/chrome-57-background-tab-suspension-download/ ). For now let's just reload alerts when user switches to a previously background tab after more than a single refresh cycle, this will ensure that there's no dead alerts presents since that can be confusing
2017-07-07 19:49:02 -07:00
Łukasz Mierzwa
ad47afd47d
Redraw alert list of user switches to unsee tab
...
This should limit UI artifacts when you keep unsee tab inactive (not fucused) for a long time and a browser stops refreshing content
2017-07-06 09:13:01 -07:00
Łukasz Mierzwa
538249beb0
Use share icon instead of link for alert group links
2017-07-02 12:33:03 -07:00
Łukasz Mierzwa
cb69029c4f
Add @alertmanager filter
2017-07-01 14:02:03 -07:00
Łukasz Mierzwa
812eceed39
Drop label keys from state and receiver button, those are static and we don't need to show them all the time
2017-07-01 13:34:05 -07:00
Łukasz Mierzwa
4330972277
Color source buttons based on alert state in each
2017-07-01 12:53:51 -07:00
Łukasz Mierzwa
4036137984
Always render silences, if there are any
...
Alert can be silenced in one instance while active in another, always show silences so it's visible
2017-07-01 12:46:19 -07:00
Łukasz Mierzwa
8ef0f3881e
Tweak error message for all Alertmanager instances being down
2017-07-01 12:42:43 -07:00
Łukasz Mierzwa
a8aa900830
Drop global SilencedBy & InhibitedBy from alert, only export per instance data
2017-07-01 10:05:28 -07:00
Łukasz Mierzwa
175078320e
Tweak silence JSON preview to work better with multiple instances
2017-06-30 23:30:53 -07:00
Łukasz Mierzwa
514eacb81d
Tweak instance errors boxes UI
2017-06-30 23:20:37 -07:00
Łukasz Mierzwa
db9c28eeba
Hide silence button tooltip when the form is shown
2017-06-30 20:03:57 -07:00
Łukasz Mierzwa
7b21997c19
Split warning box rendering into dedicated template
2017-06-30 19:58:03 -07:00
Łukasz Mierzwa
afb419f4f3
Handle silence request result for multiple Alertmanager instances in the UI
...
Silence result UI will now show all selected upstreams and provide individual results for each
2017-06-30 19:52:42 -07:00
Łukasz Mierzwa
5e020b9e01
Store alert source link per Alertmanager instance
2017-06-29 21:18:30 -07:00
Łukasz Mierzwa
721b4f8be4
Update silence form to work with multiple Alertmanager instances
2017-06-28 22:36:26 -07:00
Łukasz Mierzwa
c5724bb751
Handle per Alertmanager instance errors in the API and the UI
2017-06-28 22:36:25 -07:00
Łukasz Mierzwa
a802582dd4
Put silences in wells
2017-06-28 22:36:25 -07:00
Łukasz Mierzwa
26d14d1bd2
Refactor Alertmanager API client code to use multiple upstream instances
...
Alerts are stored per instance and deduplicated on read.
2017-06-28 22:35:16 -07:00
Łukasz Mierzwa
a6bf82c92d
Add a separator between multiple alert silences
2017-06-21 13:29:04 -07:00
Łukasz Mierzwa
f4629e72f3
Include receiver in the group link filter
2017-06-13 09:29:04 -07:00