* wip
* WIP: Added some actions, timings and grouping
* WIP: remove reducer and use form fields instead
* Show defaults when using override in route settings
* Update alert rule model for simplified routing
* Use defaults in placeholders when overriding timings
* Add validation for contact point
* Add selected contact point details
* Refactor: extract components to separate files and reorg in subfolders
* Fix test
* Update revalidate mode in form
* Extract RuleEditorSectionBody outside NotificationStep component to avoid unmounting any time this one renders
* Remove reValidateMode option in form
* Fix after merging
* Address PR review comments part1
* Address PR review comments part2
* Create routeTimingsFields constant to reuse labels, descriptions and arial labels for the mute timing fields
* Move conditional rendering to the parent in AutomaticRooting and ManualAndAutomaticRouting
* Simplify AlertManagerManualRouting properties
* Drop from API response
* Drop from swagger docs
* Drop from integration tests
* regenerate public swagger docs
* Drop from frontend
* Drop asserts for namespaceID field
* Add anonymous stats and user table
- anonymous users users page
- add feature toggle `anonymousAccess`
- remove check for enterprise for `Device-Id` header in request
- add anonusers/device count to stats
* promise all, review comments
* make use of promise all settled
* refactoring: devices instead of users
* review comments, moved countdevices to httpserver
* fakeAnonService for tests and generate openapi spec
* do not commit openapi3 and api-merged
* add openapi
* Apply suggestions from code review
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* formatin
* precise anon devices to avoid confusion
---------
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: jguer <me@jguer.space>
* Add `isManaged` property to frontend model
* Remove enabled and token buttons for managed SA
* Replace trash icon for lock icon for managed SA
* Block the role picker for managed SA
* Filter SA list usiong the managed filter
* Rename external for managed
* Add only managed filter
* Toggle the enable buttons for managed sa
* Disable add token and delete token buttons
* Remove the edit name button
* Disable the Role picker for managed sa
* Hide the permissions section
* Add managed by row
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add `isExternal` property to frontend model
* Remove enabled and token buttons for external SA
* Replace trash icon for lock icon for external SA
* Block the role picker for external SA
* Filter SA list using the external filter
* Add only external filter at backend
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Add transformation add modal and use it
* Hook up saving
* Add transformation vars to var list, show added transformations
* Form validation
* Remove type assertion, start building out transformation data in helper (WIP)
* Style expression better, add delete logic
* Add ability to edit, additional styling on transformation card in helper
* simplify styling, conditionally run edit set up logic
* Keep more field information in function, integrate it with new editor
* Show default label on collapsed section, use deleteButton for confirmation of deleting transformations
* Change transformation add calculations from function to hook, add label to collapsed header, add transformation tooltip
* Make correlation and editor dirty state distinctive and integrate, WIP
* Track action pane for more detailed messaging/actions
* Better cancel modal logic
* Remove changes to adminsitration transformation editor
* Remove debugging line
* Remove unneeded comment
* Add in logic for closing editor mode
* Add tests for modal logic
* Use state to build vars list for helper
* WIP
* Fix labels and dirty state
* Fix bad message and stop exiting mode if discard action is performed
* Fix tests
* Update to not use unstable component and tweak default label
* Role picker: Load users roles in batch
* Use orgId in request
* Add roles to OrgUser type
* Improve loading logic
* Improve loading indicator
* Fix org page
* Update service accounts page
* Use bulk roles query for teams
* Use POST requests for search
* Use post request for teams
* Update betterer results
* Review suggestions
* AdminEditOrgPage: move API calls to separate file
* Start adding correlations editor mode
* Add selector for merge conflict resolution
* Enable saving
* Build out new corelation helper component
* flesh out save with label/description, change color
* Have breadcrumb exit correlation editor mode
* Add extension property to show/hide, use it for correlations
* Bring in feature toggle
* Remove unnecessary param
* Cleanup
* Parse logs json
* Work on correlation edit mode bar
* Tinker with a top element for the editor mode
* Handle various explore state changes with correlations editor mode
* WIP - add unsaved changes modal
* Have correlation bar always rendered, sometimes hidden
* Add various prompt modals
* Clear correlations data on mode bar unmount, only use not left pane changes to count as dirty
* Move special logic to explore
* Remove all shouldShow logic from plugin extensions
* remove grafana data changes
* WIP - clean up correlations state
* Interpolate data before sending to onclick
* Override outline button coloring to account for dark background
* More cleanup, more color tweaking
* Prettier formatting, change state to refer to editor
* Fix tests
* More state change tweaks
* ensure correlation save ability, change correlation editor state vars
* fix import
* Remove independent selector for editorMode, work close pane into editor exit flow
* Add change datasource post action
* Clean up based on PR feedback, handle closing left panel with helper better
* Remove breadcrumb additions, add section and better ID to cmd palette action
* Interpolate query results if it is ran with a helper with vars
* Pass the datasource query along with the correlate link to ensure the datasource unique ID requirement passes
* Use different onmount function to capture state of panes at time of close instead of time of mount
* Fix node graph’s datalink not working
* Actually commit the fix to saving
* Fix saving correlations with mixed datasource to use the first query correlation UID
* Add tracking
* Use query datasources in mixed scenario, move exit tracking to click handler
* Add correlations to a place where both can be used in the correlations editor
* Be more selective on when we await the datasource get
* Fix CSS to use objects
* Update betterer
* Add test around new decorator functionality
* Add tests for decorate with correlations
* Some reorganization and a few tweaks based on feedback
* Move dirty state change to state function and out of component
* Change the verbiage around a little
* Various suggestions from Gio
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* More small Gio-related tweaks
* Tie helper data to datasource - clear it out when the datasource changes
* Missed another Gio tweak
* Fix linter error
* Only clear helper data on left pane changes
* Add height offset for correlation editor bar so it doesn’t scroll off page
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* 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>
* create new feature toggle + start to put stuff behind it
* block move, tidy up interfaces
* fix new/folder actions buttons
* show warning when deleting library panels/alert rules + run i18n:extract
* pseudo
* update unit tests
* pass alert in description
* chore(plugins): bump systemjs to latest version
* refactor(plugins): switch runtime over to use latest systemjs, add typings
* refactor(plugins): use latest systemjs APIs for runtime dependency resolution
* refactor(plugins): return valid urls from backend for latest systemjs import to work
* revert(plugins): remove cfg from assetpath in favour of relative paths
* fix(plugins): useDefault for systemjs deps to solve undefined errors
* feat(plugins): add basic support for loading plugins via CDN
* fix(plugins): load nested plugins with latest systemjs
* feat(plugins): add back ability to transform plugin src for cdns
* feat(plugins): get caching for module.js working, clean up
* refactor(plugin_loader): create buildImportMap fn and more clean up
* refactor(angularapp): use buildImportMap for dependencies and clean up
* test(plugin_loader): fix failing test due to systemjs update
* test(jest): mock systemjs amd extra in tests to prevent it breaking tests
* chore(plugins): remove systemjs module-types extra, already included with system
* fix(plugins): update key for invalidating cached plugins
* fix: move systemjs amd define to another global so monaco can load
* refactor(plugins): clean up cache buster and tests
* chore(plugins): remove debug
* refactor(plugins): move systemjs define to keep global cleaner
* fix(plugins): set useDefault so system modules lodash references dont fail
* feat(plugins): hook systemjs onload so stylesheets are applied to the dom
* refactor(plugins): wrap amd formatted plugins in iife to prevent define collision
* feat(plugins): support system module format for legacy plugins
* test(plugincachebuster): update tests to match latest implementation
* test(plugins-loader): fix up tests post module property change
* fix test
* Update pkg/plugins/manager/loader/assetpath/assetpath.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* chore(plugin_loader): remove stray import from merge conflict
* Revert "Update pkg/plugins/manager/loader/assetpath/assetpath.go"
This reverts commit 0df57d1cf20f49c22c93369001c70aae46a97c42.
* fix(plugin_loader): set use default for shared plugin dependencies
* refactor(plugins): use leading slash for Module and BaseUrl
* fix(plugins): fix resolve appending extension to cache query param
* refactor(plugins): align baseurl and module paths
* refactor(plugins): update builtInPlugins keys to match naming convention
* refactor(plugins): minor loader clean up, fix up types
* test(plugins): fix failing tests
* refactor(plugins): rename cache buster systemjs plugin to cache
* refactor(plugins): separate plugin_loader into smaller files
* chore(plugins): clean up plugin_loader types
* chore(plugin_sandbox): fix typescript error
* chore(npm): remove unplug debug and pin systemjs to 6.14.1
* refactor(plugins-cdn): update loaders to use absolute module url from backend
* fix(plugins): escape period in systemjs module regex
* chore(plugins): delete redundant systemjs plugins
* refactor(plugin_loader): move hooks into own file, add types
* test(plugins): add tests for systemjs loader hooks
* chore(plugins): rename systemjshooks file
* chore(plugins): remove redundant systemjs cdn backend code
* fix(plugins): handle loading with config.appSubUrl
* chore(plugins): delete redundant plugin-cdn angular code
* test(plugins): fix failing systemjs test missing pluginsCDNBaseUrl
* refactor(plugins): backend provides base and module properties with AppSubUrl
* fix(plugins): consider AppSubUrl for plugin logos
* fix(plugins): use isHostedOnCDN util when checking for cdn hosted plugins
* add new appSubURL field to config
* refactor relative URL func
* fix path for core app
* refactor asset path input
* fix(plugins): catch errors in loadPluginCss
* feat(plugins-cdn): selectively transform sourceMapURL
* re-add deleted test case
* chore(plugins): bump to latest systemjs@6.14.2
* feat(plugins): add systemjs-cjs-extra for loading commonjs plugins
---------
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* introduce a new action "alert.provisioning.secrets:read" and role "fixed:alerting.provisioning.secrets:reader"
* update alerting API authorization layer to let the user read provisioning with the new action
* let new action use decrypt flag
* add action and role to docs
* lock down server admin role updates on the frontend if the user is externally synced
* add tests
* lock Grafana Server admin role updates from the backend
* rename variables
* check that the user has auth info
* add LDAP to providers for which Grafana Server admin role can be synced
* linting
* Update dependency lru-cache to v10
* use named import
* remove outdated type definitions and actually use named import
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Explore: Allow the use of plugin panels
Allow plugins to define a visualisation to use in explore that comes from a plugin.
* Explore: Allow the use of plugin panels
Rename ExplorePanel to CustomContainer
* Explore: Allow the use of plugin panels
Changed CustomContainer to take all frames for plugin id.
Add field preferredVisualisationPluginId to frame metadata.
Updated decorators to check for plugin and fallback to preferredVisualisationType if plugin cannot be found.
* Explore: Allow the use of plugin panels
Handle case where there are no custom frames
* Explore: Allow the use of plugin panels
Add test cases
* Allow setting role as None
Co-authored-by: gamab <gabi.mabs@gmail.com>
Seeking for places where role.None would be used
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Adding None role to the frontend
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
unify org role declaration and remove from add permission
fix backend test
fix backend lint
* remove role none from frontend
* Simplify checks
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* nits
---------
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Add pagination params and apply to sql
* Create getCorrelationsResponse that returns metadata
* Set up pagination, change correlations fetch to only get source datasource correlations
* Move correlations from root to pane, only fetch correlations for one datasource when initialized or datasource is changed
* Fix tests
* Fix remaining tests
* Use functional component to handle state
* Remove unneeded mocks, fix tests
* Change perPage to limit
* Fix Go Tests
* Fix linter
* Remove parameter
* Account for mixed datasources
* Delete unused hook
* add source UID filter to API, start backing out front end hook changes
* add source IDs to API, use when loading or changing datasource
* Fix prettier
* Mock correlations response
* Get correlations for all datasources in mixed scenario
* Add documentation for new parameters
* Attempt to fix swagger
* Fix correlations page
* add swagger and openapi docs
* Add mocks to failing test
* Change API for consistency, remove extra hooks and unused function
* Add max to limit and re-gen api docs
* Move the page to the previous page if deleting all the rows on the page
* Only fetch if remove does not have value
* Change page to a reference hook
* Fix documentation, a test and some logic thinking page could be 0
* 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>