* wip
* make diff easier to read
* Update template_srv getVariables to return new TypedVariableModel
* update VariableType to use the type from TypedVariableModel
* tidy things up
* Chore: Use type-accurate mock variables in tests
* Chore: Type VariableState to use TypedVariableModel
* fix typo
* remove type assertion from template_srv.getVariables
* use typescript/no-redeclare for compatibility with ts overloads
* remove generics from getVariable() and overload it to only return undefined based on arguments
* update usages of getVariable()
* Fix Interval variable options picker not working
* Geomap: add measuring tools
* Add measure type selection
* Add controls and state to measure overlay
* Override tooltip mouse events when menu active
* Move measure tools to top right
* Lay groundwork for units and consolidate measuring
* Create measure vector layer class
* Improve styling to match other overlay controls
* Consolidate styling and use theme2
* Update unit language and add km2
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* Chore: add missing refId property to LokiQuery type
* Chore: fix types in Loki querybuilder state test
* Chore: remove unnecessary added property to LokiQuery
* Revert "Chore: Bump terser to fix security vulnerability (#53052)"
This reverts commit 7ae74d2a18.
* feat: use tsc and rollup directly with esbuild and publishConfig, files props
* refactor(grafana-data): fix isolatedModules re-export type error
* refactor(grafana-data): import paths from src not package name
* refactor(rollup): fix dts output.file
* chore(grafana-schema): delete dashboard_experimental.gen.ts - cannot work with isolatedModules
* refactor(grafana-e2e-selectors): fix export types isolatedModules error
* refactor(grafana-runtime): fix isolatedModules re-export type error
* refactor(grafana-ui): fix isolatedModules re-export type error
* feat(grafana-ui): use named imports for treeshaking
* refactor(grafana-ui): use named imports for treeshaking
* feat: react and react-dom as peerDeps for packages
* feat(grafana-ui): emotion packages as peerDeps
* feat(grafana-e2e): use tsc, rollup, esbuild for bundling
* chore(packages): clean up redundant dependencies
* chore(toolkit): deprecate unused package:build task
* chore(schema): put back dashboard_experimental and exclude to prevent isolatedModules error
* docs(packages): update readme
* chore(storybook): disable isolatedModules for builds
* chore: relax peerDeps for emotion and react
* revert(grafana-ui): put @emotion dependencies back
* refactor: replace relative package imports with package name
* build(packages): set emitDeclaration false for typecheck scripts to work
* test(publicdashboarddatasource): move test next to implementation. try to appease the betterer gods
* chore(storybook): override ts-node config for storybook compilation
* refactor(grafana-data): use ternary so babel doesnt complain about expecting flow types
* chore(toolkit): prefer files and publishConfig package.json props over copying
* build(npm): remove --contents dist arg from publishing commands
* chore(packages): introduce sideEffects prop to package.json to hint package can be treeshaken
* chore(packages): remove redundant index.js files
* feat(packages): set publishConfig.access to public
* feat(packages): use yarn berry and npm for packaging and publishing
* refactor(packages): simplify rollup configs
* chore(schema): add comment explaining need to exclude dashboard_experimental
* revert(toolkit): put back clean to prevent cli failures
* ci(packages): run packages:pack before a canary publish
* chore(gitignore): add npm-artifacts directory to ignore list
* test(publicdashboarddatasource): fix module mocking
* chore(packages): delete package.tgz when running clean
* chore(grafana-data): move dependencies from devDeps to prevent build resolution errors
* wip
* make diff easier to read
* Update template_srv getVariables to return new TypedVariableModel
* update VariableType to use the type from TypedVariableModel
* tidy things up
* Chore: Use type-accurate mock variables in tests
* Chore: Type VariableState to use TypedVariableModel
* fix typo
* remove type assertion from template_srv.getVariables
* undo whatever changes i did to swagger spec
* remove UseState + add support for controls in TimeOfDayPicker story
* remove UseState + add controls support in TimeRangeInput story
* Add documentation + fix error when clearing
* properly type range
* wip
* make diff easier to read
* Update template_srv getVariables to return new TypedVariableModel
* update VariableType to use the type from TypedVariableModel
* tidy things up
* Fix comment lines
* Introduce graphite variable editor
* Render results differently based on queryType
* Add comments and fallback values
* Unit tests for different type of graphite queries
* Use metrics/expand endpoint to retrieve metric names
* 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>
* Fix: sql plugins feature
* SQLDS: Use builtin annotation editor
Plus strict rule fixes
* MSSQL: Migrate query editor to React
* Make code editor work
* Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic
* MSSQL: Fix ts issues
* Fix SQLDatasource refID
* Remove comment
* Revert "Make SQLOptions and SQLQuery in SQLDatasource and in Editor generic"
This reverts commit 1d15b4061a.
* Fix ts issues without generic
* TS
* refactor(Data Sources): rename file to follow naming convention
* refactor: use react-redux hooks for interacting with the store
* tests: update data-sources list related test files
* refactor: extract datasource list page contents
* refactor: pass dataSources to the DataSourcesList as a prop
* refactor: use proper typing for navIndex mocks
* 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>
* passes id and uid to PublicDashboardDatasource
* betterer results
* If for a public dashboard, return the PublicDashboardDataSource first or else getDatasourceSrv.get() will fail bc of no authed user.
Added some unit tests for resolving the uid from the many possible datasource types.
* updates betterer
* Exports DashboardService. Adds method to DashboardService to build anonymous user for use with public dashboards where there is no authed user. Adds method on dashboard_queries to get all dashboard uids from a dashboard.
* refactors to get unique datasource uids
* Adds tests for getting all unique datasource uids off a dashboard
* adds test for building anonymous user with read and query actions that are scoped to each datasource uid in the dashboard
* updates casing of DashboardService
* updates test case to have additional panel with a different datasource
* gives default interval to public dashboard data source
* 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 SpanBarSettings
* Add SpanBarSettings to Jaeger
* Add SpanBarSettings to Zipkin
* Updated title
* Add dropdown to select identifer and make duration a default option
* Show duration by default
* Add option to hide
* Move identifers into constants
* Add process
* Update text
* Update placeholders
* Text/meta data updates
* Added tests
* Added docs
* Update find
* Merge tag and prcoess options
* Update docs
* Updated tests
* Update betterer results and trace view to match
* Updated docs
* Import the mdx documentation file to PluginSignatureBadge.story.tsx and add to its export defaul
* Create the mdx file of PluginSignatureBadge with its information
* Fix signed PluginSignatureBadge status
* Modify text according to reviewer suggestions
* betterer
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Convert QueryOperationRow test to RTL
* Convert QueryOperationRow test to RTL
* Convert QueryOperationRow test to RTL
* Convert QueryOperationRow test to RTL
* Update QueryOperationRow.test.tsx
* update betterer
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Added mdx file for secret input
* Chore: Improve SecretInput story
* review related changes in docs
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* rewrite eslint test to not care about position of errors
* changing file contents shouldn't require a betterer.results update
* fix up eslint test
* fix the undocumented stories test
* ignore .test.ts files as well
A bug introduced by #49259 would crash the annotations view of a panel with a linked alert rule. States are now normalized so crashes won't occur and the base state is used instead.
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not
* show disabled badge in front end if the plugin is not enabled
* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")
* refactor to make use of fields already available in the DTO
* fix typo
* if there is no error returned for the plugin, just show 'disabled'
* fix typo
* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Update frontendsettings.go
add clarifying comment
* fix unit test
* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled
* Update helpers.test.ts
revert test change
* fix unit test
* bogus commit to trigger precommit
* undo commit
* run precommit manually
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* on a text panel first interpolate, then markdown, then sanitize;
* update devenv dashboard + e2e tests
* fix typo and undo changes in grafana/data
* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel
* betterer
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Loki: Add e2e test for query builder
* Update
* Update test
* Update test
* Update test
* Update test
* Add more checks in test
* Update betterer
* Update betterer
* 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>
* Convert AccordianReferences test to RTL
* Convert AccordianReferences test to RTL
* Convert AccordianReferences test to RTL
* Convert AccordianReferences tests to RTL
* Convert AccordianReferences test to RTL
* fix betterer
* Convert AccordianReferences test to RTL
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* remove feature toggle, add empty state and fix bug with initial starring
* Extract empty message into lingui
* remove full stop
* add empty message in the backend
* remove unused import
* translate starred + empty starred states
* betterer changes
* piechart: support series override for hiding legend item
* piechart: add support for hiding values in multi tooltip
* tidy up variable names
* piechart: typing for hideFrom variable
* betterer fixes
* Table panel: Support multiple data links in default cell
* Table panel: Show data links for Image and JSONView cells
* Simplify DataLinksContextMenu api
* Betterer
* improve performance of transformMetricFindResponse
* use lodash uniqBy for postgres
* use lodash uniqBy for mysql
* use lodash uniqBy for mssql
* hopefully conform to import linting rules
* Added .betterer.results
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* Convert DataSourceDashboards test to RTL
* Convert DataSourceDashboards test to RTL
* Convert DataSourceDashboards test to RTL
* Update public/app/features/datasources/DataSourceDashboards.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Convert DataSourceDashboards test to RTL
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase
* update betterer results file
* better glob matching
* updated results
* update results again...
* use more up to date betterer packages
* they're devdeps...
* Commit latest betterer results
* latest .betterer.results
Co-authored-by: joshhunt <josh@trtr.co>
* export props
* Convert PanelHeaderCorner test to RTL
* Update public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Refactor 'Basic Settings' test to RTL from Enzyme
* Update public/app/features/datasources/settings/BasicSettings.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Refactor 'Basic Settings' test to RTL from Enzyme
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Load Rich History when the container is opened
* Store rich history for each pane separately
* Do not update currently opened query history when an item is added
It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.
* Test starring and deleting query history items when both panes are open
* Remove e2e dependency on ExploreId
* Fix unit test
* Assert exact queries
* Simplify test
* Fix e2e tests
* Fix toolbar a11y
* Reload the history after an item is added
* Fix unit test
* Remove references to Explore from generic PageToolbar component
* Update test name
* Fix test assertion
* Add issue item to TODO
* Improve test assertion
* Simplify test setup
* Move query history settings to persistence layer
* Fix test import
* Fix unit test
* Fix unit test
* Test local storage settings API
* Code formatting
* Fix linting errors
* Add an integration test
* Add missing aria role
* Fix a11y issues
* Fix a11y issues
* Use divs instead of ul/li
Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:
Certain ARIA roles must contain particular children
(https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)
(#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)
<ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>
* Clean up settings tab
* Remove redundant aria label
* Remove redundant container
* Clean up test assertions
* Move filtering to persistence layer
* Move filtering to persistence layer
* Simplify applying filters
* Split applying filters and reloading the history
* Debounce updating filters
* Update tests
* Fix waiting for debounced results
* Clear results when switching tabs
* Improve test coverage
* Update docs
* Revert extra handling for uid (will be added when we introduce remote storage)
* Create basic plan
* Rename query history toggle
* Add list of supported features and add ds name to RichHistoryQuery object
* Clean up
Removed planned items will be addressed in upcoming prs (filtering and pagination)
* Handle data source filters
* Simplify DTO conversion
* Clean up
* Fix betterer conflicts
* Fix imports
* Fix imports
* Post-merge fixes
* Use config instead of a feature flag
* Use config instead of a feature flag
* Update converter tests
* Add tests for RichHistoryRemoteStorage
* Simplify test setup
* Simplify assertion
* Add e2e test for query history
* Remove duplicated entry
* Fix unit tests
* Improve readability
* Remove unnecessary casting
* Mock backend in integration tests
* Remove unnecessary casting
* Fix integration test
* Update betterer results
* Fix unit tests
* Simplify testing with DataSourceSrv
* Fix sorting and add to/from filtering
* Basic pagination
* Show load more only if there are items to load
* Post-merge fixes
* Change initial page limit to 100
* Fix unit tests
* Fix linting errors
* Test pagination
* Fix query migration
* Fix unit tests
* Fix prettier
* Remove full stop
* Do not show number of queries with partial results to avoid confusion
* Show number of displayed results when partial results are shown
* rewrote `CopyIcon` to an functional component
- fixed missing `CopyIcon` on `KeyValuesTable`
* added fixed height of `30px` to `KeyValuesTable` to fix overlapping
* removed unused CopyIcon snapshot
* KeyValuesTable: moved `30px` height from `tr` to `td` to fix vertical alignment