Commit Graph

7222 Commits

Author SHA1 Message Date
Joe Blubaugh
3d91047e6e
Alerting: Notification URL points to alert view page instead of alert edit page (#47752)
Before this change, notifications generated by the Grafana Alertmanager
pointed to '/alerting/:ruleID/edit'. This change instead points them to
the view path '/alerting/grafana/:ruleID/view'. The view page has a
better UX, including timeseries display. It's also where many alert
state improvements will land in the next few versions of Grafana.

Fixes #45301

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-20 21:43:55 +08:00
kay delaney
db8d85e2f2
Folders: Fix flaky test (#47953) 2022-04-20 15:03:33 +02:00
Alex Khomenko
9c0aa09a85
Feature Highlights: update upgrade components UI (#47885)
* Highlights: add action prop

* Highlight team sync for trial users

* Add badges for trial highlights

* Move events to UpgradeBox

* Fix undefined license settings

* Update snapshot

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update copy and event handling

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-04-20 15:08:49 +03:00
kay delaney
8ae5dd74e6
Dashboards: Defer loading of plugin exports until panel is visible (#47361) 2022-04-20 11:56:19 +02:00
kay delaney
c48d8d1d48
Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
Gilles De Mey
be3f52abb1
Alerting: grafana managed group names (#47785) 2022-04-20 11:41:33 +02:00
Giordano Ricci
c1490a464a
Explore: minor copy changes (#47922)
* Explore: minor copy changes

* fix tests
2022-04-20 10:37:26 +01:00
kay delaney
f9f4a4cbf6
Export: Explicitly include default datasources in exported dashboard json (#47244)
* Export: Explicitly include default datasources in exported dashboard json
2022-04-20 10:02:26 +01:00
Vardan Torosyan
cbd2d09d70
Update API Keys UI to adjust based on users permissions (#47802)
* Update API Keys UI to adjust based on users permissions

Since API Keys support now RBAC we need to ensure that UI
is adjusted based on the user permissions.

* Applying PR suggestions
2022-04-20 09:45:45 +02:00
Peter Holmberg
39d3c8afd7
Alerting: Fix issue with Slack contact point validation (#47559)
* secureFields and secureSettings

* revert channelIndex

* readd lost code

* use specific return

* register secure fields and use not hard coded index

* fix for determineReadOnly

* fix lint error

* fix test suite

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-20 09:40:57 +02:00
Leon Sorokin
aa98123e72
TimeSeries: always try to detect & fix reverse-sorted time field (#47906) 2022-04-19 23:20:09 -05:00
Konrad Lalik
785145c045
Alerting: FGAC bug bash fixes (#47873)
* Improve new alert and new silence buttons permission handling

* Prevent loading alert rules when no sufficient permissions provided

* Improve add and edit rule permissions

* Add new rule CTA button for non-editors

* Update mock

* Fix imports
2022-04-19 18:43:33 +02:00
Gilles De Mey
69eb6efd6e
Alerting: add confirmation modal for deleting notification policies (#47819) 2022-04-19 15:55:54 +02:00
Peter Holmberg
4570615afc
Alerting: Display alert instances instead of alert rules when creating silence (#47396)
* modify matchers util for instances

* filter alerts

* change label to include instances

* re add empty case
2022-04-19 15:08:19 +02:00
Joe Blubaugh
7d5cb170c6
Alerting: Sort StateHistoryItem after fetch instead of on render. (#47842)
PR #47674 attempted to sort a read-only managed async array. This change
moves the sort logic to the fetch code so sort happens once on fetch, to
a mutable array, rather than trying on each render for an immutable
array.

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-19 16:05:28 +08:00
Joe Blubaugh
516c8b60ee
Unified Alerting: Stable order for state history annotations (#47674)
This change sorts the State History list returned by the backend by the
id in addition to the timeEnd and time fields by which it is
already sorted. This results in a stable view of the State History
table.

Fixes #45873

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-18 10:42:45 +08:00
Florian Cassayre
d4f7ea9f01
Chore: Fix typos (#47816) 2022-04-15 14:10:34 +02:00
Eric Leijonmarck
b43e9b50b4
Service accounts: RBAC the service account UI (#47788)
* WIP

* fix: bug for saving name did not remove edit

* refactor: better error msg

* Display the column Roles even when user can't see the role picker

* Remove spaces when building the search query request

* Disable Edit button and fix token addition and deletion

* Fix the error message text

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-04-14 23:06:08 +01:00
Torkel Ödegaard
a126c07e54
DashboardPage: Remember scroll position when coming back panel edit / view panel (#47639)
* DashboardPage: Remember scroll position when coming back panel edit / view panel

* Use scollElement callback

* Fixed ts issue
2022-04-14 19:58:08 +02:00
Kristina
ab4c7f14aa
Explore: Follow up NoData work (#47745)
* Use theme styles and add basic test for rendering

* Use util function for response
2022-04-14 10:22:09 -05:00
Nathan Rodman
c63086822d
Alerting: Add FGAC to alerts tab in panel editor (#47732)
* add FGAC for alert panel tab

* add test for panel tabs

* Refactor condition

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-04-14 14:19:15 +02:00
Ieva
e50bd5cac8
Access control: expose SA frontend to users with the right permissions (#47727)
* expose frontend to users with permissions

* cover the ui endpoints

* fix permissions
2022-04-14 12:40:15 +01:00
Torkel Ödegaard
6f31a69bfd
QueryEditorRow: Show query errors next to query in a consistent way across Grafana (#47613)
* Show query errors under each query row

* Testing a more plain error box

* Font size

* Make it green

* Nit UI

* Slight simplification of condition

* New design

* Update

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-04-14 12:57:56 +02:00
Torkel Ödegaard
e3590e1a9b
Panels: Use the No value option when showing the no data message (#47675)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
2022-04-14 10:10:03 +02:00
Ryan McKinley
17e44c306c
Heatmap: hover legend regardless of tooltip state (#47600) 2022-04-13 20:45:30 -07:00
Ieva
a245531f0c
Access control: service account role check (#47710)
* forbid setting role higher than user's role

* change response code

* can assign API key permissions to non-admin users

* add: assign viewer role directly upon creation

* refactor: add AddSATcommand infavor of AddAPIkey

* refactor: frontend fixes for ServiceAccountToken

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
2022-04-13 18:11:03 +02:00
Konrad Lalik
a30ab51550
Alerting: FGAC for alert rule view and edit page (#47441)
* Add permission check to the find route, add query not accessible warning for the view page

* Hide grafana or mimir rule buttons depending on user's permissions

* Add grafana and cloud read rules checking on the alert rules list view

* Improve missing data source handling, refactor edit and remove permissions handling

* Add tests for rule edit permissions

* PR feedback
2022-04-13 17:19:54 +02:00
Alex
6db470c11e
Explore: no data returned (#46987)
* Explore: no data message

display no data text when query executed succesfully but no data was
returned

* Explore: 'no-data' display logic and styling fix

* pipeline trigger

* Revert "pipeline trigger"

This reverts commit f08d246ba767e66344ad252577523f391832ec18.

* Add more parameters for when to show no data

* Change check to use frame length

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-04-13 10:17:07 -05:00
Konrad Lalik
d7516f11b3
Add permission checking to alert rules in the folders view (#47686) 2022-04-13 14:05:29 +02:00
Vardan Torosyan
463f00b93f
Reload permissions cache when adding a datasource (#47658) 2022-04-13 11:58:18 +02:00
Piotr Jamróz
5cb5141c72
Query History: Move local storage specific settings to persistence layer (#47500)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions
2022-04-12 18:55:39 +02:00
Piotr Jamróz
7f5e8bb00f
Temporarily skip a test that is intermittently timing out and causing build failures. (#47637) 2022-04-12 16:48:37 +02:00
Ryan McKinley
f80a0d2a9b
PanelQueryRunner: use refId from results if the key value was not set in the packet (#47598) 2022-04-12 07:24:46 -07:00
kay delaney
f10047b708
Dashboard: Refactor panel cleanup (#47323) 2022-04-12 14:12:03 +01:00
Dominik Prokop
98cbecc4a5
Allow queries import when changing data source type (#47435)
* Enable queries import when changing datasource

* Supporting empty imports

* Review applied
2022-04-12 04:52:55 -07:00
Torkel Ödegaard
7181efd1cf
Explore: Allow users to save Explore queries to dashboards (#47083)
* Select: Expose AsyncSelectProps interface

* DashboardPicker: Add a generic DashboardPicker component

* Dashboard Service: improve types

* Explore: allow saving explore state in a new panel in an existing dashboard

* Handle saving provisioned dashboards error

* Improve test coverage

* simplify test setup

* Strip base path from url when redirecting to a dashboard

* Keep existing variables when saving to an existing dashboard

* group assertions in test

* SearchCard: handle undefined in meta.updated

* Change required error message

* Add to dashboard alternative

* Add to existing is working

* Add to dashboard form

* remove default add-panel when creating a dashboard from explore

* types cleanup

* remove unneeded BE change

* simplify selector

* Add explore2Dashboard feature toggle

* add tests

* Small refactor & add tests

* small DashboardPicker improvements

* use partial from lodash

* Better error handling

* improve tests & disable button when there are no queries

* rename addPanelToDashboard function

* remove localStorage item if opening tab fails

* UI touchups & tracking

* Fix tests & remove close reporting

* remove echologger debug

* fix adding a panel to an existing dashboard

* Enable explore2Dashboard by default and add docs

* Ensure each panel in dashboards has a valid ID

* force CI restart

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-04-12 13:26:07 +02:00
Garrett Guillotte
42431e6ad4
Explore/Logs: Improve and add descriptions of Explore's Escape newlines feature (#46709)
* Explore/Logs: Clarify phrasing of newline escape fix tooltip

Rewrite the tooltip for the smart feature in PR #31352 that
replaces incorrectly escaped newlines in log lines.

-   Clarify the functionality of the feature to emphasize its
    interactivity.
-   Remove language suggesting that the feature is experimental,
    when we intended to suggest reviewing the results manually for
    correctness.

* Docs: Document escape newlines feature

Describe and provide steps for using the "Escape newlines" feature
in Explore added in PR #31352.

* Rewrite topic lead to clarify conditional behavior

* Describe reversion of replacements as a standalone task

Reverting the replacements is a separate action, so it should have
its own task. This also describes the option's transformation and
tightens the task language.

* Remove Grafana 7 version qualifier

* Clarify escape sequence detection lede on task

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Clarify "Remove escaping" state change

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Clarify confidence of tooltip content

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

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-12 09:22:28 +02:00
Joe Blubaugh
51c98b182d
Unified Alerting: UI explains "match all" case in Notification Policies. (#47574)
This change makes it explicit in the UI that a notification policy with no matching labels matches all alerts that it processes. There are visual changes in both the Notification Policy editor, and in the Notification Policy table where matching columns are shown.

It's valid to have a notification policy with no label matchers attached. Such a policy matches all alerts sent to it. It's a common stumbling block for users. Where are all my alerts going?

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-12 10:42:17 +08:00
Nathan Marrs
99bb6ebd2b
Search: Update tag filter options dynamically (#47165) 2022-04-08 12:18:52 -07:00
Eric Leijonmarck
883ce5ad30
Service accounts: UI polish improvements (#47461)
* ui polishes

* change icon
2022-04-08 16:23:03 +01:00
Gilles De Mey
7e844064a4
Alerting: fix collapsable toggle text regression (#47517) 2022-04-08 17:15:19 +02:00
Gilles De Mey
c530100d45
fix: don't allow editing rule types for existing rules (#47512) 2022-04-08 15:26:33 +02:00
Konrad Lalik
87383b1c8b
Alerting: FGAC for alert rules page (#47418)
* Apply FGAC on the alert rules list page

* Add tests for edit, delete and silence buttons

* Unify access-control helpers

* Fix import

* Add route permissions for alert groups, unify access control helpers

* Improve buttons with data source explore permission

* Fix test
2022-04-08 13:34:02 +02:00
renovate[bot]
c3fe027d58
Update dependency @reduxjs/toolkit to v1.8.0 (#45950)
* Update dependency @reduxjs/toolkit to v1.8.0

* Fix type errors

* simplified code

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-04-07 11:27:58 +02:00
kay delaney
0cff2d5980
Library panels: Fix issue where query editor options wouldn't be updated (#47242)
Closes #47241
2022-04-07 09:39:54 +01:00
Giordano Ricci
ca286a238d
Explore: Add explore2Dashboard feature toggle (#47395) 2022-04-07 09:26:01 +01:00
Timur Olzhabayev
25235b3167
Removing plugin list panel (#46914)
The core plugin named plugin list panel is removed
2022-04-07 09:54:27 +02:00
Nathan Marrs
015a31644c
Search: clean up styling (#47221) 2022-04-06 16:59:24 -07:00
Nathan Rodman
49505b9a3b
Alerting: fgac for notification policies and contact points (#46939)
* add FGAC actions for silences table

* redirect users without permissions

* add permissions checks to routes

* add fgac to notifications and contact points

* fgac for notification policies

* fix mute timing authorization

* use consistent naming for checking grafana alertmanager

* tests for fgac in contact points and notification policies

* bump up timeout on rule editor test

* use new permissions util

* break out route evaluation into util

* Remove test timeout

* Change permissions for the alert-notifiers endpoint

* Use signed in handler for alert-notifiers when unified alerting enabled

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-04-06 18:24:33 +02:00
Kristina
b9e6ed3a8a
Convert Rich History tests to RTL (#47220)
* Migrate enzyme tests to RTL

* Convert rich history card tests

* Fix Lint errors

* Fix tests based on feedback

* Fix second await
2022-04-06 10:26:33 -05:00
Piotr Jamróz
88ec750728
Query History: Load history when QueryHistoryContainer is opened (#46457)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup
2022-04-06 13:49:25 +02:00
Ezequiel Victorero
6a059dcb4d
Access Control: hiding add annotation button without permissions (#47223)
* Access Control: hiding add annotation button without permissions
2022-04-05 08:20:10 -03:00
Cat Perry
b5f2f3e710
Tempo: Traces to Logs - From viewing Tempo traces to displaying Splunk logs (#46855)
* Add functionality to see splunk logs via tempo trace view
2022-04-04 13:24:33 -07:00
Konrad Lalik
6992d17924
Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771)
* Add basic UI for custom ruler URL

* Add build info fetching for alerting data sources

* Add keeping data sources build info in the store

* Use data source build info to construct data source urls

* Remove unused code

* Add custom ruler support in prometheus api calls

* Migrate actions

* Use thunk condition to prevent multiple data source buildinfo fetches

* Unify prom and ruler rules loading

* Upgrade RuleEditor tests

* Upgrade RuleList tests

* Upgrade PanelAlertTab tests

* Upgrade actions tests

* Build info refactoring

* Get rid of lotex ruler support action

* Add prom ruler availability checking when the buildinfo is not available

* Add rulerUrlBuilder tests

* Improve prometheus data source validation, small build info refactoring

* Change prefix based on Prometheus subtype

* Use the correct path

* Revert config routing

* Add deprecation notice for /api/prom prefix

* Add tests to the datasource subtype

* Remove custom ruler support

* Remove deprecation notice

* Prevent fetching ruler rules when ruler api is not available

* Add build info tests

* Unify naming of ruler methods

* Fix test

* Change buildinfo data source validation

* Use strings for subtype params and unveil mimir

* organise imports

* frontend changes and wordsmithing

* fix test suite

* add a nicer verbose message for prometheus datasources

* detect Mimir datasource

* fix test

* fix buildinfo test for Mimir

* shrink vectors

* add some code documentation

* DRY prepareRulesFilterQueryParams

* clarify that Prometheus does not support managing rules

* Improve buildinfo error handling

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-04 18:30:17 +01:00
Eric Leijonmarck
78bdcede70
Service accounts: polish UI and refactoring (#47269)
* no other tab has title

* made Add service button not visable and upper right

* renaming and added space between token number

* aligned button (:css:)

* refactor: out component listitem

* unused import
2022-04-04 17:09:51 +01:00
Gilles De Mey
322a14fe6e
Alerting: fix flakey default time range assertion (#47262) 2022-04-04 17:35:53 +02:00
Ezequiel Victorero
76b221e9d5
Access Control: hiding annotation edition and deletion without permissions (#46904)
* Access Control: disabling annotation edition without FGAC permissions
2022-04-04 11:57:43 -03:00
Gilles De Mey
473fa6d997
Alerting: add Mimir to the list of cloud rules (#47258) 2022-04-04 12:04:03 +00:00
CommanderRoot
d29b8e8858
Chore: Replace deprecated String.prototype.substr() (#46763)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-04 11:08:06 +02:00
Leon Sorokin
ed140906de
HeatmapNG: implement zooming & fix heatmap-buckets rendering (#47231) 2022-04-01 21:54:44 -06:00
Eric Leijonmarck
07aa1349d8
fix: error when licensing was not checked (#47201) 2022-04-01 16:57:02 +02:00
Peter Holmberg
cb03b05ced
Alerting: Add yaml editor to cloud rules (#46533)
* ruleinspector component

* Adding yaml component

* setvalues

* update yarn.lock

* bump types

* chore: update lockfile

* move apply button position

* move button back to tab

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-01 16:34:08 +02:00
Yaelle Chaudy
d217d2aa40
A11y : Fix a11y in CollapsibleSection (#46455)
* Fix a11y in CollapsibleSection

* Added type to button to avoid form submit on enter
2022-04-01 14:00:09 +02:00
Ashley Harrison
9d3b701797
Accessibility: Trap focus correctly in dashboard settings (#47149)
* Accessibility: Trap focus correctly in search + dashboard settings

* add accessible names for the overlays

* Undo changes to search

* missed a bit
2022-04-01 11:44:48 +01:00
Ryan McKinley
38dc34359b
Search: show dashboards form query (#47085) 2022-03-31 14:38:46 -07:00
Ashley Harrison
eddefdc274
Variables: Ensure variables in query params are correctly recognised (#47049)
* user essentials mob! 🔱

* user essentials mob! 🔱

* update comment

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-03-31 15:59:14 +01:00
Peter Holmberg
32ad1199e1
Alerting: Colorize labels and matchers (#46678)
* Replace AlertLabel with TagsList

* left align labels

* restart drone
2022-03-31 15:20:57 +02:00
Joey Tawadrous
58922d78df
Traceview find: background color and prev/next (#46527)
* Next/prev buttons

* expand

* Sticky search bar

* Removed anys

* testing

* testing

* Tests for next/prev/suffix

* More tests

* Span bar row color

* Add clear to input and update search bar styles

* Update test

* PR changes

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-31 09:43:59 +01:00
Giordano Ricci
6565d0ee64
Explore: move Time picker next to run button (#47082) 2022-03-31 02:04:17 +01:00
Nathan Marrs
85286a5182
Search v2: encode query in url (#47078) 2022-03-30 13:00:40 -07:00
Ryan McKinley
abeb08bc98
PanelInspect: show dataframe JSON in JSON view (#47071) 2022-03-30 19:58:49 +02:00
Ryan McKinley
edf384c730
DashboardSave: use a feature flag for drawer behavior (#46972) 2022-03-30 10:07:41 -07:00
kay delaney
f486b54b84
Navigation: Rough implementation of new navbar design (#46909) 2022-03-30 18:05:52 +01:00
Nathan Marrs
4449439a41
Search: Implement basic improved UI (#46758) 2022-03-30 09:50:32 -07:00
Gilles De Mey
18862a22a6
Alerting: use mimir logo (#47063) 2022-03-30 17:57:18 +02:00
Alex Khomenko
114704e2e2
Feature Highlights: update components (#46920)
* Apply new upgrade styles

* Add caption/update pro badge color

* Update team sync upgrade page

* Add UpgradeContentVertical

* Update public/app/core/components/Upgrade/UpgradeBox.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update screenshots

* Update screenshots[2]

* Scroll screenshot if doesnt fit

* Add missing target prop

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-03-30 14:46:56 +02:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data (#45322)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
Leon Sorokin
475a027562
Prometheus: make JS heatmap response a single-frame (field-per-bucket) (#46611) 2022-03-29 22:23:08 -06:00
Cameron Waterman
8426cfe400
Profile/Help: Expose option to disable profile section and help menu (#46308)
* Expose option to disable help menu

* Expose option to disable profile menu

* Add Profile FeatureTogglePage

* Update public/app/features/profile/FeatureTogglePage.tsx

Uptake PR wording suggestion.

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

* Fix front end lint issue

* Fix back end lint issue

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 16:27:53 +01:00
Ryan McKinley
d1681dcc18
DashboardSave: keep version message (#46966) 2022-03-29 07:11:34 -07:00
Piotr Jamróz
bf977ac245
Explore: Fix time interpolation (#46737)
* Ensure TemplateService is updated with new time range on each time range change.

* Fix linting errors

* Fix explorePane.test.ts

* Reuse createDefaultInitialState

* Remove unused imports

* Add a test for left/right split

* Silence console.error in tests

* Silence console.error in tests
2022-03-29 15:10:40 +02:00
Braden Snell
9a850de5a8
Variables: add graceful circular dependency failure (#46590)
* adds circular dependency check

* adds circular dep test
2022-03-29 11:18:59 +01:00
Torkel Ödegaard
3516821012
Dashboard: Fixes save modal rendered ontop of save drawer (#46916)
* Dashboard: Fixes save modal rendered ontop of save drawer

* removed commented line

* Simplified dismiss -> hideModal mapping

* Fixed issue with new dashboard

* Fixing issues
2022-03-25 13:08:42 +01:00
Ashley Harrison
c13f4542d8
Dashboard: Template variables are now correctly persisted when clicking breadcrumb links (#46790)
* Add history listener to update titleHref/parentHref when location changes

* Convert to functional component and use useLocation

* Wrap component in React.memo

* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
2022-03-24 16:01:43 +00:00
kay delaney
8329cd59f6
LibraryPanels: Increase max description length to 2048 chars (#46601) 2022-03-24 12:14:56 +00:00
Josh Hunt
89757cf58f
ManageDashboards: Fix error when deleting all dashboards from folder view (#46877)
* user essentials mob! 🔱

* draft tests

* tests!

* better default ids for test data
2022-03-24 09:43:25 +00:00
Gabriel MABILLE
3440e7c8f7
AccessControl: Fix locked role picker in orgs/edit page (#46539)
* AccessControl: Fix locked role picker in orgs/edit page

* Use correct org when computing metadata
2022-03-24 08:58:10 +01:00
Connor Lindsey
78c23d8dab
Tracing: Prevent createSpanLink from returning an invalid Loki query (#46864) 2022-03-23 09:48:11 -07:00
Gilles De Mey
4a568769e7
Alerting: fix flakey test (#46845) 2022-03-22 21:20:58 +01:00
Ashley Harrison
04bbafb4a6
Chore: Enable jest-fail-on-console to prevent console errors in unit tests (#46835)
* Add jest-fail-on-console

* Fix last 2 console warnings

* Update package syntax
2022-03-22 17:03:07 +00:00
Nathan Rodman
5a25ada3d0
Alerting: Add FGAC for Silences (#46479)
* add FGAC actions for silences table

* redirect users without permissions

* hide silence button in rules list

* add permissions checks to routes

* add read action for silences page

* add permissions checks to navigation

* add additional access checks for rule viewing

* create authorize component

* add tests for silences

* hide alerting nav for users without access

* nolint: gocyclo

* add permission check to alert details

* add check for external instances

* remove unecessary new lines

* use correct actions for alert details

* fix failing tests

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-03-21 16:54:37 -07:00
Santiago
18c1c6ca6a
fix double slash in share link (#46757) 2022-03-21 08:00:54 -06:00
Kristina
1afd278bd0
Fix tests for Explore - ErrorContainer, MetaInfoText & cleanup (#46744)
* Move ErrorContainer.test.tsx to RTL

* Remove snapshots and unnecessary tests, change enzyme tests to RTL

* Add fixes to tests
2022-03-18 14:44:51 -05:00
Eric Leijonmarck
c592e6606c
Filtering of service accounts by expired tokens (#46251)
* Refactor to ServiceAccounts Query

* filtering expiredtokens on backend

* WIP

* WIP

* WIP

* fix: missing that we do not cover for no service accounts

* fix: wrong link

* feat: filter able to get only service accounts with expired tokens

* refactor: naming

* Update pkg/services/serviceaccounts/models.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* goimported

* Update pkg/services/serviceaccounts/api/api.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-03-18 15:50:34 +01:00
lean.dev
c3ee98a9b6
Fixing delete dashboard url form datasource configuration (#46637) 2022-03-18 11:47:57 -03:00
Gilles De Mey
64d4e6fcaa
Alerting: visual alert type picker (#46111) 2022-03-18 14:33:32 +01:00
Tom
ea7d5a6185
Transformers: Add template variable substitution (#44486)
* Transformers: Add template variable replacement to transformer operator

* Transformers: Add template variable replacement to calculateField transformer

* Transformers: Add scopedVars to transformer template replacement

* Transformers: Add calculateField template variable test

* Transformers: Fix 'undefined' is not assignable to type 'string'

* Transformers: Fix lint-frontend bug

* Fix lint check

* Fix lint
2022-03-18 10:25:53 +00:00
Ryan McKinley
93390b5a1e
Search: use search service (#46714)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-18 01:36:32 +01:00
Ryan McKinley
736820f975
Search: use minisearch for better frontend searching (#46710)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-17 14:26:48 -07:00
Joao Silva
a9002e80b4
Annotations: Fix issue with spinner always showing (#46686) 2022-03-17 13:00:52 +00:00
Ikko Ashimine
d887068904
Alerting: Fix typo in matchers.test.ts (#46641)
occurence -> occurrence
2022-03-16 19:15:23 +00:00
Ryan McKinley
15ca294be0
Dashboards: show changes in save dialog (#46557)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-16 09:28:09 -07:00
Torkel Ödegaard
31d141b267
Dashboards: Fixes repeating by row and no refresh (#46565) 2022-03-16 07:57:12 +01:00
Joao Silva
00c93fff8c
Grafana-UI: Fix use of Fragments as children of InlineField (#46326) 2022-03-15 17:50:29 +00:00
Nathan Marrs
11aa6a3e8f
Value mapping/add icon support (#44503)
Co-authored-by: Ryan McKinley <ryantxu@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-15 08:51:12 -07:00
Gabriel MABILLE
75935c75c1
ServiceAccounts: Fix role update (#46568)
* ServiceAccounts: Fix role update

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Fix patch missing metadata

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Fix patch missing metadata

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-03-15 10:48:10 +01:00
Ryan McKinley
4cd27a380d
Geomap: applying multiple line builders should keep each segment (#46563) 2022-03-14 22:58:41 -07:00
Giordano Ricci
00f67cad1b
Explore: set correct datasource when creating panel in a dashboard (#46530) 2022-03-14 23:26:13 +00:00
Joey Tawadrous
bd21355f87
Trace view: Scroll to top on new query (#46278) 2022-03-14 14:22:37 -06:00
Yaelle Chaudy
0b0d612372
A11y : Fix option panes not accessible when collapsed (#46405)
* Turned div into text button to make it accessible

* Only icon as button to avoid embedded buttons with overrides delete button

* use icon in Button directly

* Removed unused import

* moving id for labelledBy to h6 elem instead of icon

* Tweaking style, bigger caret

* Fixed aria-expanded

* Modifying and using CollapseToggle from unified alerting

* Added restOfProps to CollapseToggle
2022-03-14 15:37:13 +01:00
Konrad Lalik
2409405c34
Alerting: Integrate alerts with folders (#45763)
* Add Alert rules tab

* Add pagination and a simple name-based filtering

* Add name and label based filtering

* Improve pagination, handle the no results case

* Add tests for alerts folder view

* Add label filtering by clicking a tag

* Add tests for matcher to string method

* Add sorting, improve styles

* Use simple Select component for sorting

* Update default page size

* Remove unused code

* Use existingc thunk

* chore: update swagger spec

* Revert "chore: update swagger spec"

This reverts commit ee79ec7341.

* Code cleanup

* Fix ts

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-03-14 15:21:29 +01:00
Jguer
e512029afb
ServiceAccounts: lowercase edit url (#46517) 2022-03-14 14:22:54 +01:00
matt abrams
52c9da1b11
A11y: add copy button to API Key modal (#46387)
* add copy button to API Key modal

* switch to inline button style

* update test snapshot
2022-03-11 11:10:27 +01:00
matt abrams
ec84b7bd23
A11y: Make the Library Panel "clear filter" buttons accessible (#46341)
* swap span for button + add aria-label

* swap span for button + add aria-label

* add new style + increase padding

* fix typo

* switch to link variant + trim custom css
2022-03-11 11:10:13 +01:00
Yaelle Chaudy
9fc9708ba5
Fixed new variable button keyboard clickable (#46293) 2022-03-09 20:35:53 +01:00
Joao Silva
4b57ffbb4f
A11y: Replace LinkButton with Button in Value Mappings to make it accessible (#46330) 2022-03-09 14:01:24 +00:00
J Guerreiro
874ac9180b
Service Accounts: Add enabled/disabled status to list (#46259)
* ServiceAccounts: improve where condition

* ServiceAccounts: Add Enabled/Disabled status to list
2022-03-08 14:10:16 +01:00
Yaelle Chaudy
ed7701c6b2
Updated span for Button to be accessible (#46296) 2022-03-08 12:42:03 +01:00
Torkel Ödegaard
79e5e5c024
DataSource: Default data source is no longer a persisted state but just the default data source for new panels (#45132)
* PanelEdit: Change the meaning of default data source to be just that the default for new panels

* Added migration, and also migration for annotation datasource prop to data source refs

* fix

* Fixing tests

* Fixes to annotation

* Fixing unit test
2022-03-08 08:56:12 +01:00
Leon Sorokin
a9ee446de4
HeatmapNG: fix Prometheus frame-per-bucket heatmap response rendering (#46309) 2022-03-07 20:51:11 -06:00
Leon Sorokin
0ee552dd65
LegacyBrowser: fix Safari 13.1 (lacks logical nullish assignent) (#46260) 2022-03-07 09:21:28 -06:00
Eric Leijonmarck
3d168eb34b
Searchable service accounts (#45844)
* WIP

* draft of WIP

* feat: search and filtering works 🌈

* Update pkg/models/org_user.go

* Apply suggestions from code review

* refactor: remove unsed function

* refactor: formatting

* Apply suggestions from code review

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>

* WIP

* comment

* Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* review comments

* wip

* working search and initial load of service accounts

* number of tokens working

* removed api call

* Apply suggestions from code review

* added accescontrol param

* accesscontrol prefix corrected

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-03-04 12:04:07 +01:00
Artur Wierzbicki
bdbb9ed54a
Live: Fix support for StreamingFrameAction.Replace (#46086)
* fix StreamingFrameAction.replace

* simplify

* beautify

* cover `streamingDataFrame.ts` changes with unit tests

* formatting

* cover `LiveDataStream.ts` changes with unit tests

* update frame length after pushing new values
2022-03-04 14:04:30 +04:00
Gilles De Mey
a9b1a964b0
Alerting: adds support for federated rules (#46037) 2022-03-04 10:16:13 +01:00
Torkel Ödegaard
a404dba29d
Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source (#46167)
* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source

* Fix unit tests
2022-03-04 08:58:13 +01:00
Ryan McKinley
0aad61d0ac
Search: add a simple search page (behind feature flag) (#45487)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-03 14:56:14 -08:00
Joey Tawadrous
6f3ebbe6cc
Trace view scroll to top button (#46077)
* Trace view scroll to top button

* Updated button css selector

* Updates for scrolToTop

* Updated snapshot

* Updated render

* Add smooth scrolling
2022-03-03 16:19:44 +00:00
Karl Persson
7966e3583e
Access control: Dashboard and folder permissions frontend (#45094) 2022-03-03 15:18:27 +01:00
Giordano Ricci
4caf5dbbd9
Explore: minor copy changes in the Add to dashboard modal (#46154)
* Explore: minor copy changes in the Add to dashboard modal

* fix tests

* Additional copy changes & test fixes
2022-03-03 14:01:03 +00:00
Giordano Ricci
09f48173fe
Explore: allow users to save Explore state to a new panel in a new dashboard (#45148)
* Add Button & Form

* Save to new dashboard

* minor adjustements

* move modal to a separate component

* handle dashboard name related errors

* pick visualization based on query results

* lift state

* fix types

* Add Open & Close tests

* Add submit test

* add navigation tests

* add tests for API errors

* remove console log

* create wrapper component for AddToDashboardButton

* remove unused mapped prop

* add wrapper test

* rename isActive to isVisible

* invert control over save & redirect logic

* remove leftover commented code

* cleanup setup parameters

* reorganize code & improve tests

* Remove option to add to existing dashboard

* UI tweaks

* disable button if no queries

* Fix tests

* better accessible tests

* handle submission errors

* improve addToDashboard types

* use dashboardSrv' saveDashboard

* remove leftover test helper

* fix typo

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kristina <kristina.durivage@grafana.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-03-03 08:54:06 +00:00
renovate[bot]
52568c7af1
Update dependency ol to v6.13.0 (#45949)
* Update dependency ol to v6.13.0

* fix types

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-03 09:45:33 +01:00
Ashley Harrison
3427ae463d
Dashboard: Add feature reporting for dashboard import (#46080)
* Add feature reporting for dashboard import

* Update tracking event names
2022-03-02 14:35:52 +00:00
kay delaney
f530775e45
Chore: Remove several 'as' type assertions (#45913) 2022-03-02 14:02:09 +00:00
J Guerreiro
bc5237e840
Service Accounts: Link final components in service accounts detail page (#45929)
* ServiceAccounts: Delete/Disable service account from details page

* ServiceAccounts: capitalize viewable messages from UI

* ServiceAccounts: Link new update endpoint to details page

* ServiceAccounts: reimplement service account retrieve to include is_disabled and only target service accounts

* Cleanup styles

* Fix modal show

* ServiceAccounts: simplify handler functions

* Apply suggestions from code review

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-03-01 09:21:55 +01:00
Nathan Rodman
e814e7364b
Alerting: fix alert groups grouping (#45012)
* fix multiple non-grouped groupings

* drop duplicate alerts

* add test for multiple groups without labels

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-02-28 09:50:17 -08:00
Giordano Ricci
c014f8b806
DashboardSrv: add saveDashboard method (#45627)
* DashboardSrv: add saveDashboard method

* revert external changes

* use DashboardModel instead of DashboardDataDTO

* use fetch instead of request

* use getSaveModelClone in saveDashboard
2022-02-28 11:30:11 +00:00
Shachi Solanki
190757b3c6
Tempo / Trace Viewer: Support Span Links in Trace Viewer (#45632)
* Support Span Links in Trace Viewer

* Update ReferencesButton styles

* Remove datasource prop

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-25 11:14:13 -07:00
Ikko Ashimine
c656a6bf1e
Live: fix typo in channel.ts (#45915)
recieved -> received
2022-02-25 18:20:16 +03:00
Peter Holmberg
4ef58e595c
Alerting: Add validation to slack contact point (#45618)
* add requiredifempty

* rename field, fix logic

* update mockdata

* remove logs

* update test

* fix json expected payload in e2e tests

* fix test

* fix test again

Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
2022-02-25 15:10:21 +01:00
Ashley Harrison
033f6cffb5
Add this import to fix main (#45905) 2022-02-25 12:54:19 +01:00
J Guerreiro
14ec0cbd3b
Service Accounts: Polish service account detail page (#45846)
* ServiceAccounts: add teams to service account DTO

* ServiceAccounts: Add team display to service accounts

* ServiceAccounts: add AC metadata to detail route

* ServiceAccounts: add role picker to detail page

* ServiceAccounts: Add role to profile DTO

* ServiceAccounts: remove wip mention of created by
2022-02-25 11:33:34 +01:00
Peter Holmberg
9d61dcb02b
Alerting: Disable Alertmanager picker if there's only one Alertmanager (#45781) 2022-02-25 11:17:28 +01:00
J Guerreiro
1cc5b25a05
ServiceAccounts: Fix token creation with expiry (#45855)
* ServiceAccounts: Fix token creation with expiry

* ServiceAccounts: remove extraneous import
2022-02-24 19:22:57 +01:00
Borja Garrido
359ef074fa
Transformations: Add new grouping to matrix transformer (#28739)
* Add new transformer grouping to matrix

* Add new transformer grouping to matrix tests

* Add new transformer grouping to matrix UI

* Fix tests for grouping to matrix transformer

* Update transformer to latest interfaces

* Add field selector to form

* Make linter happier

* Replace Fields with InlineSnapshot as it was to taking units properly

* Rearrange for new transformers structure

* Expose GroupingToMatrix options as part of data package

* Increase labelWidth as suggested

* Add uniqueValues helper function and use it to extract Column and Row Values
2022-02-24 17:01:04 +00:00
Ashley Harrison
d3700c4032
Chore: Remove console output from some jest tests (#45792)
* Chore: Remove console output from some jest tests

* Skip manual performance test
2022-02-24 10:49:48 +00:00
Konrad Lalik
d6c580e338
Alerting: Lotex alert groups removal (#45150)
* Add lotex group removal UI

* Connect UI to delete group action

* Add rules' refreshing after deletion of a group

* Improve confirmation message

* Add tests for RulesGroup

* Remove redundant check
2022-02-24 11:31:36 +01:00
Piotr Jamróz
5715be4afa
Explore: Integration test for running a query and saving it in query history (#45728)
* Create basic query history test

* Clean up

* Clean up

* Use run button selector

* Mock AutoSizer instead of monkey-patching

* Reset local storage after each test

* Add accessible name to Run Query button and use it in the test

* Update public/app/features/explore/spec/helper/interactions.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Rename query to urlParams

* Fix linting errors

* Remove unused import

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-23 19:05:38 +01:00
kay delaney
59317a22e4
AppNotifications: Migrate usage of deprecated appEvents.emit method to redux actions (#45607) 2022-02-23 11:31:15 +00:00
Jack Westbrook
d0d5304662
Revert "Update dependency react-hook-form to v7.26.1" (#45761)
* Revert "Update dependency react-hook-form to v7.26.1 (#43670)"

This reverts commit 175891a5e3.

* chore(renovate): prevent bumping react-hook-form so plugins dont break
2022-02-23 12:22:45 +01:00
kay delaney
49ac8b9f0a
Dashboards: Move slow dashboard logic to css (#45686) 2022-02-23 09:35:42 +00:00
Connor Lindsey
af2d19b02e
Tracing: Add option to map tag names to log label names in trace to logs settings (#45178)
* Add mapped tags input to allow renaming tags in trace to logs settings

* Use mappedTags in createSpanLink

* Update traceToLogs docs

* Show 'add kv' button if no tags

* Update docs

* Default mappedTags to tag values
2022-02-22 23:17:45 +01:00
J Guerreiro
e201b777c2
Service Accounts: small typo and dto fixes (#45677)
* ServiceAccounts: respect js casing and small fixes to displayed values

* ServiceAccounts: fix typos on service account

* ServiceAccounts: fix missing orgID in service account

* ServiceAccounts: Small fixes to dtos for profile

* ServiceAccounts: use result org id

* ServiceAccounts: return value is always nil
2022-02-22 14:58:42 +01:00
Ashley Harrison
5e3be8b17f
Variables: Fix adding variables to an unsaved dashboard (#45722)
* 🚧: Mob session work 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* 🚧: Mob session work 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-02-22 13:21:01 +00:00
Alexander Emelin
28c30a34ad
Comments: support live comments in dashboards and annotations (#44980) 2022-02-22 10:47:42 +03:00
Kristina
31090a75eb
Explore: Save log results sort order (#45423)
* Explore: Save log results sort order

* Change to radio group, add test and make language consistent with logs plugin
2022-02-21 06:09:43 -06:00
kay delaney
d134740bba
Redux: Factor Invites out to separate slice (#45552) 2022-02-21 11:37:49 +00:00
renovate[bot]
175891a5e3
Update dependency react-hook-form to v7.26.1 (#43670)
* Update dependency react-hook-form to v7.27.0

* fix type errors for alerting components with new react-hook-form version (#45341)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2022-02-18 17:13:31 +01:00
Levente Balogh
1e21184f65
Fix: JSON parsing in backend_srv (#45598)
* fix(plugins/state): console log errors during install / uninstall

* fix(backend_srv): catch JSON parse errors

Sometimes it can happen that a backend API responses says that it's
returning with a JSON content-type, however it actually returns an invalid
JSON (e.g. an empty body) - in which case the backendSrv() request errors out.
2022-02-18 16:06:37 +01:00
Piotr Jamróz
25f155a44d
Explore: Fix closing split pane when logs panel is used (#45602)
* Clear cache when LogsNavigation is mounted

* Update docs
2022-02-18 15:34:19 +01:00
Torkel Ödegaard
0838f4b1ad
Plugins: Fix importing panel modules (#45590) 2022-02-18 12:51:55 +01:00
Yaelle Chaudy
530913dd37
Azure Monitor : Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab (#44877)
* Trying out json formatting of azure graph err from frontend

* Added some tests wip

* Wrap text in popper tooltip

* fix conflict

* Wrap text in tooltip

* Complete tests

* Added invalid json test

* Backend changes and tests

* removed comments

* Added split of message / json and edge cases tests

* Addressed comments

* moved catch to parseErrorMessage
2022-02-18 12:09:24 +01:00
Gábor Farkas
dd9b52fd41
log-volume: adjust request-id to avoid conflicts (#45511)
* log-volume: adjust request-id to avoid conflicts

* added unit test

* simplify test

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* added missing import

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-02-18 12:05:29 +01:00
Eric Leijonmarck
c6943797f9
Admin: token expiration colors and calculations (#45231)
* token expiration colorign and calculations

* Update public/app/features/serviceaccounts/ServiceAccountTokensTable.tsx

* removed unused calculation for expiry

* optional attribute

* fix: typo

* implement failing test :thumpsup:

* tests

* refactor: tests to use assertify

* tiem

* refactor: remote porntf

* refactor: make test NOT sleep 1 sec for all builds :D

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
2022-02-18 11:43:33 +01:00
Agnès Toulet
478efffce7
Data source insights: Switch from ID to UID (#45532) 2022-02-18 09:19:39 +01:00
Hugo Häggmark
dbec2b02fd
Variables: move state tree into a keyed state (#44642)
* Variables: move state tree into a keyed state

* Update public/app/features/variables/state/transactionReducer.ts

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Chore: fix prettier error

* Chore: renamed slices and lastUid

* Chore: rename toUidAction

* Chore: rename dashboardVariableReducer

* Chore: rename state prop back to templating

* Chore renames variable.dashboardUid

* Chore: rename toDashboardVariableIdentifier

* Chore: rename getDashboardVariable

* Chore: rename getDashboardVariablesState

* Chore: rename getDashboardVariables

* Chore: some more renames

* Chore: small clean up

* Chore: small rename

* Chore: removes unused function

* Chore: rename VariableModel.stateKey

* Chore: rename KeyedVariableIdentifier.stateKey

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-18 06:06:04 +01:00
Ryan McKinley
bbddab0294
Chore: refactor core transformer folder structure (#45497) 2022-02-17 08:12:38 -08:00
Todd Treece
c8bb01d1ad
Expressions: Add support for variables (#41778) 2022-02-17 10:50:22 -05:00
Kristina
773da0e330
Explore: Add t * keybindings to change time range (#45020)
* Add keybindings to explore, allow override of dashboard model update for explore update

* Remove edits to Dashboard Model, add definition when url params should be updated

* Add tests

* Add and expose util function instead of bringing in unrelated library do not define explicit path to library file

* Use more generic model for TimeSrv

* Remove url utility functions, use javascript function instead

* Break out TimeModel into new type and bring it in

* condense object creation
2022-02-17 07:39:02 -06:00
Peter Holmberg
0502a84922
Alerting: Add choice to external alertmanagers (#45157)
* implement alertmanagersChoice

* return empty array and remove non null assertion
2022-02-17 12:47:38 +01:00
Artur Wierzbicki
3e53a08090
#44449: hide dashboard preview admin UI (#45493) 2022-02-17 12:34:07 +04:00
Ryan McKinley
bb86ba99ee
Heatmap: new panel based based on uPlot (#44080)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-16 14:49:17 -08:00
Artur Wierzbicki
6c76aa71e8
Previews: capability check (#44601)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: add /previews/system-requirements API

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: update returned json

* #44449: UI changes - dashboard previews sytem req check

* #44449: lint fixes

* #44449: fix tests

* #44449: typo

* #44449: fix getSystemRequirements API: return 200 even if we plugin version is invalid

* #44449: fix getSystemRequirements API: don't return SemverConstraint on error

* #44449: fix getSystemRequirements API

* #44449: fix previews sytem requirements text

* #44449: add `doThumbnailsExist` to repo

* #44449: remove redux api

* #44449: add missing model

* #44449: implement frontedsettings-driven capability check

* #44449: simplify

* #44449: revert test changes

* #44449: add dummy setup settings

* #44449: implicit typing over `FC<Props>`

* #44449: refactor conditionals

* #44449: replace `getText` with a react component

* #44449: fix component interface

* #44449: add onRemove to `PreviewsSystemRequirements` alert

* #44449: add bottom/top margin to previewSystemRequirements modal

* #44449: merge conflict fix

* #44449: remove console.log

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-16 21:49:50 +04:00
Torkel Ödegaard
2b9e46d1f8
Angular: Option to disable angular support and isolate angular dependencies (#45421)
* Angular: Initial setting that disables angular, load angular support in separate chunk

* Load angular panels on demand

* Load alerting in separate chunk only when angularSupportEnabled

* progress, do not export core_module if angular disabled

* Progress

* Update public/app/features/plugins/built_in_plugins.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Removing remaining usage of angular from outside angular app (not counting plugins)

* Update config and docs

* Fix sample.ini

* Update public/app/features/alerting/AlertTab.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Fixing prettier issue

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-02-16 17:14:33 +01:00
Dominik Prokop
8bb3de3037
Analytics: Collect information about queries reordering (#45392) 2022-02-16 14:16:25 +01:00
Zoltán Bedi
da91c93f4a
QueryEditor: Fix setting panel state to done if query had no error (#45453) 2022-02-16 11:48:22 +01:00
Konrad Lalik
1886a59a12
Fix notification routes editing when filters are applied (#45380)
* Fix route editing when filters are applied

* Fix route delete operation, reset expanded item when filters change

* Refactor edit and delete functions, add tests

* Fix comment
2022-02-16 11:03:53 +01:00
Zoltán Bedi
befb2afccc
QueryEditor: Fix crash in angular panels when query have error (#45422) 2022-02-16 10:34:29 +01:00
Agnès Toulet
39797e33ae
Highlights: fix RS event name (#45436) 2022-02-16 08:52:18 +01:00
Ieva
11433cba97
Team access changes for editors when editorsCanAdmin is enabled (#45405)
* filter teams for editors to only show the teams that they are members of

* frontend changes to only allow clicking on teams that the user can edit

* update frontend test snapshots

* extend docs

* reword

* remove the comment for now

* Update backend tests

* reword the warning, and add it back in

* docs feedback

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-02-15 17:09:03 +00:00
Torkel Ödegaard
a757a57c6e
Prometheus: Show executed query in inspector (#45362)
* Prometheus: Show executed query in inspector

* Loki: Improving test
2022-02-15 15:02:03 +01:00
Gabriel MABILLE
d11f6a95a4
AccessControl: Enable empty list New button based on user permissions (#45398) 2022-02-15 14:51:19 +01:00
Gabriel MABILLE
91dd0563c9
AccessControl: Trigger permission reload with team removal (#45383) 2022-02-15 14:23:40 +01:00
Torkel Ödegaard
ed5b2e5210
Move QueryPartDef out from angular app (#45386) 2022-02-15 14:20:50 +01:00
Gilles De Mey
651bb773db
Alerting: do not unescape external AM label values (#45334) 2022-02-15 13:57:00 +01:00
Marcus Andersson
146eed400a
TempalteSrv: re-adding variabelExists to prevent breaking angular plugins. (#45387) 2022-02-15 13:22:13 +01:00
Hugo Häggmark
f1c4da095b
Chore: Removes console output from InspectDataTab.test.tsx (#45374) 2022-02-15 13:33:10 +02:00
Hugo Häggmark
10a9ca0ae1
Chore: Removes console outputs from runRequest.test.ts (#45375) 2022-02-15 11:12:26 +02:00
Marcus Andersson
9a12b3ea00
TemplateSrv: exposing a function to detect if a target contains a template (#45214)
* exposing a function to check if a target contains variables.

* fixed tests.

* renamed function

* updated betterer result.
2022-02-15 08:53:42 +01:00
Hugo Häggmark
21beb88a4f
Chore: Remove console ouputs from DashboardPage.test.tsx (#45373) 2022-02-15 07:40:27 +01:00
Gabriel MABILLE
6fbf346747
AccessControl: Add endpoint to get user permissions (#45309)
* AccessControl: Add endpoint to get user permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Fix SA tests

* Linter is wrong :p

* Wait I was wrong

* Adding the route for teams:creator too

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-02-11 17:40:43 +01:00
Alex Khomenko
574f609550
Init node item (#45218) 2022-02-11 16:18:33 +01:00
Torkel Ödegaard
089d6d7f7a
Alerting: Fixing minor styling issues (#45236) 2022-02-11 12:34:32 +01:00
matt abrams
8c47373d74
LibraryPanels: Prevent long descriptions and names from obscuring the delete button (#45190)
* fix library panel description wrapping

* make panel name wrap
2022-02-11 10:57:22 +00:00
Ieva
6fb3aac2e1
Access control: team UI improvements with FGAC (#45255)
* show teams page for user who can't list teams but can create teams

* Fixing buttons and routes

* Small refactor

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-02-11 09:58:37 +00:00
Torkel Ödegaard
cc49537965
Alerting: Refactor ActionIcon to use our normal Button and LinkButton components (#45227)
* Alerting: Refactor ActionIcon to use our normal Button and LinkButton components

* Fixed test

* Fixed test
2022-02-11 10:12:26 +01:00
J Guerreiro
cb461d931f
ServiceAccounts: allow deleting from service account list (#45239)
* ServiceAccounts: allow deleting from service account list

* Make delete confirmation more explicit
2022-02-10 18:21:04 +01:00
Karl Persson
d2b9da9dde
Access control: Support uids for resource permissions (#45226)
* add middleware to solve uid -> id for requests
2022-02-10 17:47:48 +01:00
Ashley Harrison
ec48b81388
Unescape regex string (#45137) 2022-02-10 14:45:39 +00:00
Jack Westbrook
979907e9dd
Chore: Set tsconfig target to ES6 (#44842)
* chore(tsconfig): update grafana/tsconfig to 1.2.0 for outputting es6

* rewrote the unsubscription part to use first().

* test: update failing tests to work with es6 output

* removed bug where we dispatch a promise instead of an array of ritch history.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-02-10 14:37:39 +01:00
J Guerreiro
7b397184a0
ServiceAccounts: add role picker to service accounts list (#45127) 2022-02-10 14:04:07 +01:00