* *Create Caching Config interface and OSS impl
*Create front-end facing DS Cache config
*Populate Caching Config on Datasource DTO
*Update OSS wire deps
* fix unit test
* handle query caching TTL override on the frontend
* Make sure the override works with pubdash
* move caching config to the right place in the ds info
* move caching config logic to enterprise index hook
* move queryCachingTTL to pubdash query payload
* Remove from metadata (not needed)
* rename struct and add comment
* remove invalid wire dependency
* manual revert of 395c74b
* fix frontend test
* fix backend test
* fix tests for real this time
* truly fix frontend test
* fix back end unit test for real
* Keybindings: No global keybindings on chromeless pages
* simplify condition
* Refactoring
* Align name and file
* Move logic into AppChrome
* minor fix
* Update Page.tsx
* Fixing test
* Fixed tests
* More fixes
* Fixed more tests
* Fixing final test
* Fixed search in old nav
* Add is_paused attr to the POST alert rule group endpoint
* Add is_paused to alerting API POST alert rule group
* Fixed tests
* Add is_paused to alerting gettable endpoints
* Fix integration tests
* Alerting: allow to pause existing rules (#62401)
* Display Pause Rule switch in Editing Rule form
* add isPaused property to form interface and dto
* map isPaused prop with is_paused value from DTO
Also update test snapshots
* Append '(Paused)' text on alert list state column when appropriate
* Change Switch styles according to discussion with UX
Also adding a tooltip with info what this means
* Adjust styles
* Fix alignment and isPaused type definition
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* Fix test
* Fix test
* Fix RuleList test
---------
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
* wip
* Fix tests and add comments to clarify AlertRuleWithOptionals
* Fix one more test
* Fix tests
* Fix typo in comment
* Fix alert rule(s) cannot be paused via API
* Add integration tests for alerting api pausing flow
* Remove duplicated integration test
---------
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Add export button for exporting all alert rules in alert list view
* Add RBAC for export button
* Use provisioningPermissions.read in getRulesAccess method instead of directly using AccessControlAction.AlertingProvisioningRead
* rename routes and fix access control for support bundles
* AccessControl: Hide menu if not authorized
* AccessControl: Add AC guards for create and delete
* lint
* Create DataSourceWithLogsSampleSupport check and move to 1 place
* Add new SupplementaryQueryType
* Add and change utility functions for loading, storing ancd checking supp queries
* Add logic to redux for processing of new type of supp query
* Implement queryLogsSample used to run samples queries
* Fix tests to include also Log samples
* Add tests
* Temporarily, default to false
* Change comment
* Fix lint error
* Refactor handling of supplementary queries in query.ts
* Fix looping over array
* Remove changes for any => unknowns as in utils.ts
* Fix logic
* Fix incorrect imports after function was moved to different file
* Migrate old log volume key
* Update public/app/features/explore/utils/supplementaryQueries.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Refactor to use DataSourceWithSupplementaryQueriesSupport
* Refactor, improve tests, change internal API
* Update packages/grafana-data/src/types/logs.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add deprecation for DataSourceWithLogsVolumeSupport, but still support it
* Update comment with correct new issue
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Rename log volume in redux to supp query to make it more generic
* Change enabled query to queries
* Small spell fix StoreSuppQueryDataProviderAction -> storeSuppQueryDataProviderAction
* WIP
* Improve
* WIP
* Rename
* Move to 1
* Small updates
* Use enum
* Unify naming
* Use SUPP_QUERY_TYPES instead of Object.keys()
* Move SuppQueryType to types/explore
* Rename suppQuery to supportingQuery
* Rename SUPP_QUERY_TYPES to SUPPORTING_QUERY_TYPES
* Rename supporting to supplementary 🙈
* Remove suppQueryData && suppQueryData.data[0] check as it is redundant
* Update public/app/features/explore/state/query.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Update public/app/features/explore/state/query.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Fix naming of SupplementaryQuery interface
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add auth labels and access control metadata to org users search results
* Fix search result JSON model
* Org users: Use API for pagination
* Fix default page size
* Refactor: UsersListPage to functional component
* Refactor: update UsersTable component code style
* Add pagination to the /orgs/{org_id}/users endpoint
* Use pagination on the AdminEditOrgPage
* Add /orgs/{org_id}/users/search endpoint to prevent breaking API
* Use existing search store method
* Remove unnecessary error
* Remove unused
* Add query param to search endpoint
* Fix endpoint docs
* Minor refactor
* Fix number of pages calculation
* Use SearchOrgUsers for all org users methods
* Refactor: GetOrgUsers as a service method
* Minor refactor: rename orgId => orgID
* Fix integration tests
* Fix tests
Time range added for public dashboard:
- Enable/Disable switch added in public dashboard configuration.
- Time range picker shown in public dashboard for viewer user
* navtree.go: update Data sources title and subtitle
* DataSourceList: move add button to header
* DataSourcesList: add buttons to items
The action buttons are added inside `<Card.Tags>` so that they end up at
the right end of the card, as it was designed.
The "Build a Dashboard" button's functionality is not defined yet.
* DataSourcesListHeader: add sort picker
* fix css
* tests: look for the updated "Add new data source" text
* tests: use an async test method to verify component updates are wrapped in an act()
* update e2e selector for add data source button
* fix DataSourceList{,Page} tests
* add comment for en dash character
* simplify sorting
* add link to Build a Dashboard button
* fix test
* test build a dashboard and explore buttons
* test sorting data source elements
* DataSourceAddButton: hide button when user has no permission
* PageActionBar: remove unneeded '?'
* DataSourcesList: hide explore button if user has no permission
* DataSourcesListPage.test: make setup prop explicit
* DataSourcesList: use theme.spacing
* datasources: assure explore url includes appSubUrl
* fix tests and add test case for missing permissions
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* First commit with working version of sub-tables using subData array
* Update TableContainer and query result to support a dataframe array for the table result
* Fix border issue by moving the subtable to above the cells in the DOM
* Allow header to be configurable using custom options.
* Update TablePanel to support sub-tables
* Fix main row links
* Added tests
* Fix TablePanel correctly splitting frames and sub-frames by using refId
* Move layout to paneleditor, make SplitPaneWrapper more generic
* Read/write the size ratio in local storage
* Add min height to enable scrollbar
* Enable show/hide panel options
* Add new component to explore
* Add styles
* Bring in code from other branch
* Fix update size function, add min size to explore container
* Add window size, save width as a ratio
* Fix tests
* Allow for one child
* Remove children type definition
* Use library methods for min/max size instead of hooks
* support folderuid in FolderPicker
* support folderuid in unified alerting
* support folderuid when returning to view mode after editing a panel
* support folderuid when preselecting the folderpicker in dashboard general settings
* support folderuid when saving dashboard
* support folderuid when pre-selecting folderpicker in dashboard form
* support folderuid in routes when loading a dashboard
* support folderuid when saving dashboard json
* support folderuid when validating new dashboard name
* support folderuid when moving dashboard to another folder
* support folderuid on dashboard action buttons
* support folderuid when creating a new dashboard on an empty folder
* support folderuid when showing library panel modal
* support folderuid when saving library panel
* support folderuid when importing dashboard
* fixed broken tests
* use folderuid when importing dashboards
* remove commented line
* fix typo when comparing uid values
* TeamList: break out rows to its own component
* TeamsState: Add total count
* TeamList: Remove teamsCount prop
* TeamList: Restructure code and use count from backend response
* TeamList: calculate total pages using totalCount
* TeamList: Rename to state to currentPage and the reducer to
setCurrentPage
* TeamList: remove wrapper functions
* TeamList: rewrite as a functional component
* TeamList: export components for test
* TeamList: pass limit, page and query to backend
* TeamList: Rename properties in state and create actions for page and
query change
* TeamList: Add flag to control if EmptyList banner should render
This PR splits the create and update paths for public dashboards and includes assorted refactors toward a proper REST API. Additionally, we removed the concept of a "public dashboard config" in favor of "public dashboard"
Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/database.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
lastFile:pkg/services/libraryelements/writers.go
* user essentials mob! 🔱
* support filterFolderUIDs in the frontend
* move common logic to a variable
* fixed FolderLibraryPanelsPage and improved unit test
* fix backend lint error
* fix formatting error
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
* Attach static generic data link to data frames in Explore
* WIP
* Always load correlations config when the query is run
This will be moved to Wrapper.tsx and called only once Explore is mounted
* remove comment
* Load the config when Explore is loaded
* Clean up
* Check for feature toggle, simplify cod
* Simplify the code
* Remove unused code
* Fix types
* Add a test for attaching links
* Revert package.json changes
* Display title provided in the correlation label
* Add missing mocks
* Fix tests
* Merge branch 'main' into ifrost/integration/attach-generic-data-link
# Conflicts:
# public/app/features/explore/Wrapper.tsx
# public/app/features/explore/state/main.ts
* Remove redundant async calls
* Do not block Wrapper before correlations are loaded (only delay the query)
* Test showing results after correlations are loaded
* Post-merge fix
* Use more consistent naming
* Avoid null assertions
Co-authored-by: Elfo404 <me@giordanoricci.com>
* Flamegraph
* Updated flame graph width/height values
* Fix top table rendering issue
* Add feature toggle for flamegraph in explore
* Update tests
* Hide flamegraph from dash panel viz list if feature toggle not enabled
* Show table if no flameGraphFrames
* Add flame graph to testdata ds
* Minor improvement
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)
* Add interfaces for contact point errors
* [WIP] Create fake response for the new service to get contact point errors
* [WIP] Create action an reducer for the new service to get contact point errors
* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes
* [WIP] Use store to get error count
* Show number of integrations errors at the contact points main view
* Add warning icon and refactor styles using getStyles
* Change lastNotify type to string instead of DateTime
* Use Stack component from experimental library when it is possible
* Alerting: Add receivers error feedback in contact point list (#52524)
* Refactor types for contact points state
* Add health column in ReceiversTable in case error state is available for this AM
* Create method for converting contact points state DTO to the FE type used in Redux store
* Update types
* Fix indexOf criteria getting integration type
* Change type name to integrationType name
* Change new components to be named functions to follow the FE style-guide
* Fix typos
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Decouple ReceiversTable from Redux state
* Create private useContactPointsState hook to simplify code in ReceiversTable component
* Add tests for getIntegrationType and refactor the method to validate the name
* Add tests for contactPointsStateDtoToModel method
* Remove unnecessary check
* Use Badge compoment for health status in contact point list
* Create new method parseIntegrationName to simplify getting types and index from integration name
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Alerting: Show integrations error feedback when expanding contact point in list (#52920)
* Use DynamicTable for rendering list of contact points and make them expandable if error status is available
* Render expanded content for contact points integrations
* Style and format last notify column
* Add send resolve column to the integration details
* Fix receiver id for DynamicTable row
* Update clock icon in integration state
* Fix tests
* Add PR review sugestions
* Alerting/integrations error feedback handle null dates in response 3 (#55659)
* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes
* Update LastNotify in ReceiversTable component to handle null date
* Alerting/integrations error feedback handle 404 state not available (#55803)
* Create fetchContactPointsState using the future contact point url and handle 404 error
* Add contact points state tests
* Alerting/update receivers dto naming 2 (#56201)
* Update NotifierStatus naming and fix sendResolved not being updated in UI
* Return always empty ContactPointsState array when catching an error in the request response
* Fix test
* Show notification status only in notifications main view
* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response
* Add PR review suggestions
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"
This reverts commit 0a5aa19ca2.
* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"
This reverts commit c3e4f1f876.
* Add split resize to Explore without keeping width in state
* debug commit
* ugly hack around split lib only supporting one child
* Use SplitView to accomodate one or two elements, remove debug code, fix test
* More cleanup, fix state action
* Fix even split from manual size scenario
* cleanup
* Add new state elements to test
* Handle scrollable on internal element for virtualized lists
* Left align overflow button for explore
* Change min/max buttons
* Apply suggestions from code review
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Add more suggestions from the code review
* Fix problems tests found
* commit broken test with debug info
* Add test, remove debug code
* Remove second get of panes
* Remove second get of panes
Co-authored-by: Elfo404 <me@giordanoricci.com>
* Initial progress
* Moving keybindingSrv to context
* Simplfy KioskMode
* Removed unused logic
* Make kiosk=tv behave as before but when topnav is enabled
* Minor fix
* Fixing tests
* Fixing bug with notice when entering kiosk mode
* Fixed test
* RBAC: Allow app plugins restriction
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Moving declaration to HttpServer
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Picking changes from the other branch
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Rename plugins.settings to plugins
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Account for PluginAdminExternalManageEnabled
Co-authored-by: Will Browne <will.browne@grafana.com>
* Set metadata on instantiation
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: marefr <marcus.efraimsson@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>