Łukasz Mierzwa
a36dbb707e
Add tests for Alertmanager 0.9.0
...
No code changes needed to support 0.9.0, so only adding tests
2017-09-28 19:11:33 -07:00
Łukasz Mierzwa
6670ea98b4
Merge pull request #181 from cloudflare/history-menu-width
...
Trim very long history menu items
v0.8.0
2017-09-07 15:26:21 -04:00
Łukasz Mierzwa
a8c158963d
Trim very long history menu items
...
If there's a very long menu item entry we should trim it
2017-09-07 12:22:41 -07:00
Łukasz Mierzwa
0f4faec19a
Merge pull request #177 from cloudflare/hide-annotations
...
Allow hiding annotations in the UI
2017-09-07 15:21:55 -04:00
Łukasz Mierzwa
5d0366a743
Redraw alert grid after annotations visibility toggle
...
Alert group needs more space after expanding, so we need to redraw everything.
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
40604453ee
Add tests for annotations
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
dca9fba460
Document new options for controlling annotation visibility
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
ab25daf6c9
Implement logic for setting annotation visibility
...
This allows to signal to the UI which annotations to hide and which to show by default, user still can view hidden ones
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
843eb80060
Add button to toggle annotation visibility
...
If user make annotation hidden by default, then render a button that allows to show it per label
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
aa606eff12
Migrate tests to new annotation scheme
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
21a8091a70
Handle complex annotations correctly in the frontend template
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
54b1455276
Use dedicated struct for storing alert annotations
...
Annotations are just string maps, but to render those we need a bit more information (is it a link, should it be visible by default). Store them as more complex structs internally, this also allows us to drop alert.Links since we now have enough information to tell if annotation is a link
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
24af661636
Add config options for controlling annotations visibility
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
22fddad1b7
Merge pull request #178 from cloudflare/vendor-updates
...
Update vendor packages
2017-09-07 15:12:49 -04:00
Łukasz Mierzwa
d2e72bff8e
Update npm vendor deps
2017-09-05 16:22:30 -07:00
Łukasz Mierzwa
27d38d85b3
Update vendor packages
2017-09-05 16:22:30 -07:00
Matt Bostock
650c61ac7f
Merge pull request #180 from cloudflare/go1.9
...
Use Go 1.9.0
2017-09-03 23:08:47 +01:00
Łukasz Mierzwa
0d3a809667
Use Go 1.9 for travis CI jobs
2017-08-24 22:13:54 -07:00
Łukasz Mierzwa
c6ffb26cb8
Use Go 1.9.0 for docker builds
2017-08-24 22:13:28 -07:00
Łukasz Mierzwa
badd2f8429
Merge pull request #179 from cloudflare/tiny-docker
...
Use Docker multi-stage builds to reduce final docker image size
2017-08-23 10:49:43 -07:00
Łukasz Mierzwa
2a76843700
Use Docker multi-stage builds to reduce final docker image size
...
For second stage use https://github.com/GoogleCloudPlatform/distroless which provides a minimal image with CA certificates.
Binary is compiled with CGO_ENABLED=0 to prevent dynamical linking to any libraries.
2017-08-22 19:31:56 -07:00
Łukasz Mierzwa
577c15ee77
Merge pull request #156 from cloudflare/linkify
...
Linkify URLs in annotations
2017-08-18 12:20:45 -07:00
Łukasz Mierzwa
44830cc3c9
Use info icon instead of help, also escape annotation keys
...
Help icon doesn't make sense for annotation key, info icon is a bit more related to the usage of annotations
2017-08-18 12:09:35 -07:00
Łukasz Mierzwa
c7442c3adf
Linkify URLs in the annotation
...
use linkifyjs to make all URLs in the annotation clickable, but since it requires us to stop escaping html when rendering annotation object let's first manually escape it to prevent rogue alerts with malicious annotations from executing <scripts> and other ugly things in user browsers
2017-08-18 12:09:35 -07:00
Łukasz Mierzwa
89519267b7
Merge pull request #176 from cloudflare/jest-coverage
...
Add tests for (un)silence.js
2017-08-18 12:02:52 -07:00
Łukasz Mierzwa
3124049c5a
Fix wrong status in error
...
Doesn't matter for test result, but should be error since we return 500
2017-08-17 19:42:08 -07:00
Łukasz Mierzwa
f96cafca7b
Test creating silences
2017-08-17 19:42:08 -07:00
Łukasz Mierzwa
ac8b3391d7
Re-use ajax mocks instead of creating one per response
2017-08-15 20:22:57 -07:00
Łukasz Mierzwa
866797cc42
Add more silence.js tests
2017-08-15 20:20:35 -07:00
Łukasz Mierzwa
431540c05e
Add a test case for error handling when unsilence request fails
2017-08-15 19:53:26 -07:00
Łukasz Mierzwa
77ec8d9a8b
Use correct icon
...
Tests are failing because we're not cleaning icons properly
2017-08-15 19:45:00 -07:00
Łukasz Mierzwa
ecf14e7633
Add a test for unsilence button
2017-08-15 19:43:49 -07:00
Łukasz Mierzwa
8a5653e930
Merge pull request #172 from cloudflare/jest-coverage
...
Exclude jquery.typing from coverage reports in jest
2017-08-15 17:10:01 -07:00
Łukasz Mierzwa
11e661dd5b
Exclude jquery.testing from coverage reports in jest
2017-08-15 09:59:53 -07:00
Łukasz Mierzwa
d80ea11d57
Merge pull request #174 from cloudflare/navbar-icons
...
Tweak history UI
2017-08-15 09:50:59 -07:00
Łukasz Mierzwa
c6e91c658e
Update test snapshots
...
Rendered HTML changed, so tests need updating
2017-08-15 09:46:58 -07:00
Łukasz Mierzwa
15b3072a33
Render search history and default/saved filter separator only if needed
...
If there are no recorded search filters than we don't need any separator
2017-08-15 09:46:58 -07:00
Łukasz Mierzwa
536379434d
Enable tooltips for history dropdown
...
It's a dropdown so data-toggle is already used for the menu
2017-08-15 09:46:58 -07:00
Łukasz Mierzwa
71b686b05f
Merge pull request #175 from cloudflare/history-filters
...
Don't reload filters until entire applyFilterList() block was completed
2017-08-15 09:46:37 -07:00
Łukasz Mierzwa
d92e08f3f6
Don't reload filters until entire applyFilterList() block was completed
...
setFilters() will trigger fetch of the new alerts with updated filter, it's being called after each filter is added to the filter bar, so each added filter ends up with AJAX call to /alerts.json, this means that when someone clicks on a history entry with complex rule it will trigger multiple subsequent requests. What's worse first request will have bigger response body (since it filters less) so it's likely that it will finish after the next request, leaving invalid alerts on the grid. This disable setFilters() if we apply filters in batch mode.
2017-08-14 20:10:44 -07:00
Łukasz Mierzwa
f7462b8892
Merge pull request #173 from cloudflare/npm-updates
...
Update eslint & webpack
2017-08-14 11:56:34 -07:00
Łukasz Mierzwa
4fa2959d7c
Update eslint & webpack
...
Those are important so let's upgrade those early
2017-08-14 11:46:54 -07:00
Łukasz Mierzwa
070a95d3ff
Merge pull request #158 from cloudflare/history
...
Save filters usage history to local storage and provide a dropdown me…
2017-08-14 11:44:26 -07:00
Łukasz Mierzwa
c7b18f314d
Add applyFilterList() function and move logic there
2017-08-13 19:25:55 -07:00
Łukasz Mierzwa
9ba23d1658
Tweak history menu UI
...
Show search icon for search history elements and provide a separate entries for the default and saved filter.
Default & saved filter are always rendered on the bottom, if they are non-empty.
2017-08-13 16:55:51 -07:00
Łukasz Mierzwa
256453ccaf
Add snapshot tests for history dropdown
2017-08-12 21:21:25 -07:00
Łukasz Mierzwa
9645287d88
Use a Set() instead of array
...
We only want unique values, Set is better for this
2017-08-12 19:57:30 -07:00
Łukasz Mierzwa
f0dc85ad0b
Pass storage implementation as an argument
...
Instead of assuming that window.localStorage is always used pass it via arguments
2017-08-11 16:40:29 -07:00
Łukasz Mierzwa
6809733346
Add history tests
2017-08-11 16:40:29 -07:00
Łukasz Mierzwa
4bb14312ff
Mock local storage when running tests
2017-08-11 16:40:29 -07:00