Commit Graph

88 Commits

Author SHA1 Message Date
Łukasz Mierzwa
c6288d27a2 Show silence ID in the UI
This adds silence ID to the list of rendered silence elements, clicking on it will allow to copy it to the clipboard. Fixes #203
2018-01-03 13:15:19 -08:00
Łukasz Mierzwa
6273a5a585 Rewrite flag & env handling to use viper
This adds support for reading configuration from file, env support is still there and legacy env variables will still work, but flags are now following config schema, so they don't match old flags.
Having a config file allows to express more complex configuration options, which is needed for some feature requests.
2017-11-27 20:34:36 -08: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
21a8091a70 Handle complex annotations correctly in the frontend template 2017-09-07 12:15:32 -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
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
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
ea62db3c2f Save filters usage history to local storage and provide a dropdown menu to access it
This allows to quickly select recently used filters from a dropdown. It also shows default (configured by unsee admin) filter and the saved one (saved by the user to a cookie)
2017-08-11 16:40:27 -07:00
Łukasz Mierzwa
89223e8fbd Move all imports to head to avoid unstyled html on load 2017-07-29 16:26:28 -07:00
Łukasz Mierzwa
f202232be8 Version all bundles
This will tell webpack to add a hash to all bundles filenames, we generate script tags for loading those and inject them as templates. No more forced cache bypassing
2017-07-29 16:19:48 -07:00
Łukasz Mierzwa
557c55dc64 Add a bundle for /help page 2017-07-29 14:22:55 -07:00
Łukasz Mierzwa
ca1081f461 Correctly bundle favicon.ico file 2017-07-29 13:52:55 -07:00
Łukasz Mierzwa
8f5c246297 Move to fully webpack managed assets 2017-07-29 13:52:07 -07:00
Łukasz Mierzwa
8fa80a944f update templates 2017-07-29 13:49:01 -07:00
Łukasz Mierzwa
92074f5d29 Avoid caching all js files 2017-07-24 16:07:51 -07:00
Łukasz Mierzwa
c666d633aa Allow unsilencing alerts from unsee UI 2017-07-10 09:43:53 -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
514eacb81d Tweak instance errors boxes UI 2017-06-30 23:20:37 -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
Łukasz Mierzwa
291256f48f Show group badge only if there are multiple alerts 2017-06-06 22:02:30 -07:00
Łukasz Mierzwa
dd8c6f13af List silence matchers in the UI 2017-06-06 21:47:09 -07:00
Łukasz Mierzwa
f14010b1ad Move silence button close to @state label 2017-06-06 21:34:58 -07:00
Łukasz Mierzwa
4bd43d0921 Show a bit more info for silences 2017-06-06 21:34:58 -07:00
Łukasz Mierzwa
5d35cf3529 Pull links up to labels level
Number of links usually doesn't justify giving it a dedicated row, so let's render it before labels
2017-06-06 21:34:58 -07:00
Łukasz Mierzwa
7ad5e1e18c Remove label from alert source link
And change the icon, this is static text so let's remove it to save space
2017-06-06 21:34:57 -07:00
Łukasz Mierzwa
1dfd20fbeb Add @receiver filter to the help page 2017-06-06 21:34:57 -07:00
Łukasz Mierzwa
1521311f1d Remove new lines 2017-06-06 21:34:57 -07:00
Łukasz Mierzwa
6d15a82e89 Support multiple receivers 2017-06-03 13:23:51 -07:00
Łukasz Mierzwa
aadcaeb9b5 Fix issues reported by eslint 2017-06-01 20:24:47 -07:00
Łukasz Mierzwa
8a77d620fd Rename @status to @state
Fixes #104

@status filter was added to the master branch to support new status key from Alertmanager >=0.6.1
status ended up being nested in Alertmanager (it was added to solve AM issue 609 and that was a long PR with lots of changes), current unsee implementation ended being slightly off with how Alertmanager is naming this, it should actually be @state rather than @status.
2017-05-23 21:52:08 +01:00
Filippo Giunchedi
33557a7d6f assets: use .WebPrefix for help link too 2017-05-22 10:40:05 +02: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
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
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