Commit Graph

13512 Commits

Author SHA1 Message Date
Eunice Kim
dc8874cd2e
GeoMap: Implement circle overlays (#36680) 2021-07-12 20:47:39 -07:00
Domas
32a551b4ca
Alerting: add toggle in Loki/Prom datasource config to opt out of alerting ui (#36552)
* wip

* fix useIsRuleEditable

* test for detecting editable-ness of a rules datasource

* tests!

* fix lint errors

* add alerting ui opt-out toggle to loki and prom datasources

* Apply suggestions from code review

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2021-07-12 15:06:09 -07:00
Domas
3ea8880d7f
Alerting: better detect cortex/loki ruler api (#36030)
* wip

* beter detect non existing rules stuff

* fix useIsRuleEditable

* test for detecting editable-ness of a rules datasource

* tests!

* fix lint errors
2021-07-12 14:10:13 -07:00
Marcus Andersson
d4e53a9be4
Plugins: adding possibility to install enterprise plugins if you have a valid license. (#36653) 2021-07-12 22:18:39 +02:00
Ivana Huckova
528fe90536
Explore: Fix running of log queries with shift-enter shortcut (#36600)
* Re-run query if we are running query fromo query row

* Fix imports in tests

* Change solution

* Dispatch clear cache
2021-07-12 17:54:17 +02:00
Torkel Ödegaard
863b412d54
Transformations: State feature (alpha/beta) and more (#36630)
* Adding plugin state feature to transforms

* initial help box

* New HelpBox component

* More progress

* Testing

* Removing HelpBox, simple new design, new active state for OperationRowAction

* Updated tests

* Fixed typing issue

* Removed AlphaNotice

* Made focus and enter key trigger OnClick and sorted transformations

* Fixed e2e tests
2021-07-12 16:42:04 +02:00
Tobias Skarhed
5e62bddd1d
BottomNavLinks: Accessible text for image and icon (#36650) 2021-07-12 16:15:40 +02:00
Ivana Huckova
3c1a9a9eae
Explore: Refactor QueryRow to use ConnectedProps (#36604)
* Refactor QueryRow

* Upddate import in test

* Simplify typing

* Add copy when loading instance
2021-07-12 15:30:24 +02:00
Zoltán Bedi
c02ead9113
Tracing: add way to configure trace to logs start and end time (#34995)
* Tracing: add way to configure trace to logs start and end time

* Use the span's time by default

* Update docs

* Update time inputs to use strings instead of number

* Support negative values as well

* Add info about using negative value

* Don't round up Loki range

* Update docs/sources/datasources/jaeger.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Wording for doc

* Round adjusted start and end time

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-12 11:25:41 +02:00
Torkel Ödegaard
6c5d0db255
Links: Fixes issue with some links causing full page reload (#36631) 2021-07-12 10:28:49 +02:00
Tobias Skarhed
b8fbe70c14
A11y: ARIA hide image/link duplicate in news panel (#36642)
* fix(a11y): Hide image/link duplicate

* fix: proper heading and time markup
2021-07-12 10:19:00 +02:00
Marcus Andersson
2fb385c192
Plugins: display enterprise plugins in the plugins catalog (#36599)
* displaying enterprise plugins in the list.

* added place holder for tests and removed unused code.

* added test for the browse page.

* added empty test file.

* added some more tests.
2021-07-12 09:49:01 +02:00
pricek
561ccf419c
Table: Add minimum column width field for auto resizing (#35351)
* TablePanel: Adds minimum column width field

The table panel uses virtual rendering of rows, which prevents resizing
based on the contents of a column. A minimum column width field
simulates this ability.

* Fixed indentation issue

* Updates the table panel documentation

Added the "Minimum column width" option to table panel docs and updated
the information for the "Column width" option in the docs.
2021-07-12 09:46:23 +02:00
Gábor Farkas
cc460110b1
influxdb: influxql: better tag-value filtering (#36570) 2021-07-12 07:55:10 +02:00
Torkel Ödegaard
c7d2d70799
DashboardList: Fix issue not re-fetching dashboard list after variable change (#36591) 2021-07-11 07:35:27 +02:00
Ryan McKinley
9ce6e2a664
Geomap: add initial openlayers alpha panel (#36188) 2021-07-09 17:53:07 +02:00
Ryan McKinley
44afe4a597
Testdata: generate data that can link to USA state codes (#36537) 2021-07-09 08:02:57 -07:00
Tobias Skarhed
56903582ce
QueryVariable: Default to first option when none is set (#36521)
* TemplateVariables: Default to first option when none is set

* Add test

* Add tests and rewrite logic
2021-07-09 12:55:56 +02:00
Dominik Prokop
663a8935f7
User analytics: Add Rudderstack integration (#36567)
* Replace analytics service with Echo backend

* Add Rudderstack integration and general pageview and interaction Echo events

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update packages/grafana-runtime/src/types/analytics.ts

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update conf/defaults.ini

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update tests

* Force cla check

Co-authored-by: Dan Cech <dcech@grafana.com>
2021-07-09 11:45:25 +02:00
Victor Cinaglia
a63c959ae9
Alerting: fix typo in delete dashboard modal prompt (#36270) 2021-07-09 09:58:49 +02:00
Marcus Andersson
52bd1eb1c5
Plugins: converted the plugins admin app to a core feature in grafana (#36026)
* moved the plugins admin to core and used the plugins toggle to decide which version to use.

* reverted change.

* changed so the library tab is the default one.

* fixing navigation.
#

* fixed so we have the proper header.

* including the core plugins

* fixed so we display logos for local plugins.

* fixed so we have a working version of plugin catalog.

* removed console logs.

* reverted changes.

* fixing failed test.
2021-07-08 17:50:42 +02:00
Josh Hunt
a2a1fa51f2
AzureMonitor: Resource Picker alignment/spacing tweaks (#35125) 2021-07-08 16:37:41 +02:00
Piotr Jamróz
9ace8686a1
Datasources: Improve error handling for testing data sources (#35120)
* Improve error handling for error messages

The error message will be read from error object from the following properties in the following order:
- message
- data.message
- statusText

* Convert api/ds/query errors to TestingStatus

SQL datasources (mysql, mssql, postgres) and CloudWatch use api/ds/query to test the data source, but previously didn't handle errors returned by this endpoint. If the error cannot be handled it's re-thrown to be handled in public/app/features/datasources/state/actions.ts

* Use async/await instead of Promises

* Remove incorrect type import

TestingStatus is in app/types. Should be pulled down to grafana/data but it depends on HealthCheckResultDetails that is public and lives in grafana/runtime. Ideally TestingStatus should live in grafana/data but I'm not sure if HealthCheckResultDetails can be move there too (?)

* Update packages/grafana-data/src/types/datasource.ts

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>

* Handle errors with no details in toTestingStatus instead of re-throwing

* Update packages/grafana-data/src/types/datasource.ts

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-07-08 14:32:27 +02:00
Josh Hunt
4c0acf335b
Grafana-UI: Refactor Checkbox to fix alignment issues (#36164)
* Grafana-UI: Fix Checkbox vertical layout issues

* reorganise css

* WIP for fixing checkboxes in manage dashboards

* Cleanup checkbox and fix issue in Dashboard manage page

* update tests
2021-07-08 14:09:58 +02:00
kay delaney
8d66db09bf
Timeseries Panel: Retain alerts when migrating from old graph (#36514)
Closes #36106
2021-07-08 10:47:32 +02:00
Dominik Prokop
7df0010412
TimeSeries panel: Allow adding annotations from the panel (#36220)
* First stab on UI for adding annotations in time series panel

* Extend panel context with annotations api

* Annotations editor UI & CRUD

* Prevent annotation markers to overflow uPlot canvas

* Do not overflow graphing area with region annotations

* Align annotation id type

* Fix exemplar markers positioning

* Use clipping region rather than adjusting annotation region bounds

* Smaller icons

* Improve annotation tooltip and editor auto positioning, reorg code

* Renames

* Enable annotations ctx menu only when adding annotations is allowed

* Wrap setSelect hooks diring init hook

* Use TagFilter instead of TagsInput

* Add id to annotation events

* Add support for cmd+click for adding point annotations

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-08 10:39:03 +02:00
Nathan Rodman
a0dac9c6d9
Alerting: Add alertmanager notifications tab (#35759)
* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* Fix colors for am state

* Add horizontal dividing line

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Polling interval to groups

* Add alertmanager notifications tab

* Link to silences page from am alert

* Include summary for alertmanager group

* PR feedback

* Add basic unit test for alert notificaitons

* Rename Notificaitons component file

* Alerting: make alertmanager notifications view responsive (#36067)

* refac DynamicTableWithGuidelines

* more responsiveness fixes

* Add more to tests

* Add loading and alert state for notifications

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-07-07 16:17:26 -07:00
Kevin Minehart
ec45afa6b0
include URL arguments in dashboard resource request (#36526)
* include URL arguments in dashboard resource request
2021-07-07 21:42:49 +02:00
Torkel Ödegaard
a67eaf6b62
DashboardPage: Refactor state to fix state timing bugs and reduce unnecessary re-renders (#36460)
* DashboardPage: Refactoring state handling to improve performance and fix bugs with state out of sync

* Fixed exit panel editor timing issues

* New tests in RTL

* Updated comment

* Removed unused imports
2021-07-07 18:39:45 +02:00
Torkel Ödegaard
96a51561a3
Angular: Fixing some annoying depreaction warnings (#36466) 2021-07-07 18:39:10 +02:00
Torkel Ödegaard
eed1f36613
Links: Fix links to other apps outside Grafana when under sub path (#36498) 2021-07-07 15:25:59 +02:00
Thomas Cave
3e95c3826a
CloudWatch Logs: If Grafana Live isn't enabled, don't use the Live Channel (#36358)
* If Live isn't enabled, don't use the Live Channel

* ..Import Config if you want to use it!
2021-07-07 13:39:32 +02:00
Torkel Ödegaard
a241f03167
TimeSeries: Support coloring series and line by thresholds or gradient color scales (#35910)
* TimeSeries: Adds support for color scheme series and line colors

* Updates

* fixed device issue

* Evaluate series color in legend

* two fixes

* It works with points

* Added test dashboard

* Minor fix

* Reset color mode to palette when switching to panel that supports by series mode

* Add support for relative thresholds

* Updated snapshots
2021-07-07 12:40:40 +02:00
Michael Alex
7538739881
Fixed a typo in AnalyticsConfig.test.tsx file (#36439) 2021-07-07 09:12:59 +02:00
Dominik Prokop
b361fc751c
PanelOptions: Don't mutate panel options/field config object when updating (#36441)
* PanelOptions: Don't mutate panel options/field config object when updating

* Review

* maybe faster, plus value === '' fix

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-07-07 08:58:07 +02:00
Zoltán Bedi
55e763b4cd
Prometheus: interpolate variable for step field (#36437)
* Prometheus: interpolate variable for step

* Add test for variable interpolation
2021-07-07 08:43:46 +02:00
Ben Bodenmiller
0c20cc1d12
Chore: remove extra "only" (#36494) 2021-07-06 20:45:55 -07:00
Torkel Ödegaard
17707d886a
PanelEditor: Fixes issue minor UI issue with editing non data panels (#36463) 2021-07-06 18:01:13 +02:00
Matthias Blümel
b49b7faeee
Transformation: show message if not applied on single frame (#36469)
* Transformation: show message if not applied on single frame

* Use FieldValidationMessage component instead

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-06 16:41:28 +02:00
Ashley Harrison
cc4d301d50
Annotations: Add typeahead support for tags in builtin annotations (#36377)
* Annotations: create React component, naive attempt at hooking together

* Annotations: Use query object instead of passing annotation

* Annotations: Hook up the new api to get annotation tags

* Annotations: Use InlineFieldRow instead of gf-form-inline

* Annotations: Use InlineSwitch instead of gf-form-switch

* TagFilter: Add support for allowCustomValue

* Annotations: Update to match backend api

* Annotations: Add basic tests, expose inputId on `TagFilter`

* Annotations: Fix test name and reorder tests slightly

* Annotations: Use FieldSet instead of gf-form-group

* Refactor: fixes annotation queries

* Annotations: Everything working, just types to fix...

* Annotations: Fix types?

* Revert "Annotations: Fix types?"

This reverts commit 6df0cae0c9.

* Annotations: Fix types again?

* Annotations: Remove old angular code

* Annotations: Fix unit tests for AnnotationQueryEditor

* Annotations: Check if it's an annotation query immediately

* Annotations: Prevent TagFilter overflowing container when there are a large number of tags

* Change to new form styles

* Annotations: Add id's + fix unit tests

* Updated wording

* Annotations: Allow custom value to preserve being able to use template variables

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-07-06 10:50:46 +01:00
Josh Hunt
2a4191a2ee
AzureMonitor: Fix issue where resource group name is missing on the resource picker button (#36400)
* AzureMonitor: Fix issue where resource group name is missing in the UI

* fix
2021-07-06 11:22:47 +02:00
fabio-silva
d87e086d6f
Dashboard: avoid and correct invalid date ranges (i.e. to < from) (#34543)
* Dashboard: invert invalid date ranges from URL

* Dashboard: discard invalid date ranges from inputs

* Dashboard: move time range reset

* Dashboard: simplify undefined dashboard verification

* Dashboard: show form error on invalid date range

* Dashboard: rename function to isRangeInvalid

* Dashboard: refactor invalid check functions

* Dashboard: different error messages for date picker

* Dashboard: add date tests to TimeRangeForm
2021-07-06 10:46:17 +02:00
Ivana Huckova
b77f6d59bd
Loki: Add support for ad-hoc filtering in dashboard (#36393)
* Add support for ad-hoc filtering in dashboards

* Add tests

* Add documentation

* Update docs/sources/variables/variable-types/add-ad-hoc-filters.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Remove unused import

* Refactor and simplify

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-06 10:30:27 +02:00
Ivana Huckova
666656c925
Loki: Add $__range variable (#36175)
* Add  variable to Loki

* Add tests

* Update, remove redundant options

* Add missing import

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-06 08:56:01 +02:00
Ryan McKinley
3a6ec01c05
Dashboards: load dashboards from a data source (#36366) 2021-07-05 15:35:10 -07:00
Andres Martinez Gotor
759f9c44cb
Add a button to clear Azure Monitor Logs credentials (#36256) 2021-07-05 11:12:56 +02:00
Armand Grillet
7fb233cfb1
Theme: Add margin-bottom to .markdown-html tables (#36415) 2021-07-05 08:40:56 +02:00
Ivana Huckova
09e49f6118
Docs: Improve title and documentation for share shortened link in Explore (#36380)
* Improve title and documentation for share shortened link in Explore

* Update docs/sources/explore/_index.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-07-02 16:14:55 +02:00
Karl Persson
2fd7031102
Access Control: Add fine-grained access control to explore (#35883)
* add fixed role for datasource read operations

* Add action for datasource explore

* add authorize middleware to explore index route

* add fgac support for explore navlink

* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is

* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default

* create function to evaluate permissions or using fallback if accesscontrol is disabled

* change hasAccess to prop and derive the value in mapStateToProps

* add test case to ensure buttons is not rendered when user does not have access

* Only hide return with changes button

* remove internal links if user does not have access to explorer

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-07-02 14:43:12 +02:00
Selene
ef05596e07
Allow white labeling loading logo (#36174)
* Allow to whitelabeling loading logo

* Add loading_logo to documentation

* Change loading_logo to loading_logo_url
2021-07-02 14:17:10 +02:00