* Use levenshtein method to sort metric names
* Optionally hide empty panels in MetricSelectScene
* Transform ignore leven
* Refactor code to use $behaviours. Move preview cache to class variable instead of state
* Use lazy loading for metric scene
* Update scenes lib
* simplify behavior
* Remove hide empty toggle
* Bump scenes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* remove wrapping div
* update tests, just gotta figure out how to handle fontawesome :(
* add spinner.svg which matches the font-awesome spinner
* add mock for react-inlinesvg
* update mock and fix some tests
* fix FormField test
* fix CorrelationsPage tests
* increase timeout
* 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>
* Update dependency sinon to v15.2.0
* add sinon to esmodules list
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability
* chore(yarn): fix resolution version
* chore(jest): compile d3-color from esm to cjs
* chore(d3): bump d3 to latest, set jest config to transpile es modules
* chore: bump visx packages to resolve d3-color to latest
* chore(jest): add missing es modules to config
* chore(storybook): prevent storybook config failure due to nested esm imports
* chore(storybook): use a direct path to avoid es modules breaking config build
* build(sass): use esbuild to generate sass theme vars for esm deps
* chore: clean up swc dependencies
* revert: remove debug console.log breaking tests
* Update jest monorepo to v29
* update snapshots + wrap test in act
* fix linting errors: jest.mocked now defaults to deep mocking
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Switch from lingui from i18next
* Change lingui messages to i18next messages
* Change lingui messages to i18next messages (grafana-ui)
* Init i18n for tests
* bump packages to jest 28
* changes needed for jest 28
* map react-colorful as well
* use customResolver and fix last test
* don't need react-colorful installed if we're using a custom resolver
* return correct thing in mock
* remove watchPathIgnorePatterns since we don't have node_modules anymore
* I18N: Add Core Lingui framework for translating the UI
* Make FieldSet accept ReactNode for the label, so it can be translated
* Translate a phrase in the User profile edit form
* Translate phrase
* run lingui compile before webpack builds
* init i18n more lazily
* i1n:compile in drone lint step
* wip for getting tests to work
* Use mock lingui/macros because its too hard to use the real macros in Jest...
* mock messages for tests
* use specific lingui version
* add comment for test helper
* we actually don't need the i18n setup in tests because we mock out <Trans />
* update package.json
* remove unneded imports
* revert back babel core version
* Create a I18nProvider wrapper
* Update jest monorepo
* Update version of marked so it doesn't throw an error, set testEnvironment
* Fix some unit tests
* Remove all these tests that aren't actually working...
* use spyOn instead of mocking the whole module
* Fix linting
Co-authored-by: Renovate Bot <bot@renovateapp.com>
* Wip
* feat: get storybook and app building locally
* docs: comment webpack react alias
* build(grafana-ui): put back ts-loader
* build: prefer storybook essentials over actions and docs. bump dark-mode
* chore(storybook): migrate to latest config
* build: prevent test env throwing Invalid hook call errors
* chore: lodash resolves to package dependency rather than project
* use decorators as variable instead of function
* perf(storybook): reduce bundling time by splitting type check and compilation
* refactor(storybook): use sortOrder.order param to sort intro story first
* build: use yarn workspace command
* refactor(storybook): use previous knobs addon registration
* migrate button story to controls
* build(storybook): silence warnings in console
* build: bump storybook related ts packages
* style: remove trailing whitespace
* refactor(graphng): export interface for storybook
* controls migration guide
* fix typo
* docs(storybook): default docs to use dark theme as per current implementation
* revert(grafana-ui): put back react-is namedExport
this was changed for react 17 bump but causes rollup to fail during bundling
* chore: bump storybook to 6.1, enable fastRefresh, silence eslint prop-types
* docs(grafana-ui): move knobs -> controls migration guide to storybook style-guide
* chore(storybook): silence terminal warning about order of docs addon
* Update contribute/style-guides/storybook.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Apply documentation suggestions
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* chore(storybook): bump to 6.1.2
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Resolve type errors resulted from merge
* Part2: Unicons implementation (#23266)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Icons update
* Add optional chaining to for isFontAwesome variable
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Part3: Unicons implementation (#23356)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Implment icons in Tabs
* Implement icons in search items and empty list
* Update buttons
* Update button-related snapshot tests
* Update icons in modals and page headers
* Create anfular wrapper and update all icons on search screen
* Update sizing, remove colors, update snapshot tests
* Remove color prop from icon, remove color implemetation in mono icons
* Remove color props from monochrome icons
* Complete update of icons for search screen
* Update icons for infor tooltips, playlist, permissions
* Support temporarly font awesome icons used in enterprise grafana
* Part1: Unicons implementation (#23197)
* Create a new Icon component
* Update icons in main sidebar
* Update icons in Useful links and in react components on main site
* Update icons in Useful links and in main top navigation
* Adjust sizing
* Update panel navigation and timepicker
* Update icons in Panel menu
* NewPanelEditor: Fixed so that test alert rule works in new edit mode (#23179)
* Update icons in add panel widget
* Resolve merge conflict
* Fix part of the test errors and type errors
* Fix storybook errors
* Update getAvailableIcons import in storybook knobs
* Fix import path
* Fix SyntaxError: Cannot use import statement outside a module in test environment error
* Remove dynamic imports
* Remove types as using @ts-ignore
* Update snapshot test
* Add @iconscout/react-unicons to the shouldExclude list as it is blundled with es2015 syntax
* Remove color prop from icon, remove color implemetation in mono icons
* Update navbar styling
* Move toPascalCase to utils/string
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update icons in Explore
* Update icons in alerting
* Update + and x buttons
* Update icons in configurations and settings
* Update close icons
* Update icons in rich history
* Update alert messages
* Add optional chaining to for isFontAwesome variable
* Remove icon mock, set up jest.config
* Fix navbar plus icon
* Fir enable-bacground to enableBackgournd
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Merge remote branch origin master to icons-unicons
* Revert "Merge remote branch origin master to icons-unicons"
This reverts commit 3f25d50a39.
* Size-up dashnav icons
* Fix alerting icons, panel headers, update tests
* Fix typecheck error
* Adjustments - add panel icon, spacing
* Set TerserPlugin sourceMap to false to prevent running out of memory when publishing storybook
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Add integration with Jeager
Add Jaeger datasource and modify derived fields in loki to allow for opening a trace in Jager in separate split.
Modifies build so that this branch docker images are pushed to docker hub
Add a traceui dir with docker-compose and provision files for demoing.:wq
* Enable docker logger plugin to send logs to loki
* Add placeholder zipkin datasource
* Fixed rebase issues, added enhanceDataFrame to non-legacy code path
* Trace selector for jaeger query field
* Fix logs default mode for Loki
* Fix loading jaeger query field services on split
* Updated grafana image in traceui/compose file
* Fix prettier error
* Hide behind feature flag, clean up unused code.
* Fix tests
* Fix tests
* Cleanup code and review feedback
* Remove traceui directory
* Remove circle build changes
* Fix feature toggles object
* Fix merge issues
* Add trace ui in Explore
* WIP
* WIP
* WIP
* Make jaeger datasource return trace data instead of link
* Allow js in jest tests
* Return data from Jaeger datasource
* Take yarn.lock from master
* Fix missing component
* Update yarn lock
* Fix some ts and lint errors
* Fix merge
* Fix type errors
* Make tests pass again
* Add tests
* Fix es5 compatibility
Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
* test apply
* test apply
* Move standard field config editor registry to grafana-data
* merge master
* Apply field config defaults
* Make field and dataFrameIndex optional on on FieldOverrideContext
* Apply custom field config overrides
* Gauge - make sure thresholds are set
* Move series and field scoped vars calculation
* Enable template variables interpolation in title fields
* Expose standars field configs from grafana ui via function
* Add missing option to the config for the min value to be derived from field values
* Fix ts issue
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Don't display changelog category title when no items
The output of the changelog is meant to be copy/pasted with ease. When a
changelog category does not contain items is better to not display title
at all thus avoiding having the manually modify the output as we include
it in the steps of the process.
* Introduce a CLI task to close milestones whilst doing a Grafana release
As part of a Grafana release, we need to eventually close the GitHub
milestone to indicate is done and remove all the cherry-pick labels from
issues/prs within the milestone to avoid our cherry-pick CLI command to
pick them up on the next release.
* Abstract the GitHub client into a module
* Introduce `GitHubClient` to all CLI tasks
* tech: investigating karma + jest mix
* tech: migrating tests to jest
* tech: moved anoter test file to jest
* test: migrated two more test files to jest
* test: updated readme and made test fail to verify that it causes CI build failure
* tech: added code coverage for jest tests
* tech: testing codecov coverage
* tech: migrated more tests
* tech: migrated template srv to typescript and the tests to jest
* tech: minor build fix
* tech: build fixes
* build: another attempt at fixing go test with coverage