* logs: added a copy of the grafana-ui logs-files
* fix: added the ansicolor package to the main grafana package
* logs-components: import things from grafana-ui
* import from local files
* logs-components: other fixes
* add betterer-exceptions
* apply updates from grafana-ui package
* 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
*Refactor FolderPicker to be functional component.
* Add customAdd optional property to FolderPicker so we can add new values in the alert view but keeping the same behaviour in the rest of the ui.
* Add test for being able to add folder when no folders found.
* update data-testids
* update data-testids
* Convert TimelineHeaderRow test to RTL
* update data-testids
* Convert TimelineHeaderRow test to RTL
* Convert TimelineHeaderRow test to RTL
* modify TraceView test
* revert test
* Update packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineRow.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Ran yarn betterer
* update selector
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
* behaviour mostly there
* slight performance improvement
* slightly nicer...
* refactor search and add it to the store
* add comments about removing old component
* remove unneeded logic
* small design tweak
* More small tweaks
* Restore top margin
* add onCloseSearch/onSelectSearchItem to useSearchQuery
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* 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>
* refactor(elastic-test): add datasource mock factory
* refactor(elastic-test): use new factory and attempt to fix some type issues
* refactor(elastic-test): type fixes
* refactor(elastic-test): update test with mock changes
* refactor(elastic-test): remove commented code
Git history should be more than enough to go back to previous revisions instead of keeping commented code.
* refactor(elastic-test): use mock factory and fix type issues in language provider test
* Chore: rename mock parameter
* Chore: remove unnecessary conditional
* Chore: remove ts-expect-error
* 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
* Fix panel option bugs and make tooltip options work
* Support multiple series in explicit mode. Rename XY/Explicit to Auto/Manual
* Fixes
* Fix
* Legend improvements
* Rewrite Pure Component to Function Component
* Add datalinks support
* Legend fixes and CR modifications
* Fix bugs that crash panel
* Revert "Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400)"
This reverts commit ef32050508.
* Betterer <3
* remove annotation angular dependency and migrate annotations
* add nullish coalescing operator
* remove annotations angular partial
* make annotation queries code and errors more readable
* handle the betterer issue with '^ Unexpected any. Specify a different type' at top of file
* run precommits
* run prettier
* refactor(loki-test): move mock creation to mock module
* refactor(loki-test): allow to pass custom settings to the mock constructor
* refactor(loki-test): refactor mock factory in datasource test
* refactor(loki-test): revert change in undefined test case for dsMaxLines
* refactor(loki-test): move type assertion to mock definition
* refactor(loki-test): fix more type issues
* refactor(loki-explore-query-editor): refactor test to use createLokiDatasource() and fix type issues
* refactor(loki-test): replace makeMockLokiDatasource with metadataRequest factory
* fix: remove any
* fix(loki-test): fix remaining usages of any
* Fix: add missing exported type
* Adhoc variable: Correctly preselect datasource when provisioning
* Fix test
* Remove data sources from ad hoc variable state in favor of DataSourcePicker
* Scenes: Support new top nav
* Page: Make Page component support new and old dashboard page layouts
* Pass scrollbar props
* Fixing flex layout for dashboard
* Progress on dashboard settings working with topnav
* Updated
* Annotations working
* Starting to work fully
* Fix merge issue
* Fixed tests
* Added buttons to annotations editor
* Updating tests
* Move Page component to each page
* fixed general settings page
* Fixed versions
* Fixed annotation item page
* Variables section working
* Fixed tests
* Minor fixes to versions
* Update
* Fixing unit tests
* Adding add variable button
* Restore annotations edit form so it's the same as before
* Fixed semicolon in dashboard permissions
* Fixing unit tests
* Fixing tests
* Minor test update
* Fixing unit test
* Fixing e2e tests
* fix for e2e test
* fix a11y issues
* Changing places Settings -> General
* Trying to fix a11y
* I hope this fixes the e2e test
* Fixing merge issue
* tweak
* hacky first attempt
* slightly cleaner...
* behaviour mostly working...
* remove unnecessary wrapper
* css tweaks
* much cleaner implementation with intersectionobserver
* set style props directly on children
* separate story, integrate when toggle is off
* improve story, integrate when toggle is on
* remove styles from DashNavTimeControls
* mock IntersectionObserver for all unit tests
* prettier
* don't use dropdown anymore
* add some basic documentation
* add right alignment to scenes toolbarbuttonrow
* just use the react children api to prevent duplicating children
* Add fixture-factories for all variable types
* clean up variable guards
* add tests for isMulti, hasCurrent, and hasOptions variable type guards
* create VariableSupport type to try and work around ts wonkiness
* migrate influxQL annotations to react and build new annotation editor
* use es-lint ignore for any type in migration
* changes for PR comments
* handle annotation editor on load error without query
* correct label for ann editor query
* add null coalesce operator and remove comment
* fix tooltip
* Disable direct access
* Hide access select if Server mode is already selected
* Update docs
* Add more tests
Co-authored-by: Beto Muniz <contato@betomuniz.com>
* 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()
* Remove generic from getInstanceState
* update usages of getInstanceState
* fix lint
* 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