Commit Graph

266 Commits

Author SHA1 Message Date
Marcus Efraimsson
54c9b11ae8
Fix importing plugin dashboards (#21501)
#21350 introduced a bug regarding import of plugin dashboards. 
This should fix this and add custom validation if not importing 
plugin dashboard and dashboard property is missing.

Ref #21350

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>
2020-01-15 12:10:02 +01:00
Arve Knudsen
d26075644c
ImportDashboardCommand: Validate JSON fields (#21350)
* ImportDashboardCommand: Validate JSON fields
2020-01-14 16:26:54 +01:00
Torkel Ödegaard
35679d4689
Logos: Refactoring a bit how logos are rendered (#21421) 2020-01-10 22:15:16 +01:00
Emil Tullstedt
d4e013fd44
NavLinks: Make ordering in navigation configurable (#20382)
The ordering of links in the navigation bar is currently based the order of the slice containing the navigation tree. Since Grafana supports adding more links to the navigation bar with `RunIndexDataHooks` which runs at the very end of the function this means that any link registered through a hook will be placed last in the slice and be displayed last in the menu. With this PR the ordering can be specified with a weight which allows for placing links created by extensions in a more intuitive place where applicable.

Stable sorting is used to ensure that the current FIFO ordering is preserved when either no weight is set or two items shares the same weight.
2019-11-15 09:28:55 +01:00
Arve Knudsen
0a2d5e16dd
pkg/api: Check errors (#19657)
* pkg/api: Check errors
* pkg/api: Remove unused function HashEmail
2019-10-08 18:57:53 +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
Marcus Efraimsson
5713048f48
Alerting: Improve alert rule testing (#16286)
* tsdb: add support for setting debug flag of tsdb query

* alerting: adds debug flag in eval context

Debug flag is set when testing an alert rule and this debug
flag is used to return more debug information in test aler rule
response. This debug flag is also provided to tsdb queries so
datasources can optionally add support for returning additional
debug data

* alerting: improve test alert rule ui

Adds buttons for expand/collapse json and copy json to clipboard,
very similar to how the query inspector works.

* elasticsearch: implement support for tsdb query debug flag

* elasticsearch: embedding client response in struct

* alerting: return proper query model when testing rule
2019-06-25 08:52:17 +02:00
Shavonn Brown
a20309d7d2
Feature: Parse user agent string in user auth token api response (#16… (#17504)
* Feature: Parse user agent string in user auth token api response (#16222)

* Adding UA Parser Go modules attempt (#16222)

* Bring user agent vals up per req

* fix tests

* doc update

* update to flatten, no maps

* update doc
2019-06-11 14:12:52 +02:00
Torkel Ödegaard
e1d408a66f
AddDataSource: Updated page design & categories (#16971)
* minor refactoring

* Added category

* Minor progress

* Progres

* Updated descriptions

* Added custom sort

* NewDataSource: progress

* Updated design

* NewDataSource: Updated design

* Updated link

* Feedback changes
2019-05-09 11:45:39 +02: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
Marcus Efraimsson
0cd5a6772d
feat(api): support list/revoke auth token in admin/current user api 2019-03-08 15:15:38 +01:00
Torkel Ödegaard
78ea7ae783
Merge pull request #15212 from grafana/dashboard-react-page
Dashboard react page
2019-02-07 14:23:44 +01:00
SamuelToh
4de9e3598b Address review comments 2019-02-06 06:41:39 +10: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
Torkel Ödegaard
70974c01f2 Added playlist controls to new react DashNav 2019-02-04 21:08:30 +01:00
Pavel Bakulev
6a8e39ba17 Added uid to AlertNotification json 2019-01-16 16:52:00 +02:00
Torkel Ödegaard
480da34279 filter out alpha plugins in api call, fixes #14030 2018-11-15 11:10:47 +01:00
Torkel Ödegaard
4dad8d946e Updated login page logo & wordmark and responsive behavior 2018-10-31 13:40:58 -07:00
bergquist
70385119bc removes d in disableResolvedMessage 2018-10-17 10:41:18 +02:00
Dave Waters
c4dcf5a4ee fix gofmt, add test, correct noted concerns with default value 2018-10-16 17:33:38 -04:00
Dave Waters
6376154b16 add channel option to disable the resolved alert (OK Message) that is sent when condition returns to normal. 2018-10-15 17:16:14 -04:00
Mario Trangoni
3689bb778c Fix misspell issues
See,
$ gometalinter --disable-all --enable misspell --deadline 10m --vendor ./...
pkg/api/dtos/alerting_test.go:32:13⚠️ "expectes" is a misspelling of "expects" (misspell)
pkg/api/static/static.go:2:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/components/imguploader/azureblobuploader.go:55:48⚠️ "conatiner" is a misspelling of "container" (misspell)
pkg/login/ldap_settings.go:51:115⚠️ "compatability" is a misspelling of "compatibility" (misspell)
pkg/middleware/auth_proxy_test.go:122:22⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/middleware/logger.go:2:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/notifications/codes.go:9:13⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/session/mysql.go:170:3⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/mysql.go:171:24⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:95:4⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:96:1⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:167:25⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/setting/setting.go:1:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:199:14⚠️ "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:270:15⚠️ "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/elasticsearch/response_parser.go:531:24⚠️ "Unkown" is a misspelling of "Unknown" (misspell)
pkg/tsdb/elasticsearch/client/search_request.go:113:7⚠️ "initaite" is a misspelling of "initiate" (misspell)

Note: Unknwon is a library name, and Destory a mysql typo.
2018-09-21 11:54:36 +02:00
Marcus Efraimsson
86bc462bc1
remove unnecessary conversion (metalinter) 2018-08-20 13:35:36 +02:00
Marcus Efraimsson
6d2136b853
Merge remote-tracking branch 'origin/master' into alerting_reminder 2018-08-20 13:29:30 +02:00
Torkel Ödegaard
b8724ae0c4
refactoring: enterprise build/hooks refactorings (#12478) 2018-07-02 04:33:39 -07:00
bergquist
6cd83e182a Merge branch 'master' into alerting_reminder
* master: (84 commits)
  docs: adds info about grafana-dev container
  changelog: add notes about closing #12282
  Added Litre/min and milliLitre/min in Flow (#12282)
  remove papaparse dependency
  list name is deleteDatasources, not delete_datasources
  remove internal influx ifql datasource
  Document the endpoint for deleting an org
  tests: rewrite into table tests
  influxdb: adds mode func to backend
  changelog: add notes about closing #11484
  changelog: add notes about closing #11233
  Remove import
  Fix PR feedback
  Removed papaparse from external plugin exports
  Karma to Jest: query_builder
  dsproxy: move http client variable back
  Karma to Jest: threshold_mapper
  Expose react and slate to external plugins
  Karma to Jest: threshold_manager
  Karma to Jest: query_def, index_pattern
  ...
2018-06-15 12:45:35 +02:00
Alexander Zobnin
4063ae37a4
dashboard: import to folder 2018-06-05 19:23:09 +03:00
bergquist
7333d7b8d4 alerting: invert sendOnce to sendReminder 2018-06-05 10:44:17 +02:00
bergquist
0c6d8398a1 alerting: remove zero units from duration 2018-06-05 08:42:39 +02:00
bergquist
93124f38fa alerting: only check frequency when not send once 2018-06-04 22:19:27 +02:00
bergquist
0e647db485 Merge branch 'master' into alerting_reminder
* master: (30 commits)
  changelog: add notes about closing #11882
  renamed variable in tests
  added comment, variableChange -> variableValueChange
  added a test
  added if to check if new variable has been added
  Gravatar fallback does not respect 'AppSubUrl'-setting (#12149)
  change admin password after first login
  changelog: adds note about closing #11958
  revert: reverted singlestat panel position change PR #12004
  Revert "provisioning: turn relative symlinked path into absolut paths"
  provisioning: turn relative symlinked path into absolut paths
  changelog: adds note about closing #11670
  elasticsearch: sort bucket keys to fix issue wth response parser tests
  docs: what's new in v5.2
  changelog: add notes about closing #11167
  docs: docker secrets support. (#12141)
  alerting: show alerts for user with Viewer role
  datasource: added option no-direct-access to ds-http-settings diretive, closes #12138
  provisioning: adds fallback if evalsymlink/abs fails
  tests: uses different paths depending on os
  ...
2018-06-04 17:44:18 +02:00
pari-
9680a3d44d Gravatar fallback does not respect 'AppSubUrl'-setting (#12149)
Closes #12148
2018-06-04 16:03:59 +02:00
John Baublitz
fca97535d1 Fix multiple bugs 2018-06-04 13:19:14 +02:00
John Baublitz
3cb0e27e1c Revert changes post code review and move them to notification page 2018-06-04 13:19:14 +02:00
John Baublitz
e068be4c26 Feature for repeated alerting in grafana 2018-06-04 13:19:13 +02:00
Marcus Efraimsson
770acee56a
new property for current user indicating if edit permissions in folders 2018-04-30 15:34:31 +02:00
Marcus Efraimsson
6bbeb723ca Merge branch 'master' into readonly_dashboards 2018-04-05 20:30:27 +02:00
bergquist
9e2e6fc586 add fallback for gravatar in org/admin view
closes #11095
2018-03-27 22:52:29 +02:00
bergquist
d6faa3d06f provisioning: improve UX when saving provisioned dashboards 2018-03-26 15:08:46 +02:00
Julian Kornberger
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
Marcus Efraimsson
ea7998ca8e folders: use new folder service in folder api routes 2018-02-20 13:57:32 +01:00
Marcus Efraimsson
cb8c82f7f6 Merge branch 'master' into 10630_folder_api 2018-02-12 15:14:41 +01:00
Marcus Efraimsson
55100d5ff9
Merge pull request #10760 from grafana/10749_link_to_folder
Fix link to folder from permissions list
2018-02-05 11:34:59 +01:00
Marcus Efraimsson
7d3b990e91 permissions: fix link to folder from permissions list
Also, closing Add Permissions CTA when DashboardPermissions and
FolderPermissions unmounts.
Fixes #10749"
2018-02-05 11:10:37 +01:00
Torkel Ödegaard
07fa2f1722
fix: alert list links did not work, changed dashboardUri to Url, this is breaking api change in alert api (#10756) 2018-02-05 09:42:41 +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
b135df9a6c Merge remote-tracking branch 'upstream/master' into 7883_new_url_structure 2018-02-01 10:48:06 +01:00
Daniel Lee
eb765d288c alertlist: disable pause button when user does not have permission 2018-01-30 23:35:27 +01:00