Commit Graph

1173 Commits

Author SHA1 Message Date
Josh Hunt
333c858bc6
GrafanaUI: Prevent code editors from 'trapping' scroll (#77125)
* GrafanaUI: Prevent CodeEditor from 'trapping' scroll

* fix test

* fix lint for unused import
2023-10-25 19:21:54 +03:00
Konrad Lalik
4fc0294aab
Add logging prometheus and ruler rules totals (#76812) 2023-10-25 16:47:32 +02:00
Ashley Harrison
5f2fd8935d
Spinner: Fix so that the size property is correctly applied (#77135)
* correctly apply spinner sizes, refactor to have standard sizes

* better prop definitions so constant values show in IDEs

* 12 is xs, not sm
2023-10-25 15:39:32 +01:00
Gilles De Mey
e12e40fc24
Alerting: Contact Points v2 part IV (#76063) 2023-10-25 15:57:53 +02:00
Sonia Aguilar
f1ce73dc2c
Alerting: Fix NoRulesSplash being rendered for some seconds, fater creating a rule (#77048)
* Fix NoRulesSplash being rendered for some seconds, fater creating a rule

* Add ruler response/loading,dispatched,error to the logic in hasNoAlertRulesCreatedYet expression
2023-10-25 09:32:28 +02:00
Sonia Aguilar
ed54239a9f
Alerting: Dont show 1 firing series when no data in Expressions PreviewSummary (#76981)
* Dont show 1 firing series when no data in Expressions PreviewSummary

* Add comment to make clear we need to filter out undefineds for firing count

* Move logic to a new getGroupedByStateAndSeriesCount method and added test to it
2023-10-24 15:50:50 +02:00
Ashley Harrison
07cc7504ee
Icon: Simplify and remove wrapping <div> (#76819)
* remove wrapping div

* update tests, just gotta figure out how to handle fontawesome :(

* add spinner.svg which matches the font-awesome spinner

* add mock for react-inlinesvg

* update mock and fix some tests

* fix FormField test

* fix CorrelationsPage tests

* increase timeout
2023-10-24 12:16:32 +01:00
Gilles De Mey
390408b1ce
Alerting: Fix incorrect decoding for alert rules with % characters (#76148)
* fixes incorrect decoding for alert rules with % characters

* Patch history package to stop decoding path

* Rename rule id extraction function, update tests

* Fix patch file

* Fix copyFrom parameter encoding

* Fix conflict commit

* Fix test

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2023-10-19 11:51:52 +02:00
Sonia Aguilar
1de65bb384
Alerting: Add Alerting menu in getPanelMenu (#76618)
* Add Alerting menu in getPanelMenu

* Add translations

* Allow alert tab, heart icon in all panel types, and not show warning in DashobardPicker panels

* Fix tests

* Move alerting submenu under 'More...' item

* Move create alert menu item to More... without submenu

* Update translations

* Revert "Allow alert tab, heart icon in all panel types, and not show warning in DashobardPicker panels"

This reverts commit 225da3f60e.

* Revert allowing alert tab and health icon for all panel types

* use onCreateAlert method name in onClick instead of new function

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Move getAlertingMenuAvailability method to a /features/alerting folder and rename it to getCreateAlertInMenuAvailability

* Use onCreate direclty instead of a new method

* Make getCreateAlertInMenuAvailability to return a boolean

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-10-18 15:13:38 +03:00
Alexander Weaver
0592fe7edb
Alerting: Add support for msteams contact point in external Alertmanagers (#76392)
* Add support for msteams contact point in external AMs

* Update docs
2023-10-13 10:43:42 -05:00
Torkel Ödegaard
b01cbc7aef
Dashboard: Fixes save drawer always comparing changes against first loaded version (#76506)
* Dashboard: Fixes save changes diff after first save

* Lots of type issues

* better fix

* Update some more places to use new function

* Fix

* Update

* Update

* remove console.log

* Update
2023-10-13 16:23:23 +02:00
George Robinson
09a4fcd0fe
Alerting: Add docs for Repeat interval (#76303) 2023-10-13 10:30:13 +01:00
Yuri Tseretyan
372082d254
Alerting: Export of contact points to HCL (#75849)
* add compat layer to convert from Export model to "new" API models
2023-10-12 22:33:57 +01:00
Konrad Lalik
42f4244026
Alerting: Add rules export on a folder level (#76016) 2023-10-12 20:17:32 +03:00
Yuri Tseretyan
c4ac4eb41b
Alerting: Export of notification policies to HCL (#76411) 2023-10-12 12:10:08 -04:00
Virginia Cepeda
358b395c2b
Alerting: text updates / replace panel (#76407)
* Change text to remove "week" reference

* Add alertsByState for grafana alertmanager
2023-10-12 13:26:05 +01:00
Sonia Aguilar
fbbf9b1a8f
Alerting: Use new endpoints in the Modify Export (#75796)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-10-12 09:04:59 +02:00
Virginia Cepeda
ea50695cfe
Alerting: add help texts to insights (#76366)
* Change texts and add spacing between sections

* Minor text changes

* Display timeseries with 0 values if result is empty
2023-10-11 23:10:23 +01:00
Torkel Ödegaard
72a1de855c
Schema: Clean up / correct panel schema (#76346)
* Schema: Clean up / correct panel schema

* fixes
2023-10-11 15:56:42 +02:00
Ieva
5e14d93530
Chore: remove hasAccess and hasAcessInMetadata (#76237)
* remove hasAccess and hasAcessInMetadata in favour of hasPermission and hasPermissionInMetadata

* test fixes

* more test fixes
2023-10-10 12:04:07 +01:00
Jo
28c0fb1cfd
AccessControl: Remove legacy frontend AC checks (#76187)
* remove legacy ac checks

* fix RBAC disabled tests

* add permissions for tests to work

* fix unifiedalertstatesworker test
2023-10-09 18:10:06 +02:00
Josh Hunt
07266aa983
Rewrite old useStyles2 pattern to use new pattern (#76136)
* Rewrite old useStyles2 pattern to use new pattern

* fix lint from used imports
2023-10-09 10:49:08 +01:00
Torkel Ödegaard
fc0933d5f4
Schema: Clean up dashboard variables schema (#76121)
* Cleanup variable schema model

* minor fix

* remove type ignores that are no longer type errors
2023-10-09 09:10:52 +02:00
Virginia Cepeda
095749b131
Alerting: display datasource information under each section (#76070)
* display datasource information under each section

* Minor - change legend to multi in some panels that were missing it

* Don't show ds info to grafana sections

* Remove unused classname

* Remove unused import

* Fix pickers styling by placing it to the right
2023-10-06 14:36:26 -03:00
Virginia Cepeda
4d1f8f21bf
Alerting: Add timepicker and autorefresh picker to Insights (#76045)
Add timepicker and autorefresh picker
2023-10-06 09:24:45 -03:00
Ashley Harrison
171e2c1adb
Chore: Improve typings and ignore Graph (#75742)
* fix some types, ignore graph plugin as it'll be gone soon

* update comments

* more more more

* undo renderer change

* use Partial in the editor
2023-10-06 11:48:15 +01:00
Virginia Cepeda
68c25080e6
Alerting: Allow users to give feedback on each insights panel (#75990)
* Add menu to track user feedback on each pane;

* Add RatingModal component

* Open modal with panel header actions

* Fix lint
2023-10-05 09:02:18 -03:00
Virginia Cepeda
1d2bdb8f75
Alerting: improve insights UX (#75320)
* Fix legend for grafana missed iterations panel

* Change panel titles capitalization

* Change tooltip mode to "multi" for timeseries panels

* Add panel tooltips

* Change colors of series (red for firing, blue for neutral)

* Remove unneeded import

* Change panel title and firing alert colors

* Change constant timeseries panels to stat

* Avoid showing legend in panels with just one metric

* Add eval duration / interval ratio panel

* Fix legend

* Fix lint

* Rename panel titles

* Make firing instances table entries have link styling

* Fix betterer

* Add section subheaders

* Override colors and tooltip mode

* Address latest feedback

* Rename table to reflect we're showing rules data and not instances

* Rework most fired rules panel to show numbers instead of trend

* Improve legends and colors

* Fix most fired rules panel

* Missed Iterations: Override legend to display it in a more user friendly way

* Change tab names

* Position grafana-managed scenes under collapsible row

* Show breakdown of alert instances state panels

* Addressing UX feedback

- Making stat panels display area
- Change layout for grafana-managed panels
- Refactor Duration/Interval ratio scene (make calculation directly in PromQL)

* set no value as 0 in stats panels

* Refactor color overriding to use a common function

* fix missing legend for status panels (needed to override color)

* Fix legends for Grafana alertmanager Notifications scene
2023-10-04 17:29:05 -03:00
Domas
aaaef71337
Alerting: Make shareable alert rule link work if rule name contains forward slashes (#75362) 2023-10-04 13:48:55 +02:00
Gilles De Mey
d0592fce2f
Alerting: Fix incorrect field description (#75947) 2023-10-04 13:36:53 +02:00
Sonia Aguilar
1456b26075
Alerting: Fix being redirected to list view when clicking Save rule button (#75510)
* Fix: dont allow 'Save rule' button and let 'Save rule and exit' in case of new rule

* Fix tests
2023-10-03 14:55:42 +02:00
Virginia Cepeda
9076904173
Alerting: Show Insights only for cloud users (#75676)
* Add functions to detect build edition and env

* Prevent showing insights for OSS

* Use common functions for Declare Incident button

* Address review comments
2023-10-02 13:06:30 -03:00
Armand Grillet
43d0193ea6
Mention that we only list firing alert instances (#75615) 2023-09-29 15:23:51 +02:00
Sonia Aguilar
169c5262a5
Alerting: Add Modify export feature for Grafana-managed alert rules (#75114)
* Initial POC for modified rule expor

* Add rule and group export options to modified export

* Add feature toggle for modifier export

* Rename GrafanaRuleDesigner to ModifyExportRuleForm to identify it easily as a rule form

* Refactor naming and folder for RuleDesigner => ModifyExport

* Don't render more action drop-down button when no more actions are allowed

* Redirect cancel button to alert list view

* Fix modify export page being reloaded correctly without errors

* Fix test

* Protect modify-export route when toggle-feature is not enabled

* Fix css betterer error

* Address pr review coments

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-09-28 16:07:45 +02:00
Virginia Cepeda
14e94d663f
Alerting: Show panels within collapsed rows in dashboard picker (#75490)
* Show panels within collapsed rows in dashboard picker

* Fix lint

* fix lint
2023-09-27 09:15:42 -03:00
Gilles De Mey
5a1580c659
Alerting: Contact points v2 part 3 (#72444) 2023-09-26 11:44:18 +03:00
William Wernert
925f12d0ea
Alerting: Add support for keep_firing_for field from external rulers (#75163)
* Add support for `keep_firing_for` in ruler proxy

* Don't delete `keep_firing_for` when editing a rule with the field set

Co-Authored-By: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

---------

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-09-21 16:02:53 -04:00
Virginia Cepeda
7896df7513
Alerting: Add missing scenes for grafana managed alerts (#75100)
* Add new scenes for grafana managed alerts

* Remove unused import

* Fix lint

* Remove width property from SceneFlexItem

* Add missing scenes for GMA section

* Improve scenes layout

* Add Grafana Alertmanager panels

* Fix lint

* Fix lint

* Refactor expression variables

* Apply shared styles to scenes
2023-09-21 12:07:04 -03:00
Gilles De Mey
3b2dcecbda
Alerting: Fix non-applicable error checks for cloud and recording rules (#75233) 2023-09-21 16:01:34 +02:00
Sonia Aguilar
b38454d81b
Alerting: Remove export button in alert form when editing grafana-managed alert (#75153) 2023-09-20 16:19:12 +02:00
Virginia Cepeda
0d3c47da99
[Alerting] - Display scenes using SceneAppPage for caching (#74767)
* Display scenes using SceneAppPage for caching

Also, reorganizing them in different tabs per Torkel's suggestion

* Fix lint

* Alerting home app poc

* Fix imports

* fix routing

* remove width

* Apply feature flags back

* Add comment regarding enabling the rule group query variable

* Upgrade scenes lib

* Add query variables back

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-09-19 09:17:56 -03:00
Sonia Aguilar
7209e84cd2
Alerting: Fix returnTo expression being empty when no queryParam found (#75086)
Fix returnTo expression being empty when no queryParam found
2023-09-19 14:27:01 +03:00
Sonia Aguilar
942c4779b9
Alerting: Add export drawer when exporting all Grafana managed alerts (#74846)
* Add export formats drawer when exporting contact points

* Add 'export by format' drawer in policies (root policy)

* Add test for showing export policies button

* Add tests for Policy.tsx

* Add tests for export functionality in receivers

* Add exporter drawer for receivers

* Fix prettier warnings

* Allow HCL only for alert rules exports

* Add tests for Policies

* Fix tests

* Refactor: Update ExportProviders types for limiting the avaliable export formats when using GrafanaExportDrawer

* Delete unused shouldShowExportOption method and tests

* Add exporter drawer when clicking export all Grafana managed alerts

* Fix test

* fix prettier

* lint

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-09-18 10:31:19 +02:00
Sonia Aguilar
5484e0a2d5
Alerting: Add export drawer with yaml and json formats, in policies and contact points view. (#74613)
* Add export formats drawer when exporting contact points

* Add 'export by format' drawer in policies (root policy)

* Add test for showing export policies button

* Add tests for Policy.tsx

* Add tests for export functionality in receivers

* Add exporter drawer for receivers

* Fix prettier warnings

* Allow HCL only for alert rules exports

* Add tests for Policies

* Fix tests

* Refactor: Update ExportProviders types for limiting the avaliable export formats when using GrafanaExportDrawer

* Delete unused shouldShowExportOption method and tests

* Use useAlertmanagerAbility hook to check if canReadSecrets

* Update snapshot for useAbilities test

* Fix prettier

* Convert decrypt to boolean

* Fix prettier

* Rename CanReadSecrets action to DecryptSecrets

* Update the string value for DecryptSecrets

* Fix snapshor for useAbilities after renaming the can-read-secrets
2023-09-18 08:36:50 +02:00
Virginia Cepeda
db2295bea2
Alerting: Prevent showing "Permissions denied" alert when not accurate (#74887)
* Change way of obtaining external datasources info

* Remove unneeded import

* Create function to getExternalDsAlertManagers in datasource srv

* Remove unused import
2023-09-14 11:43:46 -03:00
Gilles De Mey
af392c5886
Alerting: Always show expression warnings and errors (#74839) 2023-09-14 15:05:28 +02:00
Virginia Cepeda
5d88b8a4f5
[Alerting Insights] - Use Grafana feature flag system (#74749)
Use Grafana feature flag system
2023-09-14 09:58:04 -03:00
Kyle Brandt
35e488b22b
SSE: Localize/Contain Errors within an Expression (#73163)
Changes SSE to not always fail all queries when one fails. Now only the query itself, and nodes that depend on it will error.
---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-09-13 13:58:16 -04:00
Gilles De Mey
999aa416db
Alerting: Indicate panels without identifier (#74746) 2023-09-13 12:35:23 +02:00
Ashley Harrison
0c44a6f9bb
Chore: Improve typings 🧹 (#74599)
* various type fixes

* candlestick panel type fixes

* few more fixes

* some fixes

* more :)

* moar!

* undo change to SilencesFilter

* undo change to configureStore
2023-09-13 09:17:07 +01:00