Commit Graph

65 Commits

Author SHA1 Message Date
Sofia Papagiannaki
b5f0a5d5ca
Api: Readonly datasources should not be created via the API (#19006)
* Readonly datasources should not be created via the API

* Return correct `ReadOnly` value in GetDataSourceByName
2019-09-17 12:29:43 +03:00
Leonard Gram
3245227016 permissions: cleanup. 2018-10-17 15:58:52 +02:00
Leonard Gram
1329c70965 codestyle 2018-10-16 14:22:50 +02:00
Leonard Gram
ec9ed5c830 Removes unused code. 2018-10-11 13:52:23 +02:00
Leonard Gram
ccfcf02e33 Refactors ds permissions to a filter. 2018-10-10 14:25:57 +02:00
Torkel Ödegaard
162a95bff9 wip: going in circles 2018-10-01 19:31:03 +02:00
Torkel Ödegaard
b3c78f1265 wip: data source permissions hooks 2018-10-01 15:38:55 +02:00
Marcus Efraimsson
eb1b9405b2
return proper payload from api when updating datasource 2018-08-07 17:56:02 +02:00
Austin Winstanley
defb0396b7 Return a 404 when deleting a datasource through the API if it doesn't exist and add a test for it to confirm #12313 2018-06-22 21:15:36 -05:00
Julian Kornberger
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
Julian Kornberger
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
Dan Cech
c0ecdee375
rename Context to ReqContext 2018-03-07 11:54:50 -05:00
Dan Cech
338655dd37
move Context and session out of middleware 2018-03-06 18:16:49 -05:00
Marcus Efraimsson
909601d6ab api: fix so that datasources functions returns Response 2017-11-16 16:29:05 +01:00
bergquist
36676e23c1 datasource as cfg: adds readonly datasources 2017-11-15 14:30:32 +01:00
bergquist
d68bfaa8be datasource as cfg: typo 2017-10-25 12:21:06 +02:00
bergquist
89923bf77a datasources: change to optimisic concurrency
prerequisite for #9504
2017-10-23 07:55:16 +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
aee4af2148 api: omit unused fields for /api/datasources
Fixes #7822
2017-04-25 15:23:36 +02: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
huydx
143cbe921f (feat) support datasource delete by name api 2017-02-10 23:30:14 +09:00
Utkarsh Bhatnagar
13c4ce68ee Added name and id in response of create/update (#7016) 2016-12-20 13:02:26 +01:00
Torkel Ödegaard
330c1b945e refactor(datasource): refactoring datasource secure json fields handling, #6697, #6692 2016-12-14 21:06:10 +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
bergquist
7bc1c3cc1c feat(cloudwatch): make it possible to reset keys
closes #6697
2016-11-24 16:37:33 +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
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
a6918617ff feat(api): fixed minor issue with error message when trying to create duplicate datasource, fixes #6164 2016-10-01 16:41:27 +02:00
bergquist
1955defc43 fix(api): add missing jsonData field to dto
The field is available on the dto so I guess is should be used.
Otherwise we should remove the field rather then not setting it.

ref #5944
2016-09-01 17:21:13 +02:00
Torkel Ödegaard
34e17f7282 feat(alerting): requests looks to be working again 2016-06-06 17:11:46 +02:00
Torkel Ödegaard
b7d198793f refactor(): minor refactoring of #4455 2016-03-23 15:09:48 +01:00
Torkel Ödegaard
b2fe7e518f ux(): added specific fallback logos for plugin depending on type, polished layout selector style 2016-03-17 10:15:16 +01:00
Torkel Ödegaard
e4c0c39fbf ux(): began work on updating data source list to cards view 2016-03-15 20:29:35 +01:00
utkarshcmu
4fbff99186 Implemented GetDataSourceIdByName API 2016-03-10 01:31:10 -08:00
Torkel Ödegaard
dfaa6d8eb9 feat(plugins): a lot of work on #4298 2016-03-08 18:17:47 +01:00
utkarshcmu
f20f4d130b Pulled out the common code 2016-03-08 02:51:03 -08:00
utkarshcmu
1a39d93b4e Implemented GetDataSourceByName API 2016-03-08 01:54:10 -08:00
Torkel Ödegaard
c1e94e61d0 feat(apps): lots of more work on apps, changed app_plugin to app_settings in order to to confuse the app plugin model (definition) and app org settings 2016-01-10 21:37:11 +01:00
Torkel Ödegaard
ad94f99d57 refactor(apps): more WIP work on apps 2015-12-22 11:37:44 +01:00
Torkel Ödegaard
eacc46da6d feat(plugins): WIP on new apps concept 2015-12-21 23:09:27 +01:00
woodsaj
0903d5541b Merge branch 'master' of github.com:grafana/grafana into externalPlugin
Conflicts:
	pkg/api/api.go
	pkg/api/api_plugin.go
	pkg/api/datasources.go
	pkg/api/frontendsettings.go
	pkg/api/index.go
	pkg/plugins/models.go
	pkg/plugins/plugins.go
2015-12-22 00:23:24 +08:00
woodsaj
c35b51a268 refactor.
Rename externalPlugin to apiPlugin
Rename bundle to app
Move js, css, menuItem and staticRoot to be properties os App
Add "app" field to panel, datasource and api plugin models. If populated
then the plugin is only enabled if the specific app is enabled for the Org.
If app is "", then the plugin is enabled for all orgs and can't be disabled.
2015-12-17 23:53:58 +08:00
Torkel Ödegaard
5eab5dc47b feat(plugins): removed external plugins and bundle code, not ready for master yet, will revert this commit in seperate branch 2015-12-15 10:28:52 +01:00
Torkel Ödegaard
201f50b121 Merge branch 'master' into external-plugins
Conflicts:
	pkg/api/login.go
	public/app/core/routes/all.js
	public/app/core/table_model.ts
	public/app/panels/table/table_model.ts
	public/app/plugins/panels/table/editor.ts
	public/app/plugins/panels/table/table_model.ts
2015-12-14 17:28:57 +01:00
Mitsuhiro Tanda
6edd6c8f03 add with_credentials to datasource model 2015-12-09 14:44:28 +09:00
woodsaj
c4a0fe0234 add pluginBundle backend api methods and SQL storage 2015-12-03 23:43:55 +08:00
woodsaj
bd4cb549d6 add pluginBundle support
A plugnBundle is meta plugin that has a set of dependent plugins
to enable.  This commit includes a plugin.json for a default
"core" bundle that enables all of the shipped panels and datasources.
2015-12-03 15:52:37 +08:00
Torkel Ödegaard
f6772bb896 feat(plugins): began work on supporting having plugins outside grafana, for example in grafana data dir, next step is to be able to easily specify what plugins you waant to install 2015-11-19 12:55:13 +01:00