Commit Graph

1037 Commits

Author SHA1 Message Date
Torkel Ödegaard
746d6cdc88 refactoring: changed name on compare command to make properties more explainatory 2017-06-05 23:29:25 +02:00
Torkel Ödegaard
cabbfe9adc refactoring: moved dashboard history item formating (message) and fixed dashboard history migration issue, and removed from frontend tests that where no longer needed 2017-06-05 22:59:04 +02:00
Torkel Ödegaard
c87418d060 refactoring: Dashboard history restore operation is now reusing existing
operations instead of duplicating a bunch of get & save logic.
2017-06-05 17:45:27 +02:00
Torkel Ödegaard
e18007153d refactoring: Renamed dashboard version queries that wrongly had Command suffix, added missing OrgId to dashboard history commands and queries 2017-06-05 16:34:32 +02:00
Torkel Ödegaard
f3980504e2 Merge branch 'master' into walmartlabs-master 2017-06-05 13:43:00 +02:00
Eirik Nygaard
1efdd92ae8 Update oauth2 lib (#8524)
* Update to latest oauth2 library using govendor

* Follow API changes
2017-06-05 10:09:27 +02:00
Tom Gardiner
4fe9935321 Add support for AWS/VPN metrics (#8528) 2017-06-04 14:24:04 +02:00
sanchitraizada
77c046aac6 Implement review feedback 2017-06-01 17:57:09 -04:00
Torkel Ödegaard
5e0b03928e Merge branch 'v4.3.x' 2017-05-29 10:49:02 +02:00
Torkel Ödegaard
0d39852ef4 fix: fixed test data fake metric query, fixes #8474 2017-05-29 10:48:38 +02:00
Dan Cech
8422697199 centralize oauth http calls, validate response status (#8470) 2017-05-26 14:35:32 +02:00
sanchitraizada
e6616cc551 Merge pull request #10 from walmartlabs/version-control
History and Version Control for Dashboard Updates
2017-05-25 14:50:47 -07:00
Ben Tranter
b6e46c9eb8 History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.

Goals

1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.

Usage

Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.

Overview of Changes

Backend Changes

- A `dashboard_version` table was created to store each dashboard
  version, along with a dashboard version model and structs to represent
  the queries and commands necessary for the dashboard version API
  methods.
- API endpoints were created to support working with dashboard
  versions.
- Methods were added to create, update, read, and destroy dashboard
  versions in the database.
  - Logic was added to compute the diff between two versions, and
  display it to the user.
  - The dashboard migration logic was updated to save a "Version
  1" of each existing dashboard in the database.

Frontend Changes

- New views
- Methods to pull JSON and HTML from endpoints

New API Endpoints

Each endpoint requires the authorization header to be sent in
the format,

```
Authorization: Bearer <jwt>
```

where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.

`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`

Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:

- `orderBy` String to order the results by. Possible values
  are `version`, `created`, `created_by`, `message`. Default
  is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from

`GET "/api/dashboards/db/:dashboardId/versions/:id"`

Get an individual dashboard version by ID, for the given
dashboard ID.

`POST "/api/dashboards/db/:dashboardId/restore"`

Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.

```json
{
  "dashboardId": <int>,
  "version": <int>
}
```

`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`

Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.

Dependencies Added

- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
  was added and vendored.
2017-05-24 19:14:39 -04:00
Dan Cech
007c08f2a8 remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests (#8418)
* remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests

* properly handle X-Forwarded-For
2017-05-24 13:39:40 +02:00
Daniel Parks
2d29d7b3d6 Add support for AWS DMS CloudWatch metric (#8458) 2017-05-24 13:24:24 +02:00
Torkel Ödegaard
b17a1ed557 playlist: fixed dashboard play ordering, fixes #7688 2017-05-24 13:21:43 +02:00
Torkel Ödegaard
c34db77f04 grafana_com: changed name of oauth grafana_net integration (old settings names still work), and updated login button look, closes #8415 2017-05-22 14:56:50 +02:00
Torkel Ödegaard
a0b9dcad4d alert: alerting annotation improvements, fixes #8421 2017-05-22 13:02:49 +02:00
Torkel Ödegaard
4ce0bf4d16 mysql: improved mysql data source, added test feature when adding data source, fixed cache issue 2017-05-11 10:50:24 +02:00
Daniel Lee
4a35126bf6 api: health check returns 503 if db is failing
ref #3302
2017-05-10 15:23:59 +02:00
Torkel Ödegaard
b042c53980 ux: updated heatmap icon 2017-05-03 08:56:51 +02:00
Mitja Z
c92d719a72 added support for listening on unix socket #4030 (#8221) 2017-04-27 08:54:21 +02:00
Torkel Ödegaard
19a04b7e4a change: minor change to health check api endpoint 2017-04-25 17:24:36 +02:00
Torkel Ödegaard
f6f2d85aa7 change: minor change to health check api endpoint 2017-04-25 17:24:06 +02:00
Torkel Ödegaard
368e847d12 feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
Torkel Ödegaard
b780415f25 fix: change to remember me cookie encoding 2017-04-25 15:33:15 +02:00
Daniel Lee
aee4af2148 api: omit unused fields for /api/datasources
Fixes #7822
2017-04-25 15:23:36 +02:00
Torkel Ödegaard
87c978ebc9 fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093 2017-04-25 13:16:41 +02:00
Dan Cech
b489e93d94 Config Array Syntax (#8204)
* refactor util encryption library so it doesn't have to import log

* add util.SplitString to handle space and/or comma-separated config lines

* go fmt
2017-04-25 09:14:29 +02:00
Torkel Ödegaard
c78c460f79 mysql: worked on mysql data soruce 2017-04-20 17:10:23 +02:00
Torkel Ödegaard
dbe5480edc create annotations work 2017-04-14 11:41:02 +02:00
Torkel Ödegaard
dbeeb32ab6 Merge branch 'master' into popover-forms 2017-04-13 16:22:08 +02:00
Torkel Ödegaard
593b2ef866 annotation: added region support to annoations 2017-04-12 16:26:34 +02:00
Torkel Ödegaard
0156a94a49 annotations: you can now read annoations via manually created annoation query 2017-04-12 15:46:41 +02:00
Torkel Ödegaard
8eb112d119 plugins: refactoring builtIn data source concept, now means data source plugins that you do not need to add via data sources page, that is automatically added as selectable data source, #8095 2017-04-12 08:23:44 +02:00
Torkel Ödegaard
e80494390a Merge branch 'always_displayed_datasources' of https://github.com/ctide/grafana into ctide-always_displayed_datasources 2017-04-12 07:44:59 +02:00
Mitsuhiro Tanda
d2bf2e86ed upgrade to aws-sdk-go v1.8.11 (#8091)
* upgrade to aws-sdk-go v1.8.11

* fix test
2017-04-12 06:40:44 +02:00
Chris Burkhart
d12dc2bfa7 Add alwaysDisplayed option to datasource plugins, this will allow it to show up as an option to select when adding queries to a panel without actually adding it as a datasource. 2017-04-11 13:47:53 -07:00
Torkel Ödegaard
07466b6725 security: fixed returning info on weither user exists or not in password reset call, fixes #7619 2017-04-11 16:50:16 +02:00
Alexander Zobnin
d553498a33 graph(add annotation): initial backend implementation #1286 2017-04-10 20:22:58 +03:00
Torkel Ödegaard
1cd632cc43 plugins: added state property to plugins 2017-04-07 12:00:03 +02:00
Torkel Ödegaard
d6d2080f11 mysql: minor progress on response processing 2017-03-31 11:45:25 +02:00
Torkel Ödegaard
bd4f073425 mysql: minor update 2017-03-30 20:23:40 +02:00
Torkel Ödegaard
8f90c6115d mysql: progress on mysql data source 2017-03-29 22:54:18 +02:00
Torkel Ödegaard
6965064ea9 Merge branch 'master' into sql-proxy 2017-03-29 16:40:14 +02:00
Seuf
319b8d8fca Configurable signout menu activation (#7968) 2017-03-29 11:33:28 +02:00
Daniel Lee
beb85f413a oauth: delete session key instead of set to empty
Adds the Delete function to the Session wrapper so that the Macaron
function for deleting keys from a Session can be used.

https://go-macaron.com/docs/middlewares/session#implement-provider-interface
2017-03-23 15:26:13 +01:00
Daniel Lee
79cef75fed Merge pull request #7426 from Altoros/altoros/authorization-errors
Add common type for oauth authorization errors
2017-03-23 15:25:35 +01:00
gomlgs
e99137598e Cloudwatch: Correctly obtain IAM roles within ECS container tasks. (#7892)
We now obtain credentials based on the container task's role
rather than just relying on the credentials of the enclosing
container instance.

Fixes #6700.
2017-03-22 07:15:19 +01:00
Torkel Ödegaard
970619ed52 Merge branch 'disable-login' 2017-03-20 11:18:41 +01:00
Mitsuhiro Tanda
a67497e679 add new s3 metrics (#7846) 2017-03-20 09:09:08 +01:00
Dan Cech
737c29ec8c disable inviting new users to orgs if login form is disabled 2017-03-17 16:35:05 -04:00
Daniel Lee
9efb6e76e9 users: adds search and pagination (#7753)
ref #7469. Follow up change that adds proper paging with 50 results
per page as well as a search box to search by name, login or email.
2017-03-07 16:03:54 +01:00
Mitsuhiro Tanda
b387a8759e use session.NewSession() (#7745) 2017-03-06 21:08:16 +01:00
bergquist
03354bc49a tech: replace context.TODO with background ctx 2017-02-24 09:20:28 +01:00
Daniel Lee
96a3ed0ac3 docs: new /api/users/search route
ref #7469. Description of new route that
adds paging for the users list.
2017-02-21 16:09:15 +01:00
bergquist
70b36a02af Revert "tech: use context package over xperimental version"
This reverts commit 99f1c30071.
2017-02-20 22:04:51 +01:00
bergquist
99f1c30071 tech: use context package over xperimental version 2017-02-20 21:44:15 +01:00
bergquist
5174d050f2 middlware: change org when url contains orgid
closes #6948
ref #1613
2017-02-17 15:02:14 +01:00
bergquist
12f1ea71fd chore: delete empty test 2017-02-17 12:07:46 +01:00
bergquist
cf871b1284 http: close http server gracefully. 2017-02-17 10:33:47 +01:00
Roman Vynar
4fcd5eab29 Add advanced TLS settings to harden setup. (#7347)
* Hardcoded the most secured TLS options.
2017-02-15 14:29:20 +01:00
Torkel Ödegaard
902cf5f889 fix(): google analytics fix 2017-02-15 14:26:57 +01:00
Jan Garaj
79cd48f64c Cloudwatch AWS/SES metrics (#7568) 2017-02-15 08:12:24 +01:00
Daniel Lee
193d468ed3 admin: adds paging to global user list
Currently there is a limit of 1000 users in the global
user list. This change introduces paging so that an
admin can see all users and not just the first 1000.

Adds a new route to the api - /api/users/search that
returns a list of users and a total count. It takes
two parameters perpage and page that enable paging.

Fixes #7469
2017-02-13 12:59:36 +01:00
Carl Bergquist
7f4f38e773 Merge pull request #7519 from huydx/master
(feat) support datasource delete by name api
2017-02-10 15:53:34 +01:00
huydx
143cbe921f (feat) support datasource delete by name api 2017-02-10 23:30:14 +09:00
Dan Cech
b22881c717 redirect user to requested url after login via oauth 2017-02-09 14:01:53 -05:00
Daniel Lee
2b2368b189 Merge pull request #7491 from grafana/sorting-datasources
Sorting datasources with case insensitive order
2017-02-08 12:01:31 +01:00
Daniel Lee
fbc3c3dd32 api: removes import alias + some unused fields 2017-02-08 11:57:05 +01:00
Daniel Lee
cbd1455c42 fix(api): case insensitive sort for datasources
The data source list is case sensitive when sorted. This changes the
sort to be case insensitive. The test only tests the handler, not the
routing or database query.
2017-02-07 22:15:52 +01:00
bergquist
9ece10ef24 style(dataproxy): simplify expression 2017-02-07 11:03:57 +01:00
Mitsuhiro Tanda
69566a23fc improve security of Prometheus datasource 2017-02-06 23:10:10 +09:00
Alexander Menzhinsky
30c334a2b8
Add common type for oauth authorization errors 2017-02-01 16:42:59 +03:00
Torkel Ödegaard
01f1c1b8dc feat(): began refactoring PR #5364 2017-01-31 17:10:27 +01:00
Torkel Ödegaard
8a95c563bb Merge branch 'master' into websocket 2017-01-31 08:56:49 +01:00
Torkel Ödegaard
c400b5cf63 Merge branch 'master' of github.com:grafana/grafana 2017-01-31 07:48:44 +01:00
Torkel Ödegaard
1a9aaa4138 feat(server side png rendering): added timezone parameter for server side rendering, refactoring PR #7264 2017-01-31 07:48:10 +01:00
Torkel Ödegaard
830491fa66 Merge branch 'time-offset-to-image' of https://github.com/ryu1-sakai/grafana into ryu1-sakai-time-offset-to-image 2017-01-31 06:28:54 +01:00
Pavlos Daoglou
3e741315b4 [3743] Adds support for user search based on login or email (#7334)
* [3743] Adds support for user search based on login or email

* Use query parameter instead

* Use macaron Query() instead
2017-01-31 06:25:55 +01:00
Oleksandr Kushchenko
edba465a75 add DeliveryStreamName dimension to AWS/Firehose Cloudwatch namespace (#7388) 2017-01-28 08:30:57 +01:00
Torkel Ödegaard
2f4da15264 fix(http api): throw validation error if missing property in call to /api/admin/users/123/permissions, #7365 2017-01-26 08:54:51 +01:00
Torkel Ödegaard
40d39f8a3e refactor(): renaming alerting hide ui option, #7318 2017-01-25 13:32:26 +01:00
Torkel Ödegaard
fee4846429 Merge branch 'alerting_ui' of https://github.com/smalik03/grafana into smalik03-alerting_ui 2017-01-25 13:16:48 +01:00
smalik
9862c9ff40 feat(alerting): Show/hide alerting UI using configuration variable
Use configuration variable "show_alerting_ui" to show/hide alerting UI
2017-01-20 10:43:29 -05:00
bergquist
e78da57e4d feat(alerting): shows when no_data triggered alerts
closes #7035
ref #7257
2017-01-17 09:49:25 +01:00
bergquist
d4a96b9741 tech(dataproxy): make the code a little bit more defensive 2017-01-16 12:24:08 +01:00
bergquist
dd84fb563a style(dataproxy): renames log functions 2017-01-16 12:23:49 +01:00
bergquist
51bca7d84b tech(dataproxy): moves all parameters to Info call 2017-01-16 12:16:41 +01:00
bergquist
839eb97061 Merge branch 'feature/dataProxyAuditLog' of https://github.com/Ricky-N/grafana into Ricky-N-feature/dataProxyAuditLog 2017-01-16 12:02:43 +01:00
Ryuichi Sakai
1bc55a2d38 Enable image rendering to use browser time offset 2017-01-15 22:01:28 +09:00
Carl Bergquist
1efeaafdbf Merge pull request #7249 from grafana/alerting_test_alertrule
Enable error and no_data overrides when testing alerting.
2017-01-13 15:18:02 +01:00
Torkel Ödegaard
d354f3a8af fix(alerting): fixed evaluation for no_value condition, fixes #7244 (#7247)
* fix(alerting): fixed evaluation for no_value condition, fixes #7244

* feat(alerting): moving null library into grafana, fixing handling on no value / no series
2017-01-13 12:32:30 +01:00
bergquist
0873d493c2 feat(alerting): moves getNewState to evalHandler
closes #7149
2017-01-13 11:02:24 +01:00
Ricky Niemi
269d16301a Rename to audit logging to data proxy logging 2017-01-11 07:40:06 -08:00
Ricky Niemi
0fee7c863a Gate data proxy audit logging behind audit_logging server setting 2017-01-11 07:22:57 -08:00
Ricky Niemi
d9cbb994b8 Clean up audit log formatting and code 2017-01-10 11:42:03 -08:00
Ricky Niemi
d03977ac0e Add initial audit logging to data proxy 2017-01-09 22:59:43 -08:00
Torkel Ödegaard
31bd725559 Merge branch 'notifier-refactor' 2017-01-06 12:17:34 +01:00
Mitsuhiro Tanda
dfaefe34a4 add cloudwatch region (#7161) 2017-01-06 12:05:27 +01:00
Torkel Ödegaard
b8f559aecb feat(plugins): made notifiers more pluggable and easier to support many of them, new ones can now be added without modifying any existing file, #7162 2017-01-06 12:04:25 +01:00
bergquist
9a3e51894b tech(alerting): remove unused property 2017-01-03 08:11:17 +01:00
Mitsuhiro Tanda
9855ea8c6c handle sts error (#7088) 2016-12-30 16:59:06 +01:00
Kerim Satirli
48b57afe84 Adds London and Canada AWS Regions 2016-12-27 14:25:12 +01:00
Torkel Ödegaard
fad07f0d15 refactor(http): refactoring http server 2016-12-21 14:36:32 +01:00
Torkel Ödegaard
8bccbdafd2 feat(live): minor progress on stream manager 2016-12-21 09:16:29 +01:00
Torkel Ödegaard
b7827962dc feat(live): just wanted to checkout how far I got on the websocket data source 2016-12-20 16:09:04 +01:00
Utkarsh Bhatnagar
13c4ce68ee Added name and id in response of create/update (#7016) 2016-12-20 13:02:26 +01:00
bergquist
a230ff65a9 fix(alerting): typo 2016-12-19 16:44:59 +01:00
Carl Bergquist
9135abf3ae Merge pull request #6996 from bergquist/pause_all_alerts
Pause all alerts
2016-12-19 16:38:44 +01:00
bergquist
6c2c3c7e24 Revert "fix(alerting): pause dto can only pause one"
This reverts commit b2c5a6a037.
2016-12-19 16:07:55 +01:00
bergquist
b2c5a6a037 fix(alerting): pause dto can only pause one 2016-12-19 16:05:24 +01:00
bergquist
a2257ec3d0 tech(alerting): renames pause all method 2016-12-19 15:17:49 +01:00
bergquist
ecdf1888c4 feat(alerting): removes pause per datasource 2016-12-19 13:24:45 +01:00
bergquist
4ef95cfd31 style(api): reduce code complexity 2016-12-16 16:07:23 +01:00
bergquist
1f8f3ed038 style(api): extracts filter logic for mass pause 2016-12-16 15:19:13 +01:00
bergquist
fb6aa0e026 feat(api): adds endpoint for mass pausing alerts
ref #6589
2016-12-16 15:00:58 +01:00
Mitsuhiro Tanda
81394fcaa4 add cloudwatch internal metrics (#6990) 2016-12-16 10:48:05 +01:00
Mitsuhiro Tanda
f8d6902428 fix cloudwatch percentile (#6989) 2016-12-16 10:47:41 +01:00
Torkel Ödegaard
8fc6e4cfb0 fix(auth proxy, ldap): fixed so users cannot change password when ldap or auth proxy is enabled, fixes #2495, do not allow user to change email or username depending on what property auth proxy is using, fixes #6903 2016-12-14 22:19:25 +01:00
Torkel Ödegaard
330c1b945e refactor(datasource): refactoring datasource secure json fields handling, #6697, #6692 2016-12-14 21:06:10 +01:00
huydx
adb441e5c8 (format) run go fmt in pkg 2016-12-14 12:17:38 +09:00
bergquist
96e8ecfa7b feat(cli): adds command to reset admin password
closes #5479
2016-12-09 15:25:02 +01:00
Torkel Ödegaard
22bf6420f1 Merge branch 'master' of github.com:grafana/grafana 2016-12-08 10:25:26 +01:00
Torkel Ödegaard
05772b30d7 feat(ux): completed work on getting started panel, #6466 2016-12-08 10:25:05 +01:00
Torkel Ödegaard
dee6b7d150 Merge branch 'master' into getting-started-panel 2016-12-08 08:51:40 +01:00
bergquist
8ee85626f2 fix(api): return correct json info after updating datasource
closes #6869
2016-12-07 18:09:17 +01:00
Carl Bergquist
2c7adccf12 Use cache for http.client in tsdb package. (#6833)
* datasource: move caching closer to datasource struct

* tsdb: use cached version of datasource http transport

closes #6825
2016-12-07 11:10:42 +01:00
Mitsuhiro Tanda
be26c017f6 (cloudwatch) percentile support (#6634)
* support extended statistics

* handle different response format for extended statistics
2016-12-06 08:12:30 +01:00
stuart nelson
9ed21c6a16 Add transport cache for reverse proxy (#6776)
* Add transport cache for reverse proxy
* Use updated at in cache
2016-12-02 15:39:28 +01:00
Carl Bergquist
3c662ade8c Merge pull request #6698 from grafana/cloudwatch_configurable_keys
Cloudwatch configurable keys from config page.
2016-11-29 23:37:13 +01:00
Carl Bergquist
f6557f14b7 Merge pull request #6741 from dpavlos/fix_5443
[5443] Check if title is empty before save a new dashboard
2016-11-29 21:22:07 +01:00
Carl Bergquist
5a0fc434f3 Merge pull request #6722 from dpavlos/fix_6679
[6679] Check if org exists before delete it
2016-11-29 21:12:02 +01:00
bergquist
360516ed41 feat(metrics): change active alerts to guage 2016-11-29 16:46:25 +01:00
Pavlos Daoglou
7f7f080ad8 [5443] Check if title is empty before save a new dashboard 2016-11-29 12:25:20 +02:00
Pavlos Daoglou
0064331bbf [6679] Check if org exists before delete it 2016-11-28 00:09:01 +02:00
bergquist
7bc1c3cc1c feat(cloudwatch): make it possible to reset keys
closes #6697
2016-11-24 16:37:33 +01:00
bergquist
3d21f06d5b tech(cloudwatch): store keys in secure json blob 2016-11-24 14:16:52 +01:00
bergquist
0ea6537916 tech(cloudwatch): refactoring 2016-11-24 14:00:05 +01:00
bergquist
f7e12e5f93 test(cloudwatch): fixes failing tests 2016-11-24 14:00:05 +01:00
bergquist
64784db870 feat(cloudwatch): adds access and secret key to edit config page 2016-11-24 14:00:05 +01:00
Daniel Lee
0618122bcd feat(httpsettings): add tls auth option
- Three text areas where the user can paste
in the CA Cert (optional), Client Cert
and Client Key.

- Tooltips for Auth checkboxes with brief
descriptions of what With Credentials and
With CA Cert are.

- Adds popover for TLS Auth header too.

- Aligns gf-form elements as labels and
checkboxes were not aligned before.

- Makes CA Cert optional as it is only
needed for self-signed certs.
2016-11-24 13:33:28 +01:00
Daniel Lee
b6b53c0f4b fix(dataproxy): test with CA Cert 2016-11-24 13:22:25 +01:00
Daniel Lee
2893b25a05 feat(datasources): allow updating of tls certs
The tls files are stored as a json blob in the
SecureJsonData field. To update one file, the
json has to be fetched from the db first and
then updated with the cert file that has been
changed.

Also, a change to the dto with flags that are
used in the frontend to show if a file has
been uploaded. For example, if tlsClientKeySet
is set to true then means a file for the
client key is saved in the db. This is to
avoid sending any private data to the frontend.
2016-11-24 13:22:25 +01:00
Daniel Lee
387f8cc0c6 feat(dataproxy): TLS CA Cert for self-signed certs
For self-signed TLS Certificates, authentication
with InsecureSkipVerify set to false then this
error will occur:

x509: certificate signed by unknown authority

The solution is to allow the user to upload the
CA cert as well.
2016-11-24 13:22:25 +01:00
Daniel Lee
c9b2c694f1 refactor(dataproxy): TLS Client Auth
Use a SecureJsonData field for TLS
Client Auth instead of 3 new db
fields. Same model as used for
PluginSettings.

Saves and encrypts the pem file
content rather than just saving
the paths to the cert and key.
This allows for uploading from
the Edit Datasource page in
Grafana.
2016-11-24 13:22:25 +01:00
Joe Lanford
56b7e2dfaf Added support for TLS client auth for datasource proxies (#5801) 2016-11-24 13:22:25 +01:00
Torkel Ödegaard
2233938ba7 Merge branch 'master' into getting-started-panel 2016-11-24 13:17:22 +01:00
bergquist
421c1eed82 fix(dashboard): fixes bug when saving dashboards 2016-11-24 11:22:13 +01:00
Carl Bergquist
df2b2e3058 feat(alerting): validate alerts before saving dashboard (#6691)
ref #6576
2016-11-24 09:50:35 +01:00