Commit Graph

35 Commits

Author SHA1 Message Date
Łukasz Mierzwa
38339c887e Use gzip middlerware to compress responses if client can accept compressed content
Some alert.json responses are going to be big, compress it to save bandwidth
2017-08-08 11:28:17 -07:00
Łukasz Mierzwa
5d4ae47888 Convert all packages to be internal
Internal packages are supported by Go 1.5+, any package in /internal/ dir is only importable from the same repo. This will cleanup main dir a bit and provide better namespace for unsee subpackages
2017-08-04 16:21:27 -07:00
Łukasz Mierzwa
b6d5a5614e Run end-to-end tests for unsee.js
This will allow to test entire alerts flow - get alerts.json response (via mocks) and render alerts
2017-07-30 21:08:11 -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
4a75acfdc1 Fix asset paths in tests 2017-07-29 13:53:40 -07:00
Łukasz Mierzwa
8f5c246297 Move to fully webpack managed assets 2017-07-29 13:52:07 -07:00
Łukasz Mierzwa
deaae332ec Add strict API response test to catch any drift 2017-07-06 22:27:13 -07:00
Łukasz Mierzwa
71c0dce1f6 Vendor renamed Sirupsen/logrus to sirupsen/logrus, fix imports 2017-07-02 10:12:33 -07:00
Łukasz Mierzwa
cb69029c4f Add @alertmanager filter 2017-07-01 14:02:03 -07:00
Łukasz Mierzwa
95ac702274 Fix tests to not use un-exported fields 2017-07-01 10:08:02 -07:00
Łukasz Mierzwa
2420212eb0 Fix tests to setup upstreams only once 2017-06-30 23:01:54 -07:00
Łukasz Mierzwa
612a0e817f Rename ALERTMANAGER_URI to ALERTMANAGER_URIS
This will make upgrade more explicit since there is a syntax change
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
16be1627ed Move all *InSlice functions into a slices package 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
23f70880dc Reverse sort on autocomplete data
This way =~ hints will be first, instead of !=. It probably makes sense to have smarter ordering, but this will do for now.
2017-06-13 09:37:34 -07:00
Łukasz Mierzwa
64b0a09f9a Generate regex ac hints only when substrings are present 2017-06-06 21:34:56 -07:00
Łukasz Mierzwa
275c0a7e03 Update tests 2017-06-06 21:34:56 -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
Ł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
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
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
0af0401c6d Add @inhibited filter 2017-04-17 16:01:52 -07:00
Łukasz Mierzwa
10ef33afdf Expose number of inhibited alerts in the /alerts.json response
This is so that the UI can take use of it
2017-04-17 14:06:30 -07:00
Łukasz Mierzwa
f0579b087b Rename models, strip Unsee prefix
Now that models package contains only unsee specific models rename everything stripping Unsee prefix from names
2017-04-06 19:24:48 -07:00
Łukasz Mierzwa
ea50d334f0 Migrate test to per version mock data 2017-04-06 19:24:47 -07:00
Łukasz Mierzwa
eaf617c9aa Mocking alerts isn't needed for static file tests 2017-04-06 19:24:47 -07:00
Łukasz Mierzwa
4bb629455b Merge pull request #23 from tcolgate/am051
Fixes for 0.5.1
2017-04-01 10:41:16 -07:00
Łukasz Mierzwa
0d82cffd79 Add -web.prefix / WEB_PREFIX option
This allows people to use unsee with a sub uri setup, which is pretty common usa case, fixes #22
2017-03-30 19:35:52 +01:00
Tristan Colgate
b7dd9d088e Fixes for 0.5.1 2017-03-29 08:40:14 +01:00
Łukasz Mierzwa
54d67cbbaa Add more tests for views
We moved static file handling to binary assets, add some tests so we can spot issues with this code
2017-03-28 10:26:13 -07:00
Łukasz Mierzwa
f8420d4632 Use go-bindata-assetfs for static files
This allows unsee to be compiled into a single self-contained binary, without any need to external static files or templates
2017-03-26 17:41:17 -07:00
Łukasz Mierzwa
3de3a9c481 Generate flag for each environment key
This allows to set config keys via flags, in additions to current env variable only configuration. Flags are autogenerated from supported env keys.
2017-03-26 13:38:37 -07:00
Łukasz Mierzwa
e239fd05fd Import code from internal repository (#1)
Import code from internal repository
2017-03-23 16:58:04 -07:00