* 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
* rename routes and fix access control for support bundles
* AccessControl: Hide menu if not authorized
* AccessControl: Add AC guards for create and delete
* lint
* New dashboard with preset data source
* Updates
* use replace instead
* Tests: fix failing tests
* Chore: add UID to the error message
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* allow DatasourceOnboarding title and cta text customization
* Explore: use Datasource Onboarding page when visiting without any datasource set up
* move & rename DatasourceOnboarding
* Rename component
* start to split admin into two sections
* most of new admin nav implemented
* landing pages
* hide admin for non-admins
* update admin redirects if not topnav
* clean up
* updated IA for admin (still WIP)
* move plugin pages into correct admin sections
* fix backend unit test
* move correlations into the correct section
* add translations for admin sections
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Initial dashboard loading start
* loading dashboard works and shows something
* loading dashboard works and shows something
* Minor tweaks
* Add starred dashboards to scene list page
* Use new SceneGridLayout
* Allow switching directly from dashboard to a scene
* Migrate basic dashboard rows to scene based dashboard
* Review nit
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* chore: fix go lint issues
* feat(Routing): route standalone plugin pages to the `AppRoutePage`
* feat(plugin.json): introduce a new field called `isCorePage` for `includes`
* chore: add explanatory comments for types
* refactor(AppRootPage): receive the `pluginId` and `pluginSection` through the props
Now we are able to receive these as props as the pluginId is defined on navLinks
that are registered by plugins.
* chore: update teests for AppRootPage
* fix: remove rebase issue
* tests(applinks): add a test for checking isCorePage plugin page setting
* refactor(applinks): update tests to use FindById() and be more resilient to changes
* fix: Go lint issues
* refactor(routes): use cleaner types when working with plugin nav nodes
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* chore: fix linting issues
* t: remove `isCorePage` field from includes
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* NewIA: Plugin nav config
* progress
* Progress
* Things are working
* Add monitoring node
* Add alerts and incidents
* added experiment with standalone page
* Refactoring by adding a type for navtree root
* First test working
* More tests
* more tests
* Progress on richer config and sorting
* Sort weight working
* Path config
* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing
* fixed index routes
* removed file
* Fixes
* Fixing tests
* Fixing more tests and adding support for weight config
* Updates
* Remove unused fake
* More fixes
* Minor tweak
* Minor fix
* Can now control position using sortweight even when existing items have no sortweight
* Added tests for frontend standalone page logic
* more tests
* Remove unused fake and fixed lint issue
* Moving reading settings to navtree impl package
* remove nav_id setting prefix
* Remove old test file
* Fix trailing newline
* Fixed bug with adding nil node
* fixing lint issue
* remove some code we have to rethink
* move read settings to PrivideService and switch to util.SplitString
* Hide Correlations Page behind a toggle
* Remove redundant defaults
* Ensure top nav is rendered when correlations are disabled
This is for the case when:
[feature_toggles]
topnav = true
* Design tweaks
* Updated
* Fixing unit tests
* Review fixes
* Text primary on active sections, and change home icon to text
* spacing fix
* More fix
* Fixes
* Updates
* Change nav structure when topnav is enable to do initial tests with new information architecture
* Support for nested sections
* Updated
* sentance case
* Progress on plugin challange
* Rewrite to functional component
* Progress
* Updates
* Progress
* Progress on things
* missing file
* Fixing issue with runtime, need to use setter way to set component exposed via runtime
* Move PageLayoutType to grafana/data
* Fixing breadcrumb issue, adding more tests
* reverted backend change
* fix recursive issue with cleanup
* super quick attempt
* feature toggle everything
* only construct alertNav if there are navChildren
* fix toggle name
* plugin landing pages poc
* add apps route + put behind feature toggle
* use toIconName
* rename to NavLandingPage
* feature toggle new routes
* don't modify GetServerAdminNode
* some fairly hacky code to check if the plugin has a root page
* remove trailing slash
* feat: show data-sources under the data-connections page
* refactor: add a constant for data-sources routes
* refactor: add a context that holds the currently active data-sources routes
* refactor: use the data-sources routes constant wherever possible
* refactor: use the data-sources routes context wherever possible
* feat(data-connections): add edit and new pages
* feat(data-connections): set the the custom routes via the context provider
* fix(data-connections): set the active tab properly
We needed to update the routes to match with the ones on the backend ("data-sources" vs "datasources"),
and we also needed to check if it is the default tab, in which case we would like to highlight the Datasources tab.
* tests: fix tests for Data Connections page
* fix: address rebase issues
* tests: find button based on role and text
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* fix: add missing closing ) paren in tests
* refactor: use implicit return types for components
* tests: change role from "button" to "link"
* refactor: stop using unnecessary wrapper components
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* First stab at new page layouts behind feature toggle
* Simplifying PageHeader
* Progress on a new model that can more easily support new and old page layouts
* Progress
* rename folder
* Progress
* Minor change
* fixes
* Fixing tests
* Make breadcrumbs work
* Add tests for old Page component
* Adding tests for new Page component and behavior
* fixing page header test
* Fixed test
* Moving user profile routes to navId
* PageLayouts: Updates dashboards routes with navId
* added missing navId
* AppChrome outside route
* Renaming folder
* Minor fix
* Updated
* Fixing StoragePage
* Updated
* Updating translation ids
* Updated snapshot
* update nav translation ids (yes this is confusing)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
* refactor: move utility functions out of the redux actions
* refactor: move password handlers to the feature root
* refactor: move API related functions to an api.ts
* refactor: move components under a /components folder
* refactor: move page containers under a /pages folder and extract components
* refactor: update mocks to be easier to reuse
* refactor: move tests into a state/tests/ subfolder
* refactor: expose 'initialState' for plugins
* refactor: move generic types to the root folder of the feature
* refactor: import path fixe
* refactor: update import paths for app routes
* chore: update betterer
* refactor: fix type errors due to changed mock functions
* chore: fix mocking context_srv in tests
* refactor: udpate imports to be more concise
* fix: update failing test because of mocks
* refactor: use the new `navId` prop where we can
* fix: use UID instead ID in datasource edit links
* fix:clean up Redux state when unmounting the edit page
* refactor: use `uid` instead of `id`
* refactor: always fetch the plugin details when editing a datasource
The deleted lines could provide performance benefits, although they also make the
implementation more prone to errors. (Mostly because we are storing the information
about the currently loaded plugin in a single field, and it was not validating if it
is for the latest one).
We are planning to introduce some kind of caching, but first we would like to clean up
the underlying state a bit (plugins & datasources.
* fix: add missing dispatch() wrapper for update datasource callback
* refactor: prefer using absolute import paths
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* fix: ESLINT import order issue
* refactor: put test files next to their files
* refactor: use implicit return types for components
* fix: remove caching from datasource fetching
I have introduced a cache to only fetch data-sources once, however as we
are missing a good logic for updating the instances in the Redux store
when they change (create, update, delete), this approach is not keeping the UI in sync.
Due to this reason I have removed the caching for now, and will reintroduce it once we have a
more robust client-side state logic.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Playing around
* This is getting interesting
* Updates
* Updated
* Observable experiments
* This is tricky
* VizPanel panel renderer
* New model progress
* Maybe this could be something
* Updated
* Rename
* updates
* Updated
* Query runners? not sure
* Updated
* updates
* flex box layout starting to work
* Testing
* Tested an action
* Parent context sort of working
* Progress
* Progress
* Updated
* Starting to work
* Things are working
* Scene list, nested scene demo
* Progress on repeats
* Moving things
* Pretty big progress
* More things working
* Great progress
* Progress
* Name changing
* Minor tweaks
* Simplified sizing
* Move toggleDirection to SceneFlexLayout
* add feature flag (#50990)
* removed new useObservable hook
* Rename folder and feature toggle to scenes
* Caching scenes so you can go back to another scene without having to re-query data
* Fix issue with subs on re-mount
* Fixing test
* Added SceneCanvasText to play around with layout elements with size based on content
* Scene: Edit mode and component edit wrapper that handles selection (#51078)
* First step for scene variables
* Started playing around with a scene edit mode
* Better way to set component
* Progress on edit mode
* Update
* Progress on edit mode
* Progress on editor
* Progress on editor
* Updates
* More working
* Progress
* Minor update
* removed unnessary file
* Moving things around
* Updated
* Making time range separate from time picker
* minor rename of methods
* The most basic variable start
* Minor renames
* Fixed interpolate issue if not found at closest level
* An embryo of event model and url sync handling
* Update url sync types
* Removed unnessary any type arg
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* First stab at new page layouts behind feature toggle
* Simplifying PageHeader
* Progress on a new model that can more easily support new and old page layouts
* Progress
* rename folder
* Progress
* Minor change
* fixes
* Fixing tests
* Make breadcrumbs work
* Add tests for old Page component
* Adding tests for new Page component and behavior
* fixing page header test
* Fixed test
* AppChrome outside route
* Renaming folder
* Minor fix
* Updated
* Fixing StoragePage
* Fix for banners
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Add topnav in Route
* TopBar: Good progress on a approach that looks promising
* Added some elements to top level
* Get page nav from route
* Progress
* Making breadcrumbs slightly more real
* Updates
* Memoize selector
* Removed some console.log
* correctly type iconName
* betterer updates
* Change setting to hideNav
* Rename again
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax
The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.
* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.
Added default value to the new UID column based on PR feedback.
* break this PRs migration into its own function
* Playlists: Update UI to use the updated API
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Feature Flags: introduce a flag for enabling the Data Connections page
* Feature Flags: generate schemas
* Navigation: add navigation weight for the Data Connections page
* NavLink: add a comment pointing out where icon names can be looked up
* NavTree: add a new page called Data Connections
* fix(Api): prefix the navigation IDs with the parent ("data-connections")
* feat(Frontend): add a basic page with four tabs
* feat(Plugins): add a hook for importing an app plugin
* feat(Plugins): add a component for loading app plugins anywhere
* feat(Data Connections): load the cloud-onboarding app under the "Cloud onboarding" tab
* feat(Data Connections): generate a proper nav model to highlight active tabs
* test(Data Connections): add tests
* refactor(Data Connections): update temporary text content
This is only used as a placeholder until the tabs are under development.
* refactor(Data Cnnnections): move /pages to /tabs
* refactor(Data Connections): remove the `types.ts` file as it is not referenced by any module
* feat(Data Connections): only register routes if feature is enabled
* add isPublic to dashboard
* refactor routes to use route group and add placeholder method for sharing apii
* add sharing pane and utils for public dashboard config to sharing modal
* Sharing modal now persists data through the api
* moves ShareDashboard endpoint to new file and starts adding tests
* generates mocks. Adds tests for public dashboard feature flag
* Adds ability to pass in array of features to enable for the test
* test to update public flag on dashboard WIP
* Adds mock for SaveDashboardSharingConfig
* Fixes tests. Had to use FakeDashboardService
* Adds React tests for public dashboards toggle
* removes semicolons
* refactors SharePublic component to use hooks
* rename from `share publicly` to `public dashboard config`
* checkpoint. debugging tests. need to verify name changes
* checkpoint. test bugs fixed. need to finish returning proper response codes
* finish renaming. fix test
* Update pkg/api/api.go
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* update backend url
* rename internal objects and commands. fix configuration modal labels
* add endpoint for retrieving public dashboard configuration and populate the frontend state from it
* add test for dashboardCanBePublic
* adds backend routes
* copy DashboardPage component into component for public dashboards. WIP
* adds react routes, and doesnt render main nav bar when viewing a public route
* removes extra react route from testing
* updates component name
* Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc
* Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed.
* removes commented out code from exploratory work
* Makes public dashboard routes require no auth
* extracts helper to own util file to check if were viewing a public page
* Hides panel dropdown when its being viewed publicly
* formatting
* use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette.
* adds unit tests for util function used to see if page is being viewed publicly
* cant added annotations to panel when being publicly viewed
* removes useless comment
* hides backend and frontend pubdash routes behind feature flag
* consider feature flag when checking url path to see if on public dashboard
* renames function
* still render app notifications when in public view
* Extract pubdash route logic into own file
* fixes failing tests
* Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests.
* renames pubdash web route to be more understandable
* rename route
* fixes failing test
* fixes failing test. Needed to update pubdash urls
* sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url
* fixes failing tests. Uses config to determine if viewing public dashboard
* renders the blue panel timeInfo on public dashboard panel
* Extracts conditional logic for rendering components out into their own functions
* removes publicDashboardView check, and uses dashboard meta instead
* the timeInfo is always displayed on the panel
* After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader.
* Fixes failing test. Needed to add isPublic flag to dashboard meta.
Co-authored-by: Jeff Levin <jeff@levinology.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add RBAC section to settings
* Default to RBAC enabled settings to true
* Update tests to respect RBAC
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* Expose option to disable help menu
* Expose option to disable profile menu
* Add Profile FeatureTogglePage
* Update public/app/features/profile/FeatureTogglePage.tsx
Uptake PR wording suggestion.
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Fix front end lint issue
* Fix back end lint issue
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* AccessControl: Add endpoint to get user permissions
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Fix SA tests
* Linter is wrong :p
* Wait I was wrong
* Adding the route for teams:creator too
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* show teams page for user who can't list teams but can create teams
* Fixing buttons and routes
* Small refactor
Co-authored-by: gamab <gabi.mabs@gmail.com>
* fix SA creation scope
* add writer action to SA fixed role
* ServiceAccounts: Add token table to SA detail page
* ServiceAccounts: Allow deletion of tokens from token table
* refactor service account page
* avoid using store for delete
* AccessControl: Change teams permissions page when frontend is hit
* Implement frontend changes for group sync
* Changing the org/teams/edit permissions
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Fixing routes
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Use props straight away no need to go through the state
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/teams/TeamPages.tsx
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* refactor: use server admin listing serviceaccounts
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* setup route for specifc service account
* add routes to index
* main issue with spelling mistakes
* feat: make routes /serviceacconts/id for navModel
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Update pkg/services/serviceaccounts/manager/service.go
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* refactor(plugins): use routes specific to the new plugins/admin
* refactor(plugins): remove unused pages (PluginList, PluginItem)
* refactor(plugins): remove PluginPage
* refactor(plugins): remove UpdatePluginModal
* refactor(plugins): move AppConfigWrapper under plugins/admin
* refactor(plugins): move PluginDashboards under plugins/admin
* refactor(plugins): rename the "specs" folder to "tests"
* refactor(plugins): move test files to /tests folder
* refactor(plugins): move AppRootPage into a /components folder
* refactor(plugins): move PluginsErrorsInfo into a /plugins folder
* refactor(plugins): move PluginSettingsCache into a /components folder
* refactor(plugins): move PluginStateInfo into a /plugins folder
* refactor(plugins): move AppRootPage.test.tsx next to the tested component
* refactor(plugins): remove old snapshot tests
* fix(plugins): fix tests
* refactor(plugins/admin): move & rename PluginSettingsCache
* fix(plugins): fix a few rebase issues
* Plugins: remove deprecated code (state handling) (#41739)
* refactor(plugins): use the plugins/admin reducer only
* refactor(plugins): remove tests for the deprecated plugins reducer
* refactor(plugins): remove tests for the deprecated plugins selectors
* refactor(plugins/state): add a short comment note to selectors
* feat(plugins/state): add a selector for selecting errors
* feat(plugins/state): add a hook for getting plugin errors
* refactor(plugins): udpate the PluginsErrorsInfo component to use the new state selectors
* refactor(plugins/state): remove the old (deprecated) selectors
* refactor(plugins/state): use the new actions under /admin
* refactor(plugins/state): remove old (deprecated) reducers and actions
* refactor(plugins): update component definition
* fix(plugins): remove unnecessary {children} prop for PluginsErrorsInfo
* Plugins: show / hide install controls based on the `pluginAdminEnabled` flag (#41749)
* docs(plugins): update documentation for the `plugin_admin_enabled` flag
* refactor(InstallControls): move the main component to a named module
* feat(plugins): use the `pluginAdminEnable` flag to hide / show install controls in the UI
* test(plugins): add tests for enabling/disabling install controls
* Getting close
* Restore angular app boot at startup
* Moving angular annotations dependencies to app/angular or old graph
* Remove redundant setLinkSrv call
* Fixing graph test
* Minor refactor based on review feedback
* Create in get function
* Navigation: Start creating new NavBarMenu component
* Navigation: Apply new NavBarMenu to NavBarNext
* Navigation: Remove everything to do with .sidemenu-open--xs
* Navigation: Ensure search is passed to NavBarMenu
* Navigation: Standardise NavBarMenuItem
* This extra check isn't needed anymore
* Navigation: Refactor <li> out of NavBarMenu
* Navigation: Combine NavBarMenuItem with DropdownChild
* use spread syntax since performance shouldn't be a concern for such small arrays
* Improve active item logic
* Ensure unique keys
* Remove this duplicate code
* Add unit tests for getActiveItem
* Add tests for NavBarMenu
* Rename mobileMenuOpen -> menuOpen in NavBarNext (since it can be used for mobile menu or megamenu)
* just use index to key the items
* Use exact versions of @react-aria packages
* Navigation: Make the dropdown header a NavBarMenuItem
* Navigation: Stop using dropdown-menu for styles
* Navigation: Hide divider in NavBarMenu + tweak color on section header
* Refactor: remove `scopes` from CentrifugeSrv, remove dependencies on window/config/user context
* Refactor: add GrafanaLiveChannelConfigService to wrap direct access to *Scope classes
* Refactor: added GrafanaLiveService acting like a proxy to GrafanaLiveSrv + LiveChannelConfigSrv
* Refactor: live module instantiation
* Refactor: import fixes
* Fix: URL construction in centrifugeSrv
* ErrorBoundary: Support recovering from errors in PanelChrome & PanelRenderer
* Rename recover to dependencies
* Pushed an update that fixed test and adds new error mode to DebugPanel
* refactor licenseURL function to use context and export permission evaluation fction
* remove provisioning file
* refactor licenseURL to take in a bool to avoid circular dependencies
* remove function for appending nav link, as it was only used once and move the function to create admin node
* better argument names
* create a function for permission checking
* extend permission checking when displaying server stats
* enable the use of enterprise access control actions when evaluating permissions
* import ordering
* move licensing FGAC action definitions to models package to allow access from oss
* move evaluatePermissions for routes to context serve
* change permission evaluator to take in more permissions
* move licensing FGAC actions again to appease wire
* avoid index out of bounds issue in case no children are passed in when creating server admin node
* simplify syntax for permission checking
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* update loading state for server stats
* linting
* more linting
* fix test
* fix a frontend test
* update "licensing.reports:read" action naming
* UI doesn't allow reading only licensing reports and not the rest of licensing info
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Group alertmangaer alerts by custom grouping
* Filter am groups
* Style filter components
* Style filter bar and add clear functionality
* rename components to alert group
* use query params for group filters
* filter style improvements
* add tests for group by
* Add grouping banner to better highlight groupings
* clean up hook logic
* moved the plugins admin to core and used the plugins toggle to decide which version to use.
* reverted change.
* changed so the library tab is the default one.
* fixing navigation.
#
* fixed so we have the proper header.
* including the core plugins
* fixed so we display logos for local plugins.
* fixed so we have a working version of plugin catalog.
* removed console logs.
* reverted changes.
* fixing failed test.
* Add alertmanager notifications tab
* Link to silences page from am alert
* Include summary for alertmanager group
* Fix colors for am state
* Add horizontal dividing line
* PR feedback
* Add basic unit test for alert notificaitons
* Rename Notificaitons component file
* Polling interval to groups
* Add alertmanager notifications tab
* Link to silences page from am alert
* Include summary for alertmanager group
* PR feedback
* Add basic unit test for alert notificaitons
* Rename Notificaitons component file
* Alerting: make alertmanager notifications view responsive (#36067)
* refac DynamicTableWithGuidelines
* more responsiveness fixes
* Add more to tests
* Add loading and alert state for notifications
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* add fixed role for datasource read operations
* Add action for datasource explore
* add authorize middleware to explore index route
* add fgac support for explore navlink
* update hasAccessToExplore to check if accesscontrol is enable and evalute action if it is
* add getExploreRoles to evalute roles based onaccesscontrol, viewersCanEdit and default
* create function to evaluate permissions or using fallback if accesscontrol is disabled
* change hasAccess to prop and derive the value in mapStateToProps
* add test case to ensure buttons is not rendered when user does not have access
* Only hide return with changes button
* remove internal links if user does not have access to explorer
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* add page and basic things
* quick annotations
* added so we can run queries on the view rule page.
* wip.
* merge
* cleaned up the combined rule hook.
* readd queries
* fixing so you can run queries.
* renamed variable.
* fix rerenders and visualizing
* minor fixes.
* work in progress.
* wip
* a working version that can be tested.
* changing check if we have data.
* removed unused styling.
* removed unused dep.
* removed another dep.
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* refactored and changed UI according to figma.
* resseting menu item.
* removing unused external link.
* refactor according to feedback.
* changed so we always fetch the rule.
* fixing so datasource only is displayed once. Also changed so we only navigate to alert list when rule has been deleted.
* removed unused dep.
* Will display query as json if we can't find data source.
* changed to a function instead of the React.FC.
* refactoring of id generation and added support to generate ids for native prometheus alerts without ruler.
* set max width on page content
* added page where you can easily link to a rule in grafana.
* listing rules with same name.
* fixing error cases.
* updates after pr feedback
* more pr feedback
* use 1h-now as timerange
* remove unused import
* start on test
* add test for cloud case
* add ruleview render test
* add render tests for grafana and cloud alerts
* add mock for backendsrv
* add rendering test for the find route
* check if cards are rendered
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: Domas <domas.lapinskas@grafana.com>
* Allow Route component usage in app plugins
* i tried
* fix catalog app
* fix catalog app
* remove catalog changes from this PR
* remove extra files
* feat(plugins): expose react-router to plugins rather than export via grafana-ui
* Bring back query and pathname to AppRootPage and add deprecation notice
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.
* Remove unnecessary _ import from Graph component
* Enforce lodash import style
* Fix remaining lodash imports