Commit Graph

648 Commits

Author SHA1 Message Date
Domas 76df096791
Logging: Log frontend errors (#28073)
* basic frontend  Sentry integration

* backend endpoint to capture sentry events

* WIP!

* log user email for frontend logs

* remove debug logging

* lint fixes

* Fix type exports & property names

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* additional struct naming fix

* rename log endpoint, config section & interface

* add sentry sample rate to config

* refac to use EchoSrv

* log user id

* backend tests

* tests for SentryEchoBackend

* sentry echo backend tests

* CustomEndpointTransport tests

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update conf/defaults.ini

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* don't export unnecesasrily

* update go.sum

* get rid of Convey in tests, use stdlib

* add sentry config to sample.ini

* cleanup to set orig logging handler in test

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* PR feedback changes

* lock sentry version

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 12:29:43 +01:00
kay delaney b2dcf06b60
Backend: Adds route for well-known change password URL (#28788)
* Backend: Adds route for well-known change password URL

* Include 'dashboard/new' in backend routes

* Move index route handler registration out of "not logged in views" section

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-10 22:36:35 +00:00
kay delaney c4c5b2dc61
CloudWatch Logs queue and websocket support (#28176)
CloudWatch Logs queue and websocket support
2020-10-28 08:36:57 +00:00
Will Browne 1bee9f4168
Plugins: Track plugin signing errors and expose them to the frontend (#28219)
* first pass

* return list

* types and cleanup

* add to plugin page and add styles

* update comment

* update comment

* fix component path

* simplify error component

* simplify error struct

* fix tests

* don't export and fix string()

* update naming

* remove frontend

* introduce phantom loader

* track single error

* remove error from base

* remove unused struct

* remove unnecessary filter

* add errors endpoint

* Update set log to use id field

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* skip adding BE plugins

* remove errs from plugin + ds list

* remove unnecessary fields

* add signature state to panels

* remove unused code

* apply PR feedback

* update comment

* merge dto with model

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-23 16:45:43 +02:00
Kyle Brandt 44a795cb17
AlertingNG: remove warn/crit from eval prototype (#28334)
and misc cleanup
2020-10-16 12:33:57 -04:00
Pete Davids 65940c7726
Dashboard: Allow shortlink generation (#27409)
* intial frontend resolution/redirection logic

* backend scaffolding

* enough of the frontend to actually test end to end

* bugfixes

* add tests

* cleanup

* explore too hard for now

* fix build

* Docs: add docs

* FE test

* redirect directly from backend

* validate incoming uids

* add last_seen_at

* format documentation

* more documentation feedback

* very shaky migration of get route to middleware

* persist unix timestamps

* add id, orgId to table

* fixes for orgId scoping

* whoops forgot the middleware

* only redirect to absolute URLs under the AppUrl domain

* move lookup route to /goto/:uid, stop manually setting 404 response code

* renaming things according to PR feedback

* tricky deletion

* sneaky readd

* fix test

* more BE renaming

* FE updates -- no more @ts-ignore hacking :) and accounting for subpath

* Simplify code

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Short URLs: Drop usage of bus

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* ShortURLService: Make injectable

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Rename file

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add handling of url parsing and creating of full shortURL to backend

* Update test, remove unused imports

* Update pkg/api/short_urls.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add correct import

* Pass context to short url service

* Remove not needed error log

* Rename dto and field to denote URL rather than path

* Update api docs based on feedback/suggestion

* Rename files to singular

* Revert to send relative path to backend

* Fixes after review

* Return dto when creating short URL that includes the full url

Use full url to provide shorten URL to the user

* Fix after review

* Fix relative url path when creating new short url

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2020-10-14 12:48:48 +02:00
Will Browne ef22ff7315
Snapshots: Store dashboard data encrypted in the database (#28129)
* end 2 end

* fix import

* refactor

* introduce securedata

* check err

* use testify instead of convey

* cleanup test

* cleanup test

* blob time

* rename funcs
2020-10-13 10:19:42 +02:00
Sofia Papagiannaki 4acbcd7053
AlertingNG: POC of evaluator under feature flag. (#27922)
* New feature toggle for enabling alerting NG

* Initial commit

* Modify evaluate alert API request

* Check for unique labels in alert execution result dataframes

* Remove print statement

* Additional minor fixes/comments

* Fix lint issues

* Add API endpoint for evaluating panel queries

* Push missing renaming

* add refId for condition to API

* add refId for condition to API

* switch dashboard based eval to get method

* add from/to params to dashboard based eval

* add from/to params to  eval endpoint

Co-authored-by: kyle <kyle@grafana.com>
2020-10-12 21:51:39 +03:00
Ryan McKinley 2567e5202a
Live: remove admin pages, add alpha panel (#28101) 2020-10-08 08:42:15 -07:00
Ryan McKinley 726bb4477b
Live: cleanup and simple changes (#28028) 2020-10-04 23:53:52 -07:00
Carl Bergquist a28a2fba51
healthchecks should work regardless domain (#27981) 2020-10-02 07:14:26 +02:00
Carl Bergquist 6dc73a6712
add /healthz endpoint (#27536)
kuberentes (and Im sure other orchastrators does as well) support two
kind of checks. readiness checks and liveness checks. Grafanas current
`/api/health` endpoint requires database access which might not
always be required for the instance to be considered active.
2020-09-18 13:03:18 +02:00
Kamal Galrani f6c31c2e10
Fixes signup workflow and UI (#26263)
* fixes signup flow

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Update ForgottenPassword.tsx

* fixes build failure

* fixes build failure

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2020-09-07 18:24:46 +03:00
Arve Knudsen a2fbffe48a
Server: Add health check route (#26999)
* Server: Add health check route

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Server: Remove health check middleware

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-18 14:58:08 +02:00
Agnès Toulet 7a5464fe10
Chore: use Wrap for all admin API (#26673)
* Chore: use Wrap for all admin API

* API: fix admin tests
2020-07-29 18:00:14 +02:00
Ryan McKinley 339138d61a
Live: include a streaming event manager (#26537) 2020-07-27 00:26:16 -07:00
Arve Knudsen 41d432b5ae
Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
Carl Bergquist 703f728c0c
Dashboards: Make path to default dashboard configurable (#25595)
Closes #25463

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-06-22 18:00:39 +02:00
Marcus Efraimsson cc95754e0d
Provisioning: Adds support for enabling app plugins (#25649)
Adds support for enabling app plugins using provisioning. 

Ref #11409

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-06-22 17:49:13 +02:00
Torkel Ödegaard d6ed8c522c
Dashboard: Redirects for old edit & view panel urls (#25653) 2020-06-17 12:51:41 +02:00
Marcus Efraimsson c0f3b2929c
Backend plugins: Refactor to allow shared contract between core and external backend plugins (#25472)
Refactor to allow shared contract between core and external backend plugins 
allowing core backend data sources in Grafana to be implemented in same 
way as an external backend plugin.
Use v0.67.0 of sdk.
Add tests for verifying plugin is restarted when process is killed.
Enable strict linting for backendplugin packages
2020-06-11 16:14:05 +02:00
Arve Knudsen 07582a8e85
Chore: Fix various spelling errors in back-end code (#25241)
* Chore: Fix various spelling errors in back-end code
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>>
2020-06-01 17:11:25 +02:00
Emil Tullstedt 55c306eb6d
Refactor search (#23550)
Co-Authored-By: Arve Knudsen <arve.knudsen@grafana.com>
Co-Authored-By: Leonard Gram <leonard.gram@grafana.com>
2020-04-20 16:20:45 +02:00
Marcus Efraimsson 60e3437fc1
Backend plugins: Exclude plugin metrics in Grafana's metrics endpoint (#22857)
Excludes backend plugin metrics in Grafana's metrics endpoint
Adds /api/:pluginId/metrics endpoint for retrieving metrics
from backend plugin as Prometheus text-based exposition format.

Fixes #22814
2020-03-18 12:08:20 +01:00
Carl Bergquist ebc9549cbc
Add support for sending health check to datasource plugins. (#22771)
closes #21519
ref grafana/grafana-plugin-sdk-go#93
2020-03-13 12:31:44 +01:00
Marcus Efraimsson e6cec8dbdc
Backend plugins: Prepare and clean request headers before resource calls (#22321)
Moves common request proxy utilities to proxyutil package with
support for removing X-Forwarded-Host, X-Forwarded-Port,
X-Forwarded-Proto headers, setting X-Forwarded-For header
and cleaning Cookie header.
Using the proxyutil package to prepare and clean request
headers before resource calls.

Closes #21512
2020-03-03 11:45:16 +01:00
Marcus Efraimsson 0390b5601e
Backend plugins: Implement support for resources (#21805)
Implements initial support for resources using v0.14.0 of SDK.

Ref #21512
2020-01-31 11:15:50 +01:00
Leonard Gram 992b4b8adf
Licensing service (#19903)
* Licensing: supplies a service to handle licensing information

* Licensing: uses the license service further

Uses the license service instead of settings.isEnterprise:
- external team members
- saml
- usage stats

* Licensing: fixes broken tests due to new Licensing service dependency

* Licensing: fixes linting errors

* Licensing: exposes license expiry information to the frontend
2019-11-01 14:56:12 +01:00
Ryan McKinley 4d1b969a5c
GEL: include the expression count in the request (#20114) 2019-10-31 16:22:00 -07:00
Ryan McKinley 861eb72113 transform: add expressions to query editor (w/ feature flag) (#20072)
for use with gel which is not released yet.
2019-10-30 14:38:28 -04:00
Kyle Brandt 009d58c4a2
Plugins: Transform plugin support (#20036)
currently temporary separate http api
2019-10-29 12:22:31 -04:00
Marcus Efraimsson 771f21ed09 api: new v2 metrics query endpoint
Requests to endpoint will currently will error unless expressions feature flag is true.

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
2019-10-25 09:28:26 -04:00
Amarnath Karthi 74557a4c40 Dashboard: Allows the d-solo route to be used without slug (#19640)
Allows the d-solo route to be used with UID and without 
a slug.

Fixes #11617
2019-10-14 18:21:44 +02:00
Alexander Zobnin 494b4aaf88 LDAP: only show tab if LDAP is enabled (#19156)
* LDAP: add nav link only if ldap enabled

* LDAP: /admin/ldap required admin permissions
2019-09-17 10:27:55 +02:00
Dominik Prokop 97ff75732d
Routing: Update routing to require sign in on every route (#19118)
* Update routing to require sign in on every route

* Review update
2019-09-16 14:06:50 +02:00
gotjosh 7b7b95341e
LDAP: Allow an user to be synchronised against LDAP (#18976)
* LDAP: Allow an user to be synchronised against LDAP
This PR introduces the /ldap/sync/:id endpoint. It allows a user to be synchronized against LDAP on demand.

A few things to note are:

LDAP needs to be enabled for the sync to work
It only works against users that originally authenticated against LDAP
If the user is the Grafana admin and it needs to be disabled - it will not sync the information
Includes a tiny refactor that favours the JSONEq assertion helper instead of manually parsing JSON strings.
2019-09-13 16:26:25 +01:00
gotjosh 7c6dd1868b
LDAP: Add API endpoint to query the LDAP server(s) status (#18868)
* LDAP: Add API endpoint to query the LDAP server(s) status|

This endpoint returns the current status(es) of the configured LDAP server(s).

The status of each server is verified by dialling and if no error is returned we assume the server is operational.

This is the last piece I'll produce as an API before moving into #18759 and see the view come to life.
2019-09-04 15:29:14 +01:00
gotjosh 0cbbb43222
LDAP: Add API endpoint to debug user mapping from LDAP (#18833)
* Move the ReloadLDAPCfg function to the debug file

Appears to be a better suite place for this.

* LDAP: Return the server information when we find a specific user

We allow you to specify multiple LDAP servers as part of LDAP authentication integration. As part of searching for specific users, we need to understand from which server they come from. Returning the server configuration as part of the search will help us do two things:

- Understand in which server we found the user
- Have access the groups specified as part of the server configuration

* LDAP: Adds the /api/admin/ldap/:username endpoint

This endpoint returns a user found within the configured LDAP server(s). Moreso, it provides the mapping information for the user to help administrators understand how the users would be created within Grafana based on the current configuration.

No changes are executed or saved to the database, this is all an in-memory representation of how the final result would look like.
2019-09-03 18:34:44 +01:00
Marcus Efraimsson 964c2e722f
Snapshot: Fix http api (#18830)
(cherry picked from commit be2e2330f5)
2019-09-02 15:15:46 +02:00
Ryan McKinley 6335509a23 Annotations: use a single row to represent a region (#17673)
* SQLite migrations

* cleanup

* migrate end times

* switch to update with a query

* real migration

* anno migrations

* remove old docs

* set isRegion from time changes

* use <> for is not

* add comment and fix index decleration

* single validation place

* add test

* fix test

* add upgrading docs

* use AnnotationEvent

* fix import

* remove regionId from typescript
2019-08-16 10:49:30 +02:00
Marcus Efraimsson 8fd153edb7
API: Restrict anonymous user information access (#18422)
Existing /api/alert-notifications now requires at least editor access.
Existing /api/alert-notifiers now requires at least editor access.
New /api/alert-notifications/lookup returns less information than
/api/alert-notifications and can be access by any authenticated user.
Existing /api/org/users now requires org admin role.
New /api/org/users/lookup returns less information than
/api/org/users and can be access by users that are org admins,
admin in any folder or admin of any team.
UserPicker component now uses /api/org/users/lookup instead
of /api/org/users.

Fixes #17318
2019-08-12 20:03:48 +02:00
Sofia Papagiannaki dc9ec7dc91
Auth: Allow expiration of API keys (#17678)
* Modify backend to allow expiration of API Keys

* Add middleware test for expired api keys

* Modify frontend to enable expiration of API Keys

* Fix frontend tests

* Fix migration and add index for `expires` field

* Add api key tests for database access

* Substitude time.Now() by a mock for test usage

* Front-end modifications

* Change input label to `Time to live`
* Change input behavior to comply with the other similar
* Add tooltip

* Modify AddApiKey api call response

Expiration should be *time.Time instead of string

* Present expiration date in the selected timezone

* Use kbn for transforming intervals to seconds

* Use `assert` library for tests

* Frontend fixes

Add checks for empty/undefined/null values

* Change expires column from datetime to integer

* Restrict api key duration input

It should be interval not number

* AddApiKey must complain if SecondsToLive is negative

* Declare ErrInvalidApiKeyExpiration

* Move configuration to auth section

* Update docs

* Eliminate alias for models in modified files

* Omit expiration from api response if empty

* Eliminate Goconvey from test file

* Fix test

Do not sleep, use mocked timeNow() instead

* Remove index for expires from api_key table

The index should be anyway on both org_id and expires fields.
However this commit eliminates completely the index for now
since not many rows are expected to be in this table.

* Use getTimeZone function

* Minor change in api key listing

The frontend should display a message instead of empty string
if the key does not expire.
2019-06-26 09:47:03 +03:00
Alexander Zobnin a3a7916597
Auth: Logout disabled user (#17166)
* Feature: revoke user token when disabled

* Chore: fix linter error
2019-05-23 15:54:47 +03:00
Oleg Gaidarenko 9b7f9dd9be
LDAP: consistently name the LDAP entities (#17203) 2019-05-22 15:30:03 +03:00
Alexander Zobnin 2d03815770
Users: Disable users removed from LDAP (#16820)
* Users: add is_disabled column

* Users: disable users removed from LDAP

* Auth: return ErrInvalidCredentials for failed LDAP auth

* User: return isDisabled flag in user search api

* User: mark disabled users at the server admin page

* Chore: refactor according to review

* Auth: prevent disabled user from login

* Auth: re-enable user when it found in ldap

* User: add api endpoint for disabling user

* User: use separate endpoints to disable/enable user

* User: disallow disabling external users

* User: able do disable users from admin UI

* Chore: refactor based on review

* Chore: use more clear error check when disabling user

* Fix login tests

* Tests for disabling user during the LDAP login

* Tests for disable user API

* Tests for login with disabled user

* Remove disable user UI stub

* Sync with latest LDAP refactoring
2019-05-21 14:52:49 +03:00
Samuel 846b9327a5 LDAP: Added reload endpoint for LDAP config (#15470)
* 4843 - Added reload endpoint for LDAP config

closes #4843

* Refactor to make the reload work after master drifted
2019-05-03 14:53:07 +02:00
Ryan McKinley 013f1b8d19
App Plugins: support react pages and tabs (#16586) 2019-05-02 10:15:39 -07:00
Andrej Ocenas eb82a75668
Provisioning: Show file path of provisioning file in save/delete dialogs (#16706)
* Add file path to metadata and show it in dialogs

* Make path relative to config directory

* Fix tests

* Add test for the relative path

* Refactor to use path relative to provisioner path

* Change return types

* Rename attribute

* Small fixes from review
2019-04-30 13:32:18 +02:00
Andrej Ocenas 42b745a098
Provisioning: Add API endpoint to reload provisioning configs (#16579)
* Add api to reaload provisioning

* Refactor and simplify the polling code

* Add test for the provisioning service

* Fix provider initialization and move some code to file reader

* Simplify the code and move initialization

* Remove unused code

* Update comment

* Add comment

* Change error messages

* Add DashboardProvisionerFactory type

* Update imports

* Use new assert lib

* Use mutext for synchronizing the reloading

* Fix typo

Co-Authored-By: aocenas <mr.ocenas@gmail.com>

* Add docs about the new api
2019-04-25 09:06:44 +02:00
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
Daniel Lee 3b836c9c5f
Merge pull request #10996 from grafana/snapshot_permissions
Snapshot fixes and changes to snapshot list
2018-02-23 09:17:59 +01:00
Daniel Lee 7d9a9fa29c snapshots: change to snapshot list query
Admins can see all snapshots. Other roles can only see their own
snapshots.

Added permission check for deleting snapshots - admins can delete
any snapshot, other roles can delete their own snapshots or
snapshots that they have access to via dashboard permissions.
2018-02-21 13:39:08 +01:00
Marcus Efraimsson d68099bc4a dashboards: change api route for dashboard permissions
From /api/dashboards/id/:id/acl to /api/dashboards/id/:id/permissions
2018-02-21 11:42:54 +01:00
Marcus Efraimsson 892bdecb19 folders: folder permission api routes 2018-02-20 15:25:16 +01:00
Marcus Efraimsson ea7998ca8e folders: use new folder service in folder api routes 2018-02-20 13:57:32 +01:00
Marcus Efraimsson fce1e3f7f1 Merge branch 'master' into 10630_folder_api 2018-02-19 13:32:45 +01:00
Torkel Ödegaard fcaa8227a6
Dashboard acl query fixes (#10909)
* initial fixes for dashboard permission acl list query, fixes #10864

* permissions: refactoring of acl api and query
2018-02-14 15:04:26 +01:00
Torkel Ödegaard 8dd4d505ee Merge branch 'dashboard-search-permissions-filter' 2018-02-14 10:48:55 +01:00
Marcus Efraimsson cb8c82f7f6 Merge branch 'master' into 10630_folder_api 2018-02-12 15:14:41 +01:00
Marcus Efraimsson e1e0b5f951 teams: use orgId in all team and team member operations (#10862)
Also fixes issue in org users tests for postgres
2018-02-09 17:26:15 +01:00
Torkel Ödegaard 8e8f3c4332 dashboard and folder search with permissions 2018-02-08 17:11:01 +01:00
Marcus Efraimsson 04a9a650e7 folders: changes and updated tests after merging permissions and new url structure 2018-02-01 22:07:27 +01:00
Marcus Efraimsson b07ac3c054 Merge branch '7883_new_url_structure' into 10630_folder_api 2018-02-01 18:29:00 +01:00
Marcus Efraimsson ef90b3e49c Merge branch '7883_new_url_structure' into 7883_frontend_step2 2018-02-01 11:08:39 +01:00
Marcus Efraimsson b135df9a6c Merge remote-tracking branch 'upstream/master' into 7883_new_url_structure 2018-02-01 10:48:06 +01:00
Marcus Efraimsson 95d063621e dashboards: new route for deleting dashboards by uid 2018-01-31 18:40:54 +01:00
Marcus Efraimsson 57edf89033 dashboards: make scripted dashboards work using the old legacy urls
Scripted dashboards are still requested from /dashboard/script/scripted.js
#7883
2018-01-31 14:07:49 +01:00
Marcus Efraimsson a99331cdb9 dashboards: redirect from old url used to load dashboard to new url
If legacy backend routes (/dashboard/db/<slug> and /dashboard-solo/db/<slug>)
are requested we try to redirect to new routes with a 301 Moved Permanently
 #7883
2018-01-31 14:06:19 +01:00
Marcus Efraimsson fd59241e35 dashboards: revert adding api for retrieving uid by slug
Since we're already have possibility to get a dashboard by slug
it makes little sense to have a separate endpoint in api for
retrieving uid by slug.
#7883
2018-01-30 23:18:34 +01:00
Marcus Efraimsson 7ee691dc48 dashboards: api for retrieving uid by slug. #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 f08932b78a WIP: folder api. #10630 2018-01-30 10:53:28 +01: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
Daniel Lee ae69c96518 dashfolders: allow any signed in user to get list of teams 2018-01-09 14:44:36 +01: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
Daniel Lee 61ed0b0381 dashfolders: remove role requirements on dashboard routes
and rely on the permission system instead.
2018-01-09 14:44:36 +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 e136b7c286 dashfolders: /dashboards should render index page with a 200 OK 2017-12-14 11:30:57 +01:00
Torkel Ödegaard ccbd18006e ux: org user management changes 2017-12-13 13:16:44 +01:00
Alexander Zobnin d8612380e9 refactor: rename User Groups to Teams 2017-12-08 18:25:45 +03:00
Torkel Ödegaard 0e44fe082b Merge branch 'master' into develop 2017-11-17 15:49:17 +01:00
Torkel Ödegaard 303e3de488 fix: fix for avatar images when gzip is turned on, fixes #5952 2017-11-17 13:13:58 +01:00
Marcus Efraimsson 909601d6ab api: fix so that datasources functions returns Response 2017-11-16 16:29:05 +01:00
Marcus Efraimsson 89b27b35ba fix: Use Response as return type 2017-11-16 16:19:01 +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
Torkel Ödegaard 9605ab4475 Merge branch 'master' into develop 2017-10-26 15:59:50 +02:00
bergquist 9b6535cca1 alerting: only editors can pause rules
closes #9640
2017-10-24 11:01:08 +02:00
Daniel Lee b866383ec0 api: fix for dashboard version history 2017-10-16 14:09:52 +02:00
Torkel Ödegaard 48c8e4d627 fix: various fixes for new grid 2017-10-12 17:38:49 +02:00
Torkel Ödegaard 88ceb19d96 Merge branch 'master' into develop 2017-10-12 16:32:44 +02:00
Alexander Zobnin 04ea7efac9 annotations: add endpoint for writing graphite-like events (#9495)
* annotations: add endpoint for writing graphite-like events

* annotations: fix new line handling in tooltip

* annotations: support tags in prior to Graphite 0.10.0 format
2017-10-12 10:12:15 +02:00
Torkel Ödegaard 647a3cc5ae Merge branch 'master' into develop 2017-10-09 16:01:54 +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
Torkel Ödegaard 18337f610d Merge branch 'master' into develop 2017-09-22 08:42:07 +02:00
Torkel Ödegaard 41e01184aa Merge branch 'master' into develop 2017-09-18 12:32:29 +02:00
bergquist e3211f6e48 use route as span name 2017-09-18 11:08:58 +02:00
bergquist 9c30bf53cf introduce concept of named middleware 2017-09-14 14:26:32 +02:00
bergquist 6372e22180 migrate handlers to new register 2017-09-14 14:26:32 +02:00
bergquist 6d22a67a30 return /metrics before session middleware 2017-09-14 14:26:32 +02:00
bergquist d6b8c6a2d2 add graphite bridge that support delta counters 2017-09-14 14:26:32 +02:00
Torkel Ödegaard a38ded9e7e Merge branch 'master' into develop-newgrid-row-design2 2017-09-07 15:05:41 +02:00
Torkel Ödegaard 84d4958a3c plugin change: make interval, cache timeout & max data points options in plugin.json, remove query.options component feature, add help markdown feature and toggle for data sources 2017-08-31 14:05:52 +02:00
Torkel Ödegaard 4f9fbcc211 dataproxy: added caching of datasources when doing data proxy requests, #9078 2017-08-23 13:31:26 +02:00
Torkel Ödegaard 63424f9866 ux: more work on sidemenu 2017-08-15 14:49:12 +02:00
Torkel Ödegaard 1dab313ca3 Merge branch 'master' into develop 2017-08-14 10:30:36 +02:00
Torkel Ödegaard 3dc9d76b38 fix: viewer role fix, fixes #8976 2017-08-02 17:33:06 +02:00
Torkel Ödegaard 3066280216 added code from #8504, and #8021 2017-06-23 17:13:58 -04:00
Torkel Ödegaard e854fadb67 Merge branch 'master' into develop 2017-06-23 12:56:59 -04:00
Torkel Ödegaard be29357d22 fix: added missing url route for annotation state history delete, fixes #8660 2017-06-23 11:48:58 -04:00
Torkel Ödegaard 2257c1f874 dashboard acl work 2017-06-21 19:02:03 -04:00
Torkel Ödegaard aaf2a897b0 folders: changed api urls for dashboard acls 2017-06-19 18:11:30 -04:00
Torkel Ödegaard e0b9ba7554 refactoring renaming dashboard folder operations 2017-06-19 17:15:25 -04:00
Daniel Lee a861b1b9ba WIP: check permissions for delete/post dashboard 2017-06-12 23:05:32 +02:00
Daniel Lee 3913f16550 WIP: add permission check for GetDashboard 2017-06-12 16:48:51 +02:00
Daniel Lee 9eccb4e79f WIP: API - add dash permission 2017-06-12 15:49:09 +02:00
Daniel Lee fa18b0053d WIP: delete permission in API 2017-06-12 15:49:09 +02:00
Daniel Lee f1e1da39e3 WIP: get Dashboard Permissions
The guardian class checks if the user is allowed to get the
permissions for a dashboard.
2017-06-12 15:49:09 +02:00
Daniel Lee 552935031b WIP: API methods for add/remove members to user group 2017-06-12 15:49:09 +02:00
Daniel Lee 0a1df0905e WIP: add update user group command 2017-06-12 15:49:09 +02:00
Daniel Lee 233cd7af4a WIP: add user group search 2017-06-12 15:49:09 +02:00
Torkel Ödegaard ef1dfed0d8 dasboard_history: big refactoring of how the compare api looked, now a POST with a model for new & base version, refactored a simplified UI code as well, this was done to lay foundation to make it possible to do diff against current in browser unsaved version 2017-06-07 11:50:09 +02:00
Torkel Ödegaard 689e366f59 refactoring: updated api url routes so they do not conflict with slug route 2017-06-06 09:51:14 +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 f3980504e2 Merge branch 'master' into walmartlabs-master 2017-06-05 13:43:00 +02:00
sanchitraizada 77c046aac6 Implement review feedback 2017-06-01 17:57:09 -04:00
Torkel Ödegaard 0d39852ef4 fix: fixed test data fake metric query, fixes #8474 2017-05-29 10:48:38 +02: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
Torkel Ödegaard 0156a94a49 annotations: you can now read annoations via manually created annoation query 2017-04-12 15:46:41 +02:00
Alexander Zobnin d553498a33 graph(add annotation): initial backend implementation #1286 2017-04-10 20:22:58 +03:00
Torkel Ödegaard bd4f073425 mysql: minor update 2017-03-30 20:23:40 +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
Torkel Ödegaard 8a95c563bb Merge branch 'master' into websocket 2017-01-31 08:56:49 +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
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
Torkel Ödegaard fad07f0d15 refactor(http): refactoring http server 2016-12-21 14:36:32 +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 fb6aa0e026 feat(api): adds endpoint for mass pausing alerts
ref #6589
2016-12-16 15:00:58 +01:00
Torkel Ödegaard 22bf6420f1 Merge branch 'master' of github.com:grafana/grafana 2016-12-08 10:25:26 +01:00
bergquist 8ee85626f2 fix(api): return correct json info after updating datasource
closes #6869
2016-12-07 18:09:17 +01:00
Torkel Ödegaard fd512457d8 Merge remote-tracking branch 'origin/master' into getting-started-panel-css2 2016-11-18 16:31:54 +01:00
Torkel Ödegaard e3564d12a1 fix(404): fixed 404 page 2016-11-16 17:09:00 +01:00
Torkel Ödegaard fb57bf77da ux(getting started): progress on getting started panel and persited help flag states, #6466 2016-11-09 10:41:39 +01:00
bergquist b2d5b920f5 feat(alerting): allow editor to modify notifications
closes #6314
2016-10-19 08:01:31 +02:00
Torkel Ödegaard 4c26c55fea fix(api): minor change to how pause alert was done 2016-10-14 09:58:22 +02:00
Torkel Ödegaard c9d7eb0a7a feat(alerting): added clear history button to alert state history view, #6244 2016-10-14 09:33:42 +02:00
bergquist c6cf7647ff feat(alerting): pausing alerts requires alert id 2016-10-11 10:53:24 +02:00
bergquist 804797245d feat(alerting): make it possible to pause from alert tab 2016-10-11 08:40:38 +02:00
bergquist 264590a9c2 feat(alerting): add paused api endpoint 2016-10-10 14:26:09 +02:00
Torkel Ödegaard 7c339f0794 feat(alerting): show alertin state in panel header, closes #6136 2016-09-30 17:37:47 +02:00
Torkel Ödegaard 3ecd96e682 feat(testdata): lots of work on new test data data source and scenarios 2016-09-27 18:17:39 +02:00
Carl Bergquist d6a0ec85c4 Merge pull request #6111 from grafana/pluginreadme
allow non-admin users to view plugin readme
2016-09-22 19:51:47 +02:00
Dan Cech 2c3dd84ebb allow non-admin users to view plugin readme 2016-09-22 13:46:11 -04:00
Torkel Ödegaard 936146768f fix(snapshots): fixed issue with viewing embedded/solo/png panel from snapshot without login, fixes #3769 2016-09-22 11:46:58 +02:00
Torkel Ödegaard d60bd77658 feat(annotations): added support to show grafana stored annotations in graphs, #5982 2016-09-08 11:25:45 +02:00
bergquist d11bc57c37 feat(notifications): make it possible to send test alert notifications
closes #5847
2016-09-05 14:45:15 +02:00
bergquist 11a4ff0f8a feat(alerting): add basic UI for history in alert tab
ref #5850
2016-08-30 13:22:59 +02:00
bergquist 650a87dc05 feat(alerting): add alert history api endpoint
ref #5850
2016-08-30 09:32:56 +02:00
chrismartin0077 0050707134 feat(api) HEAD response, fixes #3854 2016-08-29 06:07:44 -07:00
bergquist 0cbedb4473 chore(api): remove commented endpoints 2016-08-22 16:56:28 +02:00
Torkel Ödegaard 7eb2d2cf47 feat(alerting): working on state management 2016-07-22 13:14:09 +02:00
Torkel Ödegaard 9e91aacd34 feat(alerting): progress on testing alerts 2016-07-21 10:29:11 +02:00
Torkel Ödegaard fb636344a6 feat(alerting): began work on testing alert rule from UI without having to save it 2016-07-20 16:13:36 +02:00
Torkel Ödegaard f13b869aa4 feat(alerting): work on alerting 2016-07-14 13:32:16 +02:00
Torkel Ödegaard 624cd6fc0a feat(alerting): cleanup, removed alert changes table and code 2016-07-13 11:58:55 +02:00
Torkel Ödegaard d9096110f8 Merge branch 'master' into alerting
Conflicts:
	pkg/api/dashboard.go
	pkg/models/dashboards.go
	pkg/services/sqlstore/dashboard.go
2016-07-11 18:28:07 +02:00
Torkel Ödegaard d44325affd feat(apps): progress on app dashboard imports 2016-07-08 09:35:06 +02:00
bergquist a18506e2e4 feat(alerting): changing notifications should require org admin 2016-06-20 11:32:55 +02:00
bergquist 0c5da9155f feat(alerting): only expose DTO info when requesting all notifications 2016-06-20 11:31:20 +02:00
bergquist 96e5ad3f5c Merge branch 'alerting' into alerting_notifications 2016-06-20 10:45:05 +02:00
bergquist dd8c3d0355 Merge branch 'master' into alerting 2016-06-20 10:44:48 +02:00
Torkel Ödegaard 9f9fca1e76 feat(datasource): added suggest urls for each data source, #4577 2016-06-17 13:35:29 +02:00
bergquist b035074613 tech(alerting): disable update state api 2016-06-16 17:02:45 +02:00
bergquist a0418da160 Merge branch 'alerting' into alerting_notifications 2016-06-16 16:49:16 +02:00
bergquist 8ec311ade4 Merge branch 'master' into alerting 2016-06-16 16:29:41 +02:00
bergquist b907ce341c feat(alerting): enables deletes for alert notifications 2016-06-16 15:21:44 +02:00
bergquist 7f767224af feat(alerting): basic support for creating and updating notifications 2016-06-16 14:29:20 +02:00
bergquist a3b7ea7704 feat(alerting): skeleton for alert notification configuration page 2016-06-16 08:16:16 +02:00
Torkel Ödegaard ec0b09450c Merge branch 'export-dashboard'
Conflicts:
	conf/defaults.ini
	pkg/setting/setting.go
	public/app/core/components/grafana_app.ts
	public/app/core/core.ts
	public/app/features/dashboard/dashboardCtrl.js
2016-06-16 08:06:43 +02:00
Torkel Ödegaard 0667d73660 Merge branch 'new-logger' into alerting_definitions
Conflicts:
	pkg/api/api.go
	pkg/setting/setting.go
2016-06-07 13:31:56 +02:00
Torkel Ödegaard 3dc7706c45 feat(loggin): improved http request panic handling 2016-06-07 10:05:10 +02:00
Torkel Ödegaard 34e17f7282 feat(alerting): requests looks to be working again 2016-06-06 17:11:46 +02:00
Torkel Ödegaard 70cb8400c3 feat(alerting): changed name of root Alerts nav item and page from Alerts to Alerting 2016-06-06 09:17:29 +02:00
Torkel Ödegaard f36a44c49a Merge branch 'master' into alerting_definitions
Conflicts:
	conf/defaults.ini
	pkg/api/dashboard.go
2016-06-06 08:43:01 +02:00
Torkel Ödegaard e0c6048820 feat(instrumentation): added gauge and http endpoint 2016-06-03 16:15:36 +02:00
Torkel Ödegaard 1a05ae2eaa feat(instrumentation): more work 2016-06-03 15:06:57 +02:00
bergquist 1686d86c3b Merge branch 'master' into alerting_definitions 2016-05-30 08:26:08 +02:00
Torkel Ödegaard e83d13848e Merge branch 'master' into export-dashboard
Conflicts:
	public/app/features/dashboard/submenu/submenu.ts
2016-05-26 14:22:22 +02:00
Mukesh 4038b4d17e Set active org through admin api (#5179) 2016-05-26 06:51:23 +02:00
Torkel Ödegaard ba6573af61 Merge branch 'master' into export-dashboard
Conflicts:
	public/app/features/dashboard/submenu/submenu.ts
2016-05-25 12:32:56 +02:00
bergquist 8c2b6b532d fix(preferences): fixes broken default home dashboard
closes #5167
2016-05-25 09:56:45 +02:00
Torkel Ödegaard 855e913bbd feat(dashboards): began work on dashboard list 2016-05-19 11:03:10 +02:00
bergquist 1fe2055743 tech(alerting): disable DEL for alert rules in the api 2016-05-10 15:02:11 +02:00
bergquist 1bb8bc58b8 feat(alerting): add parameteters for filtering alerts 2016-05-10 09:45:56 +02:00
bergquist 47070f2d1f chore(alerting): struct names and url refactoring 2016-05-09 11:25:21 +02:00
bergquist 27274f37e8 feat(alerting): update paths for alert state 2016-05-06 14:37:41 +02:00
Torkel Ödegaard bb6f4fff87 feat(export/import): minor progress 2016-05-03 16:40:21 +02:00
bergquist 743a6fa37c feat(alerting): add support for deleting alert rules 2016-05-02 16:07:19 +02:00
bergquist f442adca47 feat(alerting): adds api endpoints for alerts per dashboard and panel 2016-04-28 15:13:42 +02:00
bergquist ecfbc2edca feat(alerting): adds alert history page 2016-04-28 11:42:03 +02:00