Commit Graph

1354 Commits

Author SHA1 Message Date
Carl Bergquist
eff687bece
Merge pull request #10694 from grafana/7883_backend
backend for new url structure.
2018-02-01 09:35:00 +01:00
Marcus Efraimsson
90933b0621 dashboard: refactor logic for retrieving url for folder/dashboard 2018-01-31 23:14:48 +01:00
Marcus Efraimsson
035b724725 dashboards: remove slug property in dashboard search responses
Removes slug property in dashboard search responses since this property isn't needed
anymore and it haven't been released to any stable release.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
92a0171a9b folders: change the front end route for browsing folders
Change the front end route for folders to /dashboards/f/<uid>/<slug of folder title>.
Use new route for deleting dashboard/folder by uid.
Retrieve dashboard/folder by uid when moving or deleting dashboards/folders.
2018-01-31 18:40:54 +01:00
Marcus Efraimsson
b23560ed5a dashboards: add validation to delete dashboard by slug
Validates that there are only one folder/dashboard having that slug,
otherwise returns 412 Precondition Failed
2018-01-31 18:40:54 +01:00
bergquist
58cfb23625 retry uid generation 2018-01-31 17:29:17 +01:00
Daniel Lee
a9e2273064 Merge remote-tracking branch 'upstream/master' into dashboard_permissions 2018-01-31 16:45:32 +01:00
Daniel Lee
7e2e57c306 dashfolders: fixes #10671. Allow Editors default access to Root.
Editors should be able to create dashboards in root and should be
able to create folders. They cannot administrate permissions though
and these dashboards and folders will get the default permissions.
2018-01-31 16:43:21 +01:00
bergquist
16a1642831 gofmt... 2018-01-31 15:15:15 +01:00
bergquist
3da2ab61e0 Verifies requirement of id in dashboards. 2018-01-31 14:36:14 +01:00
bergquist
7e96052594 ensure dashboard title is unique in folder 2018-01-31 14:18:54 +01:00
bergquist
bb3183f6cd removes uniqnes check on slug when saving dashboards 2018-01-31 10:29:52 +01:00
bergquist
6d2a555866 Drops unique index orgid_slug from dashboards. 2018-01-31 10:26:06 +01:00
Patrick O'Carroll
465e701b42 moved icon (#10681) 2018-01-31 09:52:29 +01:00
Daniel Lee
eb765d288c alertlist: disable pause button when user does not have permission 2018-01-30 23:35:27 +01:00
Marcus Efraimsson
9fb7b887db dashboards: add url property to dashboard meta and search api responses
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
13d5db7d19 dashboards: add support for retrieving a dashboard by uid
Introduces new url in api /dashboards/<uid> for fetching dashboard by unique id
Leave the old dashboard by slug url /dashboards/db/<slug> for backward
compatibility and for supporting fallback
WIP for #7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
c1cff3849e dashboard: change unique index for uid to include org_id
Make the max length of uid longer in case we want to change it later
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson
fc7bab8bf0 dashboard: fix failing test. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson
5b35c694dc dashboard: generate and include uid in dashboard model. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson
025a14ec24 db: add migrations for creating a unique index for uid. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson
50aa9ec69c db: add migrations for generating uid for existing dashboards. #7883 2018-01-30 23:18:34 +01:00
Marcus Efraimsson
401b01e1e6 db: add new column uid to the dashboard table. #7883 2018-01-30 23:18:34 +01:00
Daniel Lee
f5107d5023 alerting: add permission check in api for pausing alerts 2018-01-30 14:41:25 +01:00
Marcus Efraimsson
f08932b78a WIP: folder api. #10630 2018-01-30 10:53:28 +01:00
Daniel Lee
0fb05bcf59 Merge remote-tracking branch 'upstream/master' into dashboard_permissions 2018-01-30 09:26:23 +01:00
Daniel Lee
5ee2d1de05 dashfolders: select with description for permissions
The dropdown for selecting permission is a new component built on
react-select that includes a description for the permission for
every option in the select.
2018-01-29 13:56:12 +01:00
Marcus Efraimsson
3d1c624c12 WIP: Protect against brute force (frequent) login attempts (#10031)
* db: add login attempt migrations

* db: add possibility to create login attempts

* db: add possibility to retrieve login attempt count per username

* auth: validation and update of login attempts for invalid credentials

If login attempt count for user authenticating is 5 or more the last 5 minutes
we temporarily block the user access to login

* db: add possibility to delete expired login attempts

* cleanup: Delete login attempts older than 10 minutes

The cleanup job are running continuously and triggering each 10 minute

* fix typo: rename consequent to consequent

* auth: enable login attempt validation for ldap logins

* auth: disable login attempts validation by configuration

Setting is named DisableLoginAttemptsValidation and is false by default
Config disable_login_attempts_validation is placed under security section
#7616

* auth: don't run cleanup of login attempts if feature is disabled

#7616

* auth: rename settings.go to ldap_settings.go

* auth: refactor AuthenticateUser

Extract grafana login, ldap login and login attemp validation together
with their tests to separate files.
Enables testing of many more aspects when authenticating a user.
#7616

* auth: rename login attempt validation to brute force login protection

Setting DisableLoginAttemptsValidation => DisableBruteForceLoginProtection
Configuration disable_login_attempts_validation => disable_brute_force_login_protection
#7616
2018-01-26 10:41:41 +01:00
bergquist
d62d5c7418 provisioning: delete dashboards from db when file is missing 2018-01-25 15:25:07 +01:00
Daniel Lee
bc5fae5367 dashfolders: merge conflict 2018-01-25 14:54:50 +01:00
Leonard Gram
1c034b7a73 fixes minor typo 2018-01-25 09:30:37 +01:00
bergquist
c3a768b3ed provsioning: dont stop grafana due to missing 2018-01-25 09:30:37 +01:00
bergquist
57e7048b8f provisioning: enables title changes for dashboards 2018-01-24 19:16:57 +01:00
Marcus Efraimsson
d36fd66dba dashfolder: fix for sqlite test 2018-01-24 11:43:08 +01:00
Daniel Lee
9d2a667e8b dashfolder: fix for mysql test 2018-01-24 11:19:26 +01:00
bergquist
ee973a977b stats: send amount of stars as stats 2018-01-23 22:51:05 +01:00
bergquist
ea988a37dd tech: avoid using deprecated functions 2018-01-23 22:30:45 +01:00
bergquist
5a1cf2c793 style: minor code style changes 2018-01-23 22:28:47 +01:00
bergquist
77a4ccb822 dashboards: save provisioning meta data 2018-01-23 21:54:30 +01:00
bergquist
67a9e6a71d provisioing: add lookup table provisioned dashboards 2018-01-23 21:52:55 +01:00
bkaganyildiz
97d969bd5c Update OpsGenie Notifier to support different api domains. 2018-01-22 22:27:35 +03:00
Daniel Lee
94a54248c1 dashfolders: show folders use can save to in picker
Instead of returning all folders a user has some sort of access to,
this change creates a new end point that returns folders the user
has write access to. This new endpoint is used in the folder picker
2018-01-20 01:58:28 +01:00
bergquist
083abff297 Merge branch 'master' into provisioning
* master:
  install dep instead of govendor on setup
  remove unused code from vendor
  migrate from govendor to dep
  fix: cloudwatch corrected error handling so original error is not thrown away
  Generic Oauth Support for ADFS (#9242)
  Adjusted the border color on the buttons in dashboard nav, fixed alert email text area width, fixed padding-top issue on dashboard settings aside
  mysql: convert numbers to text for annotation tooltip
  mysql: update to use ColumnTypes interface in new version
  mysql: update mysql driver to latest master
  gofmt my dear friend
  ux: updated react-layout-grid
2018-01-19 10:36:02 +01:00
Matt
0dffb6dbb1 Adjusted the border color on the buttons in dashboard nav, fixed alert email text area width, fixed padding-top issue on dashboard settings aside 2018-01-18 14:40:08 +01:00
Daniel Lee
f64637c2c5 dashfolders: stop user locking themselves out of a folder 2018-01-18 14:30:04 +01:00
bergquist
7858965117 codestyle: extract code into methods 2018-01-18 12:04:12 +01:00
Carl Bergquist
d6667c4fa0
Merge pull request #10548 from StevenTobin/follow_symlinks
Make file_reader follow symlinks
2018-01-18 11:29:34 +01:00
stobin
f1813ae3a3 Make file_reader follow symlinks 2018-01-17 14:51:17 +00:00
bergquist
34d7f8a44f dashboards as cfg: property path replaces folder 2018-01-17 15:48:24 +01:00
Leonard Gram
183507964c Clearer naming for dashboard provisioning config.
Renames folder (in options) to path to make it
different from the grafana folder wherein the
dashboard will be created.
2018-01-16 17:40:14 +01:00
Daniel Lee
a5830c6dbc Merge remote-tracking branch 'upstream/master' into dashboard_permissions 2018-01-16 12:02:13 +01:00
bergquist
1a6c2ea8d8 dashboards as cfg: logs error when trying to import dashboard with id
dashboard json cannot contain fixed id when importing from
disk. We used to override this but it didnt caught all problems
so now we block dashboards from beeing imported instead.

closes #10504
2018-01-15 12:26:43 +01:00
Robin Burchell
43109dc8ca telegram: Send notifications with an inline image
If image upload is enabled, but there is no public image repository,
fall back to sending an image via telegram's API.
2018-01-11 17:23:50 -05:00
Robin Burchell
b6fcf2b609 telegram: Switch to using multipart form rather than JSON as a body
This is a pre-requisite for uploading inline images.
2018-01-11 17:21:43 -05:00
Robin Burchell
a1a9f339bf telegram: Fix a typo in variable name 2018-01-11 17:21:43 -05:00
Daniel Lee
3ae1bf0c16 dashfolders: permissions for saving annotations
ref #10275 Use folder permissions instead of hard coded
permissions on the annotations routes.
2018-01-09 14:44:36 +01:00
Torkel Ödegaard
c42a232644 Merge branch 'react-mobx' 2018-01-04 09:12:57 +01:00
Ali
de22e793d8
Merge branch 'master' into master 2018-01-03 10:33:54 +03:00
Torkel Ödegaard
029317ed18 tech: alert list react migration progress 2017-12-31 14:16:19 +01:00
bergquist
f5e00e133b dashboards as cfg: moves dashcash into its own file 2017-12-28 13:37:02 +01:00
bergquist
237d469ed4 dashboards as cfg: create dashboard folders if missing
closes #10259
2017-12-28 13:33:11 +01:00
bergquist
f4078e1935 tests: for skipping with hidden folders 2017-12-27 15:04:49 +01:00
Torkel Ödegaard
3e7420320c Merge branch 'master' into react-mobx 2017-12-26 13:53:39 +01:00
bergquist
7917efb31a pagerduty: fixes invalid default value
autoResolve incident checkbox was set to disabled by default but
the backend used enabled as default. This commit makes both use
disabled by defualt

fixes #10222
2017-12-22 10:54:48 +01:00
bergquist
e480a38dc1 pagerduty: adds test for reading auto resolve setting 2017-12-22 09:58:37 +01:00
Torkel Ödegaard
4181602b78 react: progress on react containers and mobx-state-tree store 2017-12-21 11:56:45 +01:00
Marcus Efraimsson
af34f9977e Add avatar to team and team members page (#10305)
* teams: add db migration for email column in teams table

* teams: /teams should render index page with a 200 OK

* teams: additional backend functionality for team and team members

Possibility to save/update email for teams.
Possibility to retrive avatar url when searching for teams.
Possibility to retrive avatar url when searching for team members.

* teams: display team avatar and team member avatars

Possibility to save and update email for a team

* teams: create team on separate page instead of modal dialog
2017-12-20 21:20:12 +01:00
Marcus Efraimsson
df3655dd4a db: fix postgres regression when comparing boolean columns/values (#10303)
Use the dialect specific BooleanStr when comparing boolean columns/values.
Fixes #10300
2017-12-20 12:15:49 +01:00
Carl Bergquist
e2be6a38c4 pushover: update default message 2017-12-19 14:31:26 +01:00
Carl Bergquist
f36aa2e953 Merge branch 'patch-1' of https://github.com/devkid/grafana into devkid-patch-1
* 'patch-1' of https://github.com/devkid/grafana:
  Add default message for Pushover notifications
2017-12-19 14:30:09 +01:00
Carl Bergquist
644c2f7fb0 test: remove unused code 2017-12-19 11:23:21 +01:00
Carl Bergquist
66cf224e31 alerting: make alert extractor backwards compatible
closes #10270
2017-12-19 11:20:05 +01:00
Carl Bergquist
1816e89730 alerting: move test json into files 2017-12-19 10:22:26 +01:00
Torkel Ödegaard
51ec64f872 fix: reduced team name column length, fixes #10244 2017-12-18 13:38:29 +01:00
Torkel Ödegaard
a8a5f8181b fix: viewers can edit now works correctly 2017-12-15 14:19:49 +01:00
Torkel Ödegaard
c395237710 Merge branch Grafana v5 'develop' branch 2017-12-15 12:06:09 +01:00
Torkel Ödegaard
8905c8e5fb Merge branch 'team_member_count' of https://github.com/bergquist/grafana into develop 2017-12-15 11:53:47 +01:00
Daniel Lee
2b814738c1 dashfolder: change to migration text
First index for the dashboard_acl table had the word
unique in the migration description even though the
index is not unique
2017-12-15 11:35:14 +01:00
bergquist
256f7176a2
teams: add team count when searching for team
closes #10207
2017-12-15 11:08:06 +01:00
Simon Aquino
5dbbf1826c Avoid ID validation before provisioning dashboards
Attempting to provision grafana using a previously exported
JSON dashboard with the ID field already set, might result in an error.
In fact, Grafana might believe that a dashboard with that
given ID already exists in the database, throwing an error if it doesn't.
(see pkg/services/sqlstore/dashboard.go#L32)

The dashboard provisioner should set the dashboard id to zero in order to
avoid this behaviour inducing the dashboard to be written to the DB
without ID validation.
2017-12-14 02:07:50 +01:00
Torkel Ödegaard
a7645b710d Merge remote-tracking branch 'origin/master' into develop 2017-12-13 19:18:10 +01:00
bergquist
ade734168c alertmanager: endAt should only be used if we have the correct value 2017-12-13 19:17:00 +01:00
bergquist
3691faf136 alertmanager: code style 2017-12-13 19:17:00 +01:00
bergquist
1240db31d3 alerting: reduce log level for notifiers 2017-12-13 19:17:00 +01:00
Thibault Chataigner
a8264fe316 Alertmanager notifier: add "metric" labels if no tags
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-13 19:17:00 +01:00
Thibault Chataigner
3a7939c930 Alertmanager notifier: make it match the new notifier interface
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-13 19:17:00 +01:00
Mitsuhiro Tanda
20d94f9703 support alertmanager 2017-12-13 19:17:00 +01:00
Carl Bergquist
35106537f2 Replace Read Only Editor role with ViewersCanEdit setting (#10166)
* removes readonly editor role

* adds viewersCanEdit setting

This enable you to allow viewers to edit/inspect
dashboards in grafana in their own browser without
allowing them to save dashboards

* remove read only editor option from all dropdowns

* migrates all read only viewers to viewers

* docs: replace readOnlyEditor with viewersCanEdit
2017-12-13 18:53:42 +01:00
Torkel Ödegaard
313735bd75 search: worked on search results 2017-12-13 15:51:59 +01:00
bergquist
bf999a4f82 fixes broken alert eval when first condition is using OR
closes #9318
2017-12-13 13:37:10 +01:00
bergquist
dd3dd407ad removes unused property 2017-12-13 13:12:50 +01:00
bergquist
0b6169b3f5 removes verbose logging 2017-12-13 10:21:11 +01:00
Torkel Ödegaard
2465fcbd6b fix: FolderId and IsFolder when saving dashboard 2017-12-13 10:00:54 +01:00
Thibault Chataigner
fd633a1d5d Add a per-notifier ShouldNotify()
This way we are able to edit notification behavior per notifier.
This would be usefull to let some notifiers send notifications,
even when the state doesn't change, or with custom condition.

Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-12-12 17:35:54 +01:00
Torkel Ödegaard
67f1435dc7 minor fix for #10136 2017-12-12 17:18:25 +01:00
Torkel Ödegaard
05cc1f85c3 Merge branch 'refactor-user-group-to-team' of https://github.com/alexanderzobnin/grafana into user-group-to-team 2017-12-12 17:07:00 +01:00
Torkel Ödegaard
cafed8ce8f Merge branch 'master' into develop 2017-12-12 13:19:07 +01:00
Alfred Krohmer
72e686457c Add default message for Pushover notifications
If the message field is left empty for Pushover notifications, the API will return an error. This adds a default message if the message would otherwise be empty.

This fixes #8006.
2017-12-11 22:14:38 +01:00
Alexander Zobnin
26281dd9d8 refactor: format files by gofmt 2017-12-11 19:46:05 +03:00
Alexander Zobnin
5d3bfee2f1 refactor: user groups to teams, rename backend files 2017-12-08 18:51:59 +03:00
Alexander Zobnin
d8612380e9 refactor: rename User Groups to Teams 2017-12-08 18:25:45 +03:00
bergquist
0c5ef1453d fixes broken test 2017-12-08 11:33:15 +01:00
bergquist
5f5cdad97a improve error handling for datasources as cfg 2017-12-08 10:50:11 +01:00
bergquist
5aab6b5c20 removes last pieces of dashboard.json 2017-12-07 16:26:07 +01:00
bergquist
2e610cb256 dashboards as cfg: move dash/ds config files to /provisioning/* 2017-12-07 15:27:01 +01:00
bergquist
1dfa529941 dashboards as cfg: avoid walking fs in parallel 2017-12-07 15:27:01 +01:00
bergquist
b28ea0b407 dashboards as cfg: type 2017-12-07 15:27:01 +01:00
bergquist
099178466d dashboards as cfg: wire up dashboard repo 2017-12-07 15:27:01 +01:00
bergquist
288cc35529 dashboards as cfg: use gocache for caching 2017-12-07 15:27:01 +01:00
bergquist
f5eac2e91d dashboards as cfg: expose dashboard service as interface 2017-12-07 15:27:01 +01:00
bergquist
16f072b320 dashboards as cfg: move saving logic for dashboards into its own service 2017-12-07 15:27:01 +01:00
bergquist
9cebb23e01 dashboards as cfg: revert minor changes 2017-12-07 15:27:01 +01:00
bergquist
74e12c260f dashboards as cfg: move dashboard saving into its own service 2017-12-07 15:27:01 +01:00
bergquist
09cb0f378b dashboards as cfg: minor tweaks 2017-12-07 15:27:01 +01:00
bergquist
93e1d8a19c dashboards as cfg: make dashboard none editable by default 2017-12-07 15:27:01 +01:00
bergquist
7f3a7ea128 dashboards as cfg: more tests 2017-12-07 15:27:01 +01:00
bergquist
dc0fb8be06 dashboards as cfg: code cleanup 2017-12-07 15:27:01 +01:00
bergquist
d69b63cbc0 dashboards as cfg: read first cfg version 2017-12-07 15:27:01 +01:00
Torkel Ödegaard
beb9f8ee74 Merge remote-tracking branch 'origin/master' into develop 2017-12-07 14:14:50 +01:00
bergquist
35232a77e6 removes unused properties
the dsType property caused some confusion about what datasource is
beeing used. I just removed it since it not beeing used.

closes #10072
2017-12-05 08:26:43 +01:00
linux chips
6f3a62d299 add _tests for mssql data source 2017-12-03 21:56:21 +03:00
linux chips
c75f9a1923 MSSQL Data Source 2017-12-02 14:40:12 +03:00
Marcus Efraimsson
1e10fcad83 test: fix failing postgres test
Should use case insensitive matching when searching for users
2017-11-29 15:17:31 +01:00
Daniel Lee
554c7ba96f notifier: Fixes path for uploaded image for Slack notifier
Fixes #10012
2017-11-29 11:16:45 +01:00
Daniel Lee
4356e980f0 dashfolders: create app folder on dashboard import 2017-11-27 17:08:39 +01:00
Torkel Ödegaard
bc81298d4c worked on search 2017-11-24 16:18:56 +01:00
Torkel Ödegaard
b7a8db4937 Merge branch 'develop' of github.com:grafana/grafana into develop 2017-11-22 14:51:53 +01:00
Daniel Lee
3dc2e06a33 dashboard: fix test for folderIds 2017-11-21 16:41:08 +01:00
Torkel Ödegaard
9fc22e5a66 Merge branch 'master' of github.com:grafana/grafana into develop 2017-11-21 16:05:18 +01:00
Torkel Ödegaard
ccbdb29f07 fixed unit tests 2017-11-21 11:53:56 +01:00
Torkel Ödegaard
0d12b37dfd fix: alert list panel now works correctly after adding manual annotation on dashboard, fixes #9951 2017-11-21 11:28:17 +01:00
Torkel Ödegaard
fc1d8416a7 working on dashboard search 2017-11-20 12:47:03 +01:00
Tom Wilkie
0015183a7b Don't import JSON dashboards from hidden directories. 2017-11-17 17:21:49 +00:00
Torkel Ödegaard
7b17d134fc Merge branch 'develop' of github.com:grafana/grafana into develop 2017-11-17 15:49:47 +01:00
Torkel Ödegaard
0e44fe082b Merge branch 'master' into develop 2017-11-17 15:49:17 +01:00
Daniel Lee
7c74111187 search: add expanded folders 2017-11-17 15:30:21 +01:00
Torkel Ödegaard
98b4074c16 refactoring: minor refactor of clean up dashboard history PR #9882 2017-11-17 14:41:44 +01:00
Torkel Ödegaard
aaa465a100 Merge branch 'feat-9671' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-feat-9671 2017-11-17 14:16:49 +01:00
Alexander Zobnin
a55be07ea5 dashboard history clean up: avoid potential SQL injections 2017-11-17 10:51:50 +03:00
Daniel Lee
f47673ab5c search: refactor search sql into a builder class 2017-11-17 00:16:33 +01:00
Marcus Efraimsson
540d540ea9 fix: return id from api when creating new annotation/graphite annotation, fixes #9798
When creating a region annotation the response will include both
id (region start id) and endId (region end id), if not only id.
2017-11-16 16:19:01 +01:00
bergquist
87983021e2 datasources as cfg: convert yaml map into json for jsonData 2017-11-16 13:23:42 +01:00
bergquist
ebbfc529e0 datasource as cfg: support globbing 2017-11-15 14:30:32 +01:00
bergquist
0f136a940c datasource as cfg: enable editable ds's 2017-11-15 14:30:32 +01:00
bergquist
36676e23c1 datasource as cfg: adds readonly datasources 2017-11-15 14:30:32 +01:00
bergquist
c6a6ae261f datasource as cfg: refactor to use bus 2017-11-15 14:30:32 +01:00
bergquist
dc002abe4c datasource as cfg: test for reading all properties 2017-11-15 14:30:32 +01:00
bergquist
665df676a5 datasource as cfg: rename feature to provisioning 2017-11-15 14:30:32 +01:00
bergquist
0f29b8ac83 datasources as cfg: tests for insert/updating datasources 2017-11-15 14:30:32 +01:00
Alexander Zobnin
59d89e422b dashboard history clean up: add tests 2017-11-15 13:38:44 +03:00
Alexander Zobnin
a0a1f4aacd dashboard history: refactor after review 2017-11-15 13:36:36 +03:00
Torkel Ödegaard
1a3170373a Merge branch 'alertList-notOK' 2017-11-15 10:48:20 +01:00
Torkel Ödegaard
ba8c02f594 refactor: changed string slicing to strings.TrimPrefix, #9862 2017-11-15 10:48:03 +01:00
Alexander Zobnin
08e2bbef83 dashboard history: clean up dashboard version history 2017-11-14 18:22:18 +03:00
bergquist
3bb704144d teams: removes print statement 2017-11-14 11:05:01 +01:00
Anton Huck
fd2451823b Add Microsoft Teams notifier 2017-11-14 11:05:01 +01:00
Patrick O'Carroll
9ad186bcc9 not ok option to alert list, fixes: #9754 2017-11-13 10:30:11 +01:00
Furtchet
a51b1e8951 Update the config key to database_log_queries so it is more descriptive, as suggested in #9785. 2017-11-06 08:01:31 -06:00
Furtchet
5fdfa3ff7e MySQL Performance when using GF_DATABASE_URL
Set MaxIdleConn and MaxOpenConn when using the GF_DATABASE_URL configuration. Also added GF_DATABASE_DEBUG flag to print SQL statements and SQL execution times.
See #9784 for the details.
2017-11-03 14:05:32 -05:00
Torkel Ödegaard
9605ab4475 Merge branch 'master' into develop 2017-10-26 15:59:50 +02:00
Carl Bergquist
c91a1e994b Merge pull request #9594 from bergquist/datasources_optimistic_concurrency
datasources: change to optimistic concurrency
2017-10-25 12:44:36 +02:00
bergquist
d68bfaa8be datasource as cfg: typo 2017-10-25 12:21:06 +02:00
bergquist
da6430ac01 datasource as cfg: explain why cmd.version can be higher 2017-10-25 09:39:27 +02:00
bergquist
dea631bedc tech: remove rabbitmq event publisher
closes #9645
2017-10-24 14:10:23 +02:00
bergquist
2f35759346 asscoiate comment with name 2017-10-24 13:40:38 +02:00
bergquist
89923bf77a datasources: change to optimisic concurrency
prerequisite for #9504
2017-10-23 07:55:16 +02:00
Torkel Ödegaard
fff0fa2aee Merge branch 'master' into develop 2017-10-22 11:51:14 +02:00
Chris Chandler
204fe007b7 When Messasge field is set for an alert, map it to the output field in a Sensu check result. If Message is empty, send "Grafana Metric Condition Met" 2017-10-17 16:22:56 -05:00
Torkel Ödegaard
d8230f8fa7 Merge branch 'master' into develop 2017-10-17 11:17:28 +02:00
krise3k
45a572ebd8 annotations: quote reserved fields (#9550) 2017-10-17 11:03:19 +02:00
bergquist
ec14fa58b5 alerting: add count_non_null reducer
makes it possible to have a second condition requering
at least X points of data.
2017-10-13 09:47:10 +02:00
Torkel Ödegaard
88ceb19d96 Merge branch 'master' into develop 2017-10-12 16:32:44 +02:00
Carl Bergquist
b63725033e Merge pull request #9450 from utkarshcmu/kafka_alert
Kafka alerting
2017-10-12 12:11:13 +02:00
Torkel Ödegaard
81a4df1372 fix: alert api limit param did not work and caused SQL syntax error, fixes #9492 2017-10-12 10:22:53 +02:00
Torkel Ödegaard
9358d0c6f7 Merge branch 'develop' of github.com:grafana/grafana into develop 2017-10-11 16:48:30 +02:00
Torkel Ödegaard
ad1d69861e Merge branch 'master' of github.com:grafana/grafana into develop 2017-10-11 16:47:16 +02:00
Torkel Ödegaard
2bc57d856c fix: set lastSeenAt date when creating users to then years in past insteasd of empty date, fixes #9260 2017-10-11 11:29:17 +02:00
Daniel Lee
cd6a18ec62 search: fix search to limit dashboards better
Change the query to first select the dashboards, apply the limit then
join with tags. Means the limit will apply to the number of dashboards
returned in the search. The disadvantage is that the query will return
more rows than the limit, no. of dashboards x no. of tags. So hard limit
set to 5000 for all rows.
2017-10-10 20:56:05 +02:00
Alexander Zobnin
473c47cd1c snapshots: improve snapshot listing performance, #9314 (#9477)
exclude dashboard field from snapshot list search
2017-10-10 14:25:19 +02:00
utkarshcmu
da47dc8947 Fixed failing go tests 2017-10-09 18:56:05 -07:00
utkarshcmu
a562dc7c2b gofmt fixes 2017-10-09 18:27:04 -07:00
utkarshcmu
138bee99ef Added tests 2017-10-09 18:27:04 -07:00
utkarshcmu
d60339a9b1 Kafka REST Proxy works with Grafana 2017-10-09 18:27:04 -07:00
Torkel Ödegaard
647a3cc5ae Merge branch 'master' into develop 2017-10-09 16:01:54 +02:00
Anton Hvornum
08dc08550c Corrected a PostgreSQL SELECT statement. (#9460)
At least in my Postgresql 9.6.5, the old syntax of capitalized queries doesn't work (Linux).<br>
Running with UTF-8 as standard encoding and the ` notations didn't work either, so removed those.
2017-10-08 20:37:16 +02:00
Torkel Ödegaard
25aa9df270 Create annotations (#8197)
* annotations: add 25px space for events section

* annotations: restored create annotation action

* annotations: able to use fa icons as event markers

* annotations: initial emoji support from twemoji lib

* annotations: adjust fa icon position

* annotations: initial emoji picker

* annotation: include user info into annotation requests

* annotation: add icon info

* annotation: display user info in tooltip

* annotation: fix region saving

* annotation: initial region markers

* annotation: fix region clearing (add flot-temp-elem class)

* annotation: adjust styles a bit

* annotations: minor fixes

* annoations: removed userId look in loop, need a sql join or a user cache for this

* annotation: fix invisible events

* lib: changed twitter emoij lib to be npm dependency

* annotation: add icon picker to Add Annotation dialog

* annotation: save icon to annotation table

* annotation: able to set custom icon for annotation added by user

* annotations: fix emoji after library upgrade (switch to 72px)

* emoji: temporary remove bad code points

* annotations: improve icon picker

* annotations: icon show icon picker at the top

* annotations: use svg for emoji

* annotations: fix region drawing when add annotation editor opened

* annotations: use flot lib for drawing region fill

* annotations: move regions building into event_manager

* annotations: don't draw additional space if no events are got

* annotations: deduplicate events

* annotations: properly render cut regions

* annotations: fix cut region building

* annotations: refactor

* annotations: adjust event section size

* add-annotations: fix undefined default icon

* create-annotations:  edit event (frontend part)

* fixed bug causes error when hover event marker

* create-annotations:  update event (backend)

* ignore grafana-server debug binary in git (created VS Code)

* create-annotations: use PUT request for updating annotation.

* create-annotations: fixed time format when editing existing event

* create-annotations: support for region update

* create-annotations: fix bug with limit and event type

* create-annotations: delete annotation

* create-annotations: show only selected icon in edit mode

* create-annotations: show event editor only for users with at least Editor role

* create-annotations: handle double-sized emoji codepoints

* create-annotations: refactor

use CP_SEPARATOR from emojiDef

* create-annotations: update emoji list, add categories.

* create-annotations: copy SVG emoji into public/vendor/npm and use it as a base path

* create-annotations: initial tabs for emoji picker

* emoji-picker: adjust styles

* emoji-picker: minor refactor

* emoji-picker: refactor - rename and move into one directory

* emoji-picker: build emoji elements on app load, not on picker open

* emoji-picker: fix emoji searching

* emoji-picker: refactor

* emoji-picker: capitalize category name

* emoji-picker: refactor

move buildEmojiElem() into emoji_converter.ts for future reuse.

* jquery.flot.events: refactor

use buildEmojiElem() for making emojis, remove unused code for font awesome based icons.

* emoji_converter: handle converting error

* tech: updated

* merged with master

* shore: clean up some stuff

* annotation: wip tags

* annotation: filtering by tags

* tags: parse out spaces etc. from a tags string

* annotations: use tagsinput component for tag filtering

* annotation: wip work on how we query alert & panel annotations

* annotations: support for updating tags in an annotation

* linting

* annotations: work on unifying how alert history annotations and manual panel annotations are created

* tslint: fixes

* tags: create tag on blur as well

Currently, the tags directive only creates the tag when the
user presses enter. This change means the tag is created on
blur as well (when the user clicks outside the input field).

* annotations: fix update after refactoring

* annotations: progress on how alert annotations are fetched

* annotations: minor progress

* annotations: progress

* annotation: minor progress

* annotations: move tag parsing from tooltip to ds

Instead of parsing a tag string into an array in the annotation_tooltip
class, this moves the parsing to the datasources. InfluxDB ds already
does that parsing. Graphite now has it.

* annotations: more work on querying

* annotations: change from tags as string to array

when saving in the db and in the api.

* annotations: delete tag link if removed on edit

* annotation: more work on depricating annotation title

* annotations: delete tag links on delete

* annotations: fix for find

* annotation: added user to annotation tooltip and added alertName to annoation dto

* annotations: use id from route instead from cmd for updating

* annotations: http api docs

* create annotation: last edits

* annotations: minor fix for querying annotations before dashboard saved

* annotations: fix for popover placement when legend is on the side (and doubel render pass is causing original marker to be removed)

* annotations: changing how the built in query gets added

* annotation: added time to header in edit mode

* tests: fixed jshint built issue
2017-10-07 10:31:39 +02:00
Carl Bergquist
ab5bc1bf4a Merge pull request #9111 from eloo/feature/enhance_hipchat_card
Feature/enhance hipchat card
2017-10-05 16:11:04 +02:00
Joseph Weigl
6a030b2e8c Change empty string checks and improve logging 2017-10-05 16:00:55 +02:00
Carl Bergquist
6a20c28c8c Merge pull request #9399 from cglrkn/master
Update script to make it use OpsGenie's REST API
2017-10-05 09:56:27 +02:00
Cagla Arikan
5a3f32521e Fix formatting issue 2017-10-05 08:42:45 +03:00
Joseph Weigl
7284db0e54 Fix empty message and toolong attribute names
Use default state message if no message is provided by the user
Slice attribute name to maximum of 50 chars
2017-10-04 16:07:13 +02:00
cglrkn
548bc6b7c4 Add the missing comma 2017-10-04 10:15:39 +03:00
cglrkn
ef518f6ecd Build URL for close alert request differently 2017-10-03 15:13:05 +03:00
Matthew McGinn
be0d471467 properly parse & pass upload image bool from config 2017-10-02 23:18:48 -04:00
Matthew McGinn
122e2b5c42 break out slack upload into separate function 2017-10-02 20:48:35 -04:00
cglrkn
d8f6c73aab Update script to make it use OpsGenie's REST API
The script is making API calls to the deprecated OpsGenie Web API, we updated the script to make it use new OpsGenie's REST API.
2017-10-02 16:42:09 +03:00
Torkel Ödegaard
d38c891fac merge with master 2017-10-02 14:14:45 +02:00
Matthew McGinn
89ca4b247b fixing json for CI 2017-10-01 10:37:59 -04:00
Matthew McGinn
00726e93eb adding support for token-based slack file.upload API call for posting images to slack 2017-09-30 21:20:20 -04:00
Carl Bergquist
8a7f87b752 Merge pull request #9311 from ctrlok/ctrlok/pagerdutyinfo
Include triggering metrics to pagerduty alerts (pretty print)
2017-09-29 15:40:49 +02:00