Commit Graph
9252 Commits
Author SHA1 Message Date
Oleg Gaidarenko 04b3afcd15 Chore: Implement revive (#16200)
Since we do not like some of the default golint rules,
this commit proposes to use https://github.com/mgechev/revive.

And potential revive speed-up should't hurt :).

Right now, presented config (./conf/revive.toml) is permissive,
we might improve it over time however. Fixes for found revive
issues in the code are very limited so it wouldn't be large to review.

Also in this commit:

* Add annotations for makefile commands and declare phony targets

* Rename "gometalinter" script and CI command to "lint"
  since we are doing there a bit more then using gometalinter package

* Add Makefile rules to .editorconfig

* Documentation which mentioned "golint" replaced with revive

Fixes #16109
Ref #16160
2019-03-27 17:53:49 +01:00
Floyd May 33d1d427bc InfluxDB: Fix tag names with periods in alerting (#16255)
Updates regex to match tag names with periods when generating
series names in alerting evaluation (backend).

Fixes #9148
2019-03-27 23:13:12 +07:00
Navaneesh Kumar 5ea823a65a Fix: Alert email variable name typo fixed (#16232) 2019-03-27 09:42:20 +01:00
Marcus Efraimsson 2ae63e70c0 Alerting: Notification channel http api enhancements (#16219)
Now returns uid in response to get notification channel by id.
Adds GET/PUT/DELETE support for notification channel by uid, 
  /api/alert-notifications/uid/:uid.
Break apart alerting and alert notification http api docs in two 
  pages and update documentation to make it up to date
  with current implementation.

Fixes #16012
2019-03-26 18:37:02 +07:00
Marcus Efraimsson 6b8e3122f8 chore(influx): no point of reading response when bad status (#16212)
There's no point in reading the body response without using
the result so removing it.

Fixes #9199
Ref #16207
2019-03-26 12:10:24 +07:00
Daniel Lee fda7e686f3 Merge pull request #15205 from seanlaff/12556-oauth-pass-thru
Add oauth pass-thru option for datasources
2019-03-25 21:52:20 +01:00
Ramon Carvalho Maciel d791a6211d fix(InfluxDB): Reads body and close request body even for error status codes (#16207) 2019-03-25 17:42:26 +01:00
Torkel Ödegaard 7c81f4dfd8 fix(Alerting): Fixed alert rules with eval in day units, fixes #16174 (#16182) 2019-03-25 16:27:58 +01:00
Daniel Lee c7d108264d Merge pull request #16137 from mtanda/cloudwatch_update_metrics_list
update cloudwatch metrics/dimensions list
2019-03-25 14:42:15 +01:00
Torkel Ödegaard 46a75099d8 Merge pull request #16116 from SGI495/master
Don't include non-existing image in MS Teams alert
2019-03-22 09:34:56 +01:00
Mitsuhiro Tanda 4d8eb76dca update cloudwatch metrics/dimensions list 2019-03-22 00:08:17 +09:00
Sean Lafferty 50c5854430 Use grafana's logger implementation 2019-03-21 08:13:03 -04:00
Mitsuhiro Tanda 56251ca546 Update CloudWatch metrics/dimension list (#16102)
update cloudWatch metrics/dimension list
2019-03-21 11:13:06 +01:00
Sean Lafferty b3461c9806 Remove sleeps in test code by overriding time.Now() 2019-03-20 15:34:31 -04:00
Sean Lafferty 3b9b6c571a Abstract encrypt/encode and decode/decrypt into their own functions 2019-03-20 15:18:22 -04:00
Sean Lafferty b696492891 Rename dispatched commands to make them easy to grok 2019-03-20 14:32:41 -04:00
Sean Lafferty be6e76ee35 Use structured logging instead of printf 2019-03-20 14:25:26 -04:00
Magnus Berglund e6623de6b2 Rewrote creation of images tag 2019-03-20 18:59:13 +01:00
Magnus Berglund 0511095303 Added missing commas 2019-03-20 18:42:48 +01:00
Magnus Berglund 0de77598d7 Don't include non-existing image in MS Teams alert
If an image section is included in the JSON payload for MS Teams alerts
when no image URL exists, rendering of the alert in the client fails.
This change makes sure that an image section is only included in the
JSON payload if an image URL exists.

Closes #16082
2019-03-20 18:23:36 +01:00
Oleg Gaidarenko 30f0c35006 Merge pull request #16104 from markelog/remotecache-small-fix
Correct table names of sql storage for remotecache
2019-03-20 14:08:02 +01:00
Oleg Gaidarenko c5bc723a6e Correct table names of sql storage for remotecache 2019-03-20 13:24:56 +01:00
Torkel Ödegaard d11695b8b5 Fixed gofmt issue in PR #16093 2019-03-20 10:58:20 +01:00
Sai Ram Gupta 6929593eb6 Update org_user.go
Add check for, if current role is ROLE_VIEWER, return true if the role I'm checking for is ROLE_VIEWER. Fixes #16092
2019-03-19 11:31:55 -07:00
Leonard Gram 978c20a604 teams: explains the external property of a team membership. 2019-03-19 14:01:22 +01:00
Hugo Häggmark 53c74fa2f5 teams: refactor so that you can only delete teams if you are team admin 2019-03-19 14:01:21 +01:00
Leonard Gram a615b78f8a permissions: removes global access to bus from MakeUserAdmin. 2019-03-19 14:01:20 +01:00
Leonard Gram adf0390b2c teams: local access to bus, moving away from dep on global. 2019-03-19 14:01:20 +01:00
Leonard Gram 6589a4e55f teams: better names for api permissions. 2019-03-19 14:01:20 +01:00
Leonard Gram 9f33f00343 teams: refactor. 2019-03-19 14:01:19 +01:00
Leonard Gram 9f8e43916d permissions: refactor. 2019-03-19 14:01:19 +01:00
Leonard Gram b796027bc6 teams: refactor. 2019-03-19 14:01:19 +01:00
Leonard Gram d1481cac50 teams: refactored db code. 2019-03-19 14:01:18 +01:00
Hugo Häggmarkandxlson 6a63725df0 teams: comment explaining input validation
Co-Authored-By: xlson <leo@xlson.com>
2019-03-19 14:01:17 +01:00
Leonard Gram 3f57a81c47 teams: cleanup. 2019-03-19 14:01:16 +01:00
Leonard Gram ccfd6789ca teams: cleanup. 2019-03-19 14:01:16 +01:00
Leonard Gram fc0461134f dashboards: simplified code. 2019-03-19 14:01:15 +01:00
Hugo Häggmark b60e71c28b teams: moved logic for searchteams to backend 2019-03-19 14:01:15 +01:00
Hugo Häggmark 782b5b6a3a teams: viewers and editors can view teams 2019-03-19 14:01:14 +01:00
Leonard Gram c420af16b1 teams: editor/viewer team admin cant remove the last admin. 2019-03-19 14:01:14 +01:00
Hugo Häggmark 246e128048 teams: changed permission to permission type instead of int 2019-03-19 14:01:14 +01:00
Hugo Häggmark c826f39a8b teams: defaulting invalid permission level to member permission level 2019-03-19 14:01:13 +01:00
Leonard Gram c823ad5de7 team: uses PermissionType instead of int64 for permissions. 2019-03-19 14:01:13 +01:00
Leonard Gram 21d3d27452 teams: editors can't remove the last admin from a team. 2019-03-19 14:01:13 +01:00
Leonard Gram b783fa7039 team: renames teams.CanUpdate teamguardian.CanAdmin 2019-03-19 14:01:12 +01:00
Hugo Häggmark a90b3e331e config: updated feature toggle name 2019-03-19 13:59:39 +01:00
Leonard Gram a6a3d698da teams: cleanup. 2019-03-19 13:57:30 +01:00
Leonard Gram 0b209de5d1 dashboard: only admin permission added to dashboard in folder. 2019-03-19 13:57:30 +01:00
Leonard Gram d593ffe3c1 dashboards: better error handling 2019-03-19 13:57:30 +01:00
Leonard Gram 89d4db8eb6 teams: team listing shows only your teams (editors). 2019-03-19 13:57:29 +01:00