* this is an ok intermediate point
* delete some unused actions + fix tag invalidation on folder save
* remove prefetching for now (it creates a permanent subscription?!)
* leave paginated fetch out of rtk query for now
* ensure we're invalidating the cache correctly
* fix dashboard saving
* simplify
* recursively invalidate children on rename
* tidy up
* don't need to invalidate tags on delete
* don't need to invalidate on new either
* make new refreshParents action
* pageheader spacing
* invalidate getFolder on move
* bit of rearrangement
* Remove storing derived state (loading property) and use a selector instead
* Remove redundant tests
There's no way to change the interval while live streaming
* Remove check for isLive when deriving waiting for data
It was introduced in #18804
* Remove unused props
* ui migration WIP
* merge
* migration tests for api
* revert chagnes to align with main
* revert chagnes to align with main
* revert chagnes to align with main
* remove unused code and comments
* revert gen files
* retry logic inplace
* fix a any
* fixed types
* migraiton results now show only result if no failures
* review comments
* wording to make it more actionable
* add migraiton summary text onyl for failed apikeys
* fixed wording and added a close button to the modal
* made the button close the modal
* moved state into component
* fix based on review, naming and removed unused code
* service account migration state optional
* making migration result undefined
* showing total and migrated numbers for a successful migration
* fix payload const to take the payload
* update FolderDTO to match backend struct
* hacky way to get folder page breadcrumbs working
* hacky way to get dashboard nested breadcrumbs working
* undo route changes, get url from folder
* fix breadcrumbs in dashboard settings
* add parent pages to navIndex
* adjust getRootSectionForNode to just return the parent of a leaf node
* undo changes to generated files
* undo changes to toggles_gen.go
* feature toggle dashboardInit code
* remove unnecessary code in home dashboard
* build navModel directly, don't use getNavModel
* don't need fallback here
* remove getLoadingNav since it's not used anymore
* don't need to hide tabs from breadcrumbs anymore
* use id to find dashboards tab
* adds icon and text to the card if enabled in inifile
* make use of verbose settings
* add state to enabledInIniFile
* rename to configFound and removal of default values
* 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>
* Draft: Feature: Trusted Types support
* remove trusted-types package
* Create policy before jQuery and Angular is loaded and add feature flag
* Add trustedTypePolicies
* Sanitize scriptURL
* Add TT meta tag for test env
* Move trusted types into core
* Add DOMParser support for TrustedHTML
* Seperate RSS sanitization and add better TrustedHTML support
* Get test CSP header from config
* Remove dompurify dep from core
* Add documentation for trusted types
* Apply suggestions from code review
Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>
* Add comment about Github discussion thread and things breaking
* Remove changes from News panel
* Remove TT feature toggle
* Expose TT and CSPReportOnly to frontend
* Log errors in console when CSP report only is enabled
* Log error for reporting and remove test mode
* Only insert CSP header in HTML for dev env
* Update docs
---------
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* WIP
* Add instance totals to combined rule. Use totals to display instances stats in the UI
* WIP
* add global summaries, fix TS errors
* fix useCombined test
* fix test
* use activeAt from rule when available
* Fix NaN in global stats
* Add no data total to global summary
* Add totals recalculation for filtered rules
* Fix instances totals, remove instances filtering from alert list view
* Update tests
* Fetch alerts considering filtering label matchers
* WIP - Fetch alerts appending state filter to endpoint
* Fix multiple values for state in request being applyied
* fix test
* Calculate hidden by for grafana managed alerts
* Use INSTANCES_DISPLAY_LIMIT constant for limiting alert instances instead of 1
* Rename matchers parameter according to API changes
* Fix calculating total number of grafana instances
* Rename matcher prop after previous change
* Display button to remove max instances limit
* Change matcher query param to be an array of strings
* Add test for paramsWithMatcherAndState method
* Refactor matcher to be an string array to be consistent with state
* Use matcher query string as matcher object type (encoded JSON)
* Avoind encoding matcher parameters twice
* fix tests
* Enable toggle for the limit/show all button and restore limit and filters when we come back from custom view
* Move getMatcherListFromString method to utils/alertmanager.ts
* Fix limit toggle button being shown when it's not necessary
* Use filteredTotals from be response to calculate hidden by count
* Fix variables not being replaced correctly
* Fix total shown to be all the instances filtered without limits
* Adress some PR review comments
* Move paramsWithMatcherAndState inside prometheusUrlBuilder method
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
* remove metadata for single folder listing
* extendTests
* remove ac metadata from dash and folder search results
* remove test
* remove one more test
* put ac metadata back for single folder API responses
* extend tests
* remove ac metadata from folder frontend object
* undo unneeded change
* PR feedback
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* feat: add clear logs to explorer's live logs
* refactor live logs pause/resume updating logic
* add tests for clearing live logs
* rm unused imports
* move `onClear` live logs logic to redux
* move clear logs tests to `query.test`
* use utils `sortLogsRows` and Button's icon props
* rename `filterLogRows` and add `clearedAt` as an arg
* mv clearedAt type closer to live tailing items and add jsdoc
* mv `filterLogRowsByTime` to `/utils` and use it at `LiveLogs` component
* make `Exit live` button consistent with other actions
* use `sortLogRows` and fix timestamp by id on `makeLogs`
* change clear live logs from based on timestamp to index on logRows
* assign `null` to `clearedAtIndex` on first batch of logs live
* move `isFirstStreaming` implementation to `clearLogs` reducer
* fix `clearLogs` tests
* Update public/app/features/explore/state/query.ts
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Add initial authentication config page skeleton
* Add initial SAML config page WIP
* Add few more pages
* Add connect to IdP page
* Assertion mappings page stub and url params
* Able to save settings
* Some tweaks for authentication page
* Tweak behaviour
* Tweak provider name
* Move SAML config pages to enterprise
* minor refactor
* Able to reset settings
* Configure key and cert from UI
* Refactor WIP
* Tweak styles
* Optional save button
* Some tweaks for the page
* Don't show info popup when save settings
* Improve key/cert validation
* Fetch provider status and display on auth page
* Add settings list to the auth page
* Show call to action card if no auth configured
* clean up
* Show authentication page only if SAML available
* Add access control for SSO config page
* Add feature toggle for auth config UI
* Add code owners for auth config page
* Auth config UI disabled by default
* Fix feature toggle check
* Apply suggestions from review
* Refactor: use forms for steps
* Clean up
* Improve authentication page loading
* Fix CTA link
* Minor tweaks
* Fix page route
* Fix formatting
* Fix generated code formatting
* fix: disable orgrolepicker if externaluser is synced
* add disable to role picker
* just took me 2 hours to center the icon
* wip
* fix: check externallySyncedUser for API call
* remove check from store
* add: tests
* refactor authproxy and made tests run
* add: feature toggle
* set feature toggle for tests
* add: IsProviderEnabled
* refactor: featuretoggle name
* IsProviderEnabled tests
* add specific tests for isProviderEnabled
* fix: org_user tests
* add: owner to featuretoggle
* add missing authlabels
* remove fmt
* feature toggle
* change config
* add test for a different authmodule
* test refactor
* gen feature toggle again
* fix basic auth user able to change the org role
* test for basic auth role
* make err.base to error
* lowered lvl of log and input mesg
* add: hide apikeys tab on start
* make use of store method
* added hiding of apikeys tab for new org creation
* missing err check
* removed unused files
* implemennted fake to make tests run
* move check for globalHideApikeys from org to admin
* refactor to remove the fake
* removed unused method calls for interface
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* remove the checkglobal method
* removed duplicate global set const
* add count of apikeys for performance
* remove apikeys adding in UI
* added back deleted file
* added comment on component
* changed wording and copy for hiding and migrating service accounts
* refactor: remove migrationstatus in front/backend
This removes the migrationstatus state from the UI in favor of only
looking at the number of API keys to determine what to show to the user.
This simplifies the logic and makes less calls to the backend with each
page load. This was called both on the API keys page and the Service
accounts page.
- removes the state of migrationstatus from the UI
- removes the backend call
- removes the backend endpoint for migrationstatus
* Update pkg/services/apikey/apikeyimpl/xorm_store.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* changes the contet to also be primary
* change id of version for footer component
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* WIP
* feat: update CSS for long names
also adds broken href, to fix later
* Create correct link using CombinedRules
* Use link instead of button for alert link
* Updates from PR review
* Handle loading,haveResults and dispatched state for both promRules and rulerRules
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Datasource Onboarding: Prevent flickering of onboarding page after first load
* add loading state to loadDatasources & refactor
* fix test
* avoid loading state when loading datasources on add
* fix test
* add explainer on why fetching datasources is needed
* *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