Commit Graph

399 Commits

Author SHA1 Message Date
Torkel Ödegaard 8b0dd4244b
Search: Fixes search limits and adds a page parameter (#16458)
* Search: Fixes search limits and adds a page parameter

This adds a page parameter to search api without adding
any major breaking change.

It does at an api validation error when trying to use
a limit beyond 5000. This is a breaking change. We could
remove this and have it only in the docs and describe that this
is a limit that grafana will apply silently.

Fixes #16049

* Fix: Corrected wrong array slice change

* Docs: minor docs fix

* Search: fixed folder tests

* Fixed: Moved limit to correct inner query

* Search: moving limit check and page check

* Search: limit in handler is no longer needed
2019-04-17 13:07:50 +02:00
Andrej Ocenas 2d7fc55df7
Provisioning: Do not allow deletion of provisioned dashboards (#16211)
* Unprovision dashboard in case of DisableDeletion = true

* Rename command struct

* Handle removed provision files

* Allow html in confirm-modal

* Do not show confirm button without onConfirm

* Show dialog on deleting provisioned dashboard

* Changed DeleteDashboard to DeleteProvisionedDashboard

* Remove unreachable return

* Add provisioned checks to API

* Remove filter func

* Fix and add tests for deleting dashboards

* Change delete confirm text

* Added and used pkg/errors for error wrapping
2019-04-10 13:29:10 +02: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
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
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 21d3d27452 teams: editors can't remove the last admin from a team. 2019-03-19 14:01:13 +01:00
Hugo Häggmark a90b3e331e config: updated feature toggle name 2019-03-19 13:59:39 +01:00
Leonard Gram 23231e6d51 teams: added delete team guard 2019-03-19 13:57:29 +01:00
Leonard Gram 8e7a8282c1 teams: removed feature toggle as it is already in middleware 2019-03-19 13:57:28 +01:00
Leonard Gram 2a88052c14 teams: can update team members permission. 2019-03-19 13:57:23 +01:00
Leonard Gram af4994ba16 teams: editor added as admin for created teams. 2019-03-19 13:57:22 +01:00
Leonard Gram 22e098b830 teams: editors can work with teams. 2019-03-19 13:57:22 +01:00
Leonard Gram c8c004095c permissions: broken out func for making creator admin. 2019-03-19 13:57:21 +01:00
Marcus Efraimsson 0cd5a6772d
feat(api): support list/revoke auth token in admin/current user api 2019-03-08 15:15:38 +01:00
Johannes Schill a81d5486b0 Viewers with viewers_can_edit should be able to access /explore (#15787)
* fix: Viewers with viewers_can_edit should be able to access /explore #15773

* refactoring initial PR a bit to simplify function and reduce duplication
2019-03-05 12:41:01 +01:00
Marcus Efraimsson 5638c67be8
org admins should only be able to access org admin pages 2019-03-04 15:51:18 +01:00
Marcus Efraimsson a29b99b96b
only editor/admin should have access to alert list/notifications pages 2019-03-04 15:48:07 +01:00
bergquist e163aadfe4 use authtoken for session quota restrictions
closes #15360
2019-02-12 15:10:55 +01:00
SamuelToh a7a964ec19 Added PATCH verb end point for annotation op
Added new PATCH verb annotation endpoint

Removed unwanted fmt

Added test cases for PATCH verb annotation endpoint

Fixed formatting issue

Check arr len before proceeding

Updated doc to include PATCH verb annotation endpt
2019-02-05 09:43:17 +10:00
Marcus Efraimsson cfd8eb5167
now /api/login/ping returns Response 2019-02-04 17:37:07 +01:00
Marcus Efraimsson 8764fb5aa6
inject login/logout hooks 2019-01-15 15:16:20 +01:00
supercharlesliu fb5c59c611 Add GET /api/users/:id/teams for orgAdmin 2018-11-19 17:08:10 +08:00
Marcus Efraimsson f560c3297e
Merge pull request #14034 from grafana/12550_team_preferences
Team preferences support
2018-11-15 07:35:10 -08:00
Torkel Ödegaard 480da34279 filter out alpha plugins in api call, fixes #14030 2018-11-15 11:10:47 +01:00
Marcus Efraimsson 5f9fecd254
feat: team preferences 2018-11-12 20:01:53 +01:00
Torkel Ödegaard dddbe62d6c Merge branch 'master' into react-panels-step1 2018-10-19 09:15:37 +02:00
Peter Holmberg ee0cc9bd77 Merge branch 'master' into data-source-instance-to-react 2018-10-16 12:14:11 +02:00
Torkel Ödegaard 8ba865bf57 Merge branch 'master' into react-panels-step1 2018-10-12 13:31:20 +02:00
Torkel Ödegaard 8c9939df72 Adds backend hooks service so extensions can modify index data 2018-10-12 11:26:42 +02:00
Torkel Ödegaard abef94b0da made it possible to have frontend code in symlinked folders that can add routes 2018-10-11 12:36:04 +02:00
Torkel Ödegaard 565edc1ed3 added setting top hide plugins in alpha state 2018-10-09 17:47:43 +02:00
Torkel Ödegaard b3c78f1265 wip: data source permissions hooks 2018-10-01 15:38:55 +02:00
Torkel Ödegaard 0e9a6dcedc Use datasource cache for backend tsdb/query endpoint (#13266)
fix: use datasource cache for backend datasources
2018-09-14 09:30:32 +02:00
Marcus Efraimsson beddfdd86b
add api route for retrieving teams of signed in user 2018-08-08 10:26:05 +02:00
David Kaltschmidt c6e9ffb168 Use url params for explore state
- putting state in the path components led to 400 on reload
- use `/explore?state=JSON` instead
2018-07-17 12:56:05 +02:00
Torkel Ödegaard 6286c31d4b refactoring: making api wrap public 2018-07-02 14:13:18 +02:00
Torkel Ödegaard 10e86eda69
fix: #12461 introduced issues with route registration ordering, adding plugin static routes before plugins package had been initiated (#12474) 2018-07-01 23:35:50 -07:00
Carl Bergquist 861af4cb97 Improve extensions build. (#12461)
* enable ee build on pr/master

* step1: of including group sync

* disable commit pinning for now

* fixes broken build

* enable team to ldap group sync

* avoid returning error for missing external handler

* services: allow routes to be added before http server start

* services: allows services to add their own migrations

* moves db migrations to ee code base

* build using master branch in ee

* disable enterprise build in .bra.toml

[skip ci]

* removes team sync extensions

* removes commented line
2018-07-01 07:01:43 -07:00
bergquist dbfafa1cb5 routing: allows routes to be added to existing groups
this enables services to add routing to ex /api
without causing conflicts.
2018-06-25 16:50:27 +02:00
David Kaltschmidt 0c45ee63a9 Guard /explore by editor role on the backend 2018-05-31 11:26:24 +02:00
Torkel Ödegaard 80d694d205
Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
Dan Cech 417db13efb Fix dashboard snapshot deletion (#12025)
* fix issue deleting dashboard snapshots by deleteKey, add dedicated endopoint for authenticated requests, update frontend, tests & docs.
2018-05-24 08:55:16 +02:00
Carl Bergquist 28f7b6dad1 Enable Grafana extensions at build time. (#11752)
* extensions: import and build

* bus: use predefined error

* enterprise: build script for enterprise packages

* poc: auto registering services and dependency injection

(cherry picked from commit b5b1ef875f905473af41e49f8071cb9028edc845)

* poc: backend services registry progress

(cherry picked from commit 97be69725881241bfbf1e7adf0e66801d6b0af3d)

* poc: minor update

(cherry picked from commit 03d7a6888b81403f458b94305792e075568f0794)

* ioc: introduce manuel ioc

* enterprise: adds setting for enterprise

* build: test and build specific ee commit

* cleanup: test testing code

* removes example hello service
2018-04-27 13:41:58 +02:00
Marcus Efraimsson 84d034c688
api: allow authenticated users to search current org users and teams
Any authenticated user of an organization should be able to
- search its organization's users
- search its organization's users
- retrieve a single user of its organization (this how it was
  implemented earlier)
2018-04-07 10:39:28 +02: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
Marcus Efraimsson 5fbfd67b94 dashboards: should be possible to browse dashboard using only uid
That is, the slug part of url should be optional.
Closes #11231
2018-03-13 21:06:25 +01:00
Daniel Lee 3f2c086e6f teams: removes quota on route
Got added by mistake a year ago.
2018-03-13 10:56:35 +01:00