rename "Your data source" to "Data source" page
This page was meant to be named "Data source" in the previous PR [0].
I just made a mistake by naming it wrongly.
[0]: https://github.com/grafana/grafana/pull/66813/files
* hook up getAffectedItems to the backend count route
* mock out backendSrv in unit tests
* Don't delete alert rules while API doesn't return counts
* Show alert rule counts when API returns them
* use components for modal styles
* Revert "use components for modal styles"
This reverts commit 80ac1152f8.
---------
Co-authored-by: joshhunt <josh@trtr.co>
* clear selection post move/delete
* move actions out of rtk-query
* move findItems, create selectors, refetch children when moving/deleting
* cleaner syntax
* remove unnecessary function, just put logic in the selector
* handle moving/deleting from the root
* slightly cleaner
* handle when rootItems are undefined
* handle 'general' in the fetchChildren reducer
* only refresh at the end
* don't need thunk api
* Show indeterminate checkbox for folders with partially selected children
* When selecting an item, check ancestors to see if all their children are now selected
* reword comment
* fix test
* fix lint
* Check all descendants for mixed state
* Use indeterminate checkbox
* fix test description
* make header checkbox select/unselect automatically
* mixed header checkbox:
* fix tests
* add tests
* move to me directory and sort by relevance
* refactor letter search, uFuzzy and styles out of ency
* begin state refactor
* refactor getMetaData useEffect call with useReducer
* refactor pagination with useReducer
* refactor fuzzy state for useReducer
* refactor all filters for useReducer
* remove haystacks arrays in favor of haystack dictionaries w object keys
* refactor out functions into state helpers
* switch label filter text color to work with light theme
* make each row clickable to select metric
* add pagination component
* fix max results
* make a better table with keystrokes, navigate to metric with up&down, select on enter, hide settings, make a nice button
* save space, give more real esate to the table
* add highlighting for fuzzy search matches
* add custom button in metric select option to open metric encyclopedia
* open the modal with enter keystroke
* remove unnecessary actions and variables from m.e.
* fix tests, clean code
* remove setting of selected idx on results row when hovering
* tests
* rename to metrics modal and have select option same as header
* reduce width for wider screens
* pass in initial metrics list and remove call to labels and series in metrics modal
* use createSlice from reduc toolkit to deduce actions
* save the metrics modal additional settings
* galen alphabet refactor suggestion
* remove extra row in results table
* fix storing settings, wrap in feature toggle
* remove metadata check & load because metric select already handles this
* Update public/app/plugins/datasource/prometheus/querybuilder/components/metrics-modal/LetterSearch.tsx
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* fix styles, show cursor as pointer for select option and clickable row
* taller modal for larger screens
* turn off metadata settings if usebackend is selected
* additional settings button space
* add pipe to ufuzzy metadata search
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Add Preview template and payload editor to templates form
* Add TemplatePreview test and update css
* Preview errors for each template that is wrong
* Enable preview templating only for Grafana Alert Manager
* Use harcoded default payload instead of requesting it to the backend
* Update error response in the api definition
* Add spinner when loading result for preview
* Update api request followind DD changes
* Use pre instead of TextArea to render the preview
* Fix tests
* Add alert list editor
* Add start and end time for alert generator
* Add preview for data list added in the modal
* Update copies and move submit button in alert generator to the bottom
* Copy updates
* Refactor
* Use tab instead of button to preview
* Move payload editor next to the content
* Copy update
* Refactor
* Adress PR review comments
* Fix wrong json format throwing an exception when adding more data
* Use monaco editor for payload
* Only show text 'Preview for...' when we have more than one define
* Fix some errors
* Update CollapseSection style
* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview
* Set payload as invalid if it's not an array
* Fix test
* Update text in AlertTemplateDataTable
* Add separators to distinguish lines that belong to the preview
* Use harcoded default payload instead of requesting it to the backend
* Add alert instance picker
* Add rule search capability and cleanup
* Display alert instance extra information on hover
* Rebase and integrate with existing view
* Display folder under rule name
* Display unique labels for alert instances
* Remove unneeded interface
* Reset state after closing the modal
* Refactor useEffect and useMemo
* Move common code to variable
* Refactor to avoid setting filtered rules as state
* Disable instance selector button when there are errors in the payload
* Validate payload on button click
* Change warning text
* Add support for state filters in alertmanager alerts request
* Use RTK Query to fetch alert instances
* Address review comments
* Fix lint
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* Add Preview template and payload editor to templates form
* Add TemplatePreview test and update css
* Preview errors for each template that is wrong
* Enable preview templating only for Grafana Alert Manager
* Use harcoded default payload instead of requesting it to the backend
* Update error response in the api definition
* Add spinner when loading result for preview
* Update api request followind DD changes
* Use pre instead of TextArea to render the preview
* Fix tests
* Add alert list editor
* Add start and end time for alert generator
* Add preview for data list added in the modal
* Update copies and move submit button in alert generator to the bottom
* Copy updates
* Refactor
* Use tab instead of button to preview
* Move payload editor next to the content
* Copy update
* Refactor
* Adress PR review comments
* Fix wrong json format throwing an exception when adding more data
* Use monaco editor for payload
* Only show text 'Preview for...' when we have more than one define
* Fix some errors
* Update CollapseSection style
* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview
* Set payload as invalid if it's not an array
* Fix test
* Update text in AlertTemplateDataTable
* Add separators to distinguish lines that belong to the preview
* Fix text
* Use subDays instead of addDays for substracting days
* - initial work on data source config page
* - add links to test status box
- add tracking function
* - add test for the DataSourceConfigAlert component
* - fix flicker of the alert box
* - fix the build
* - small improvements
* - fix failing build
* - fix failing unit tests
* - prettier and betterer fixes
* - fix failing e2e tests
* - fix build again
* - rewrite solution according to the PR comments
* - cleanup
* - fix failing e2e
* - use absolute path in link
* Minor fixes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* change from role grant overrides to SAML UI specific config option
* update permissions needed to access SAML UI
* PR feedback: change config name, change required perms to write, add a comment
* Update behavior of defaults in connection limits
* Refactor to use config object instead
* Refactor remove unneeded function
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>