* feat: add Grafana logo to embedded panels
- Add Grafana logo watermark to solo panel view (embedded panels)
- Logo appears in top-right corner with subtle background container
- Logo hides on hover to avoid interfering with panel content
- Uses React state to track hover for reliable behavior across nested elements
* minor formatting
* update changes to match public dashboards styling
* match styles of public dashboards
* feat: add responsive Grafana branding to embedded panels
- Add 'Powered by Grafana' branding with text logo to solo panel view
- Implement responsive scaling based on panel dimensions (0.6x to 1.0x)
- Logo and text scale proportionally with panel size
- Branding hides on hover to avoid interfering with panel content
- Matches public dashboard branding pattern for consistency
- Uses ResizeObserver for efficient responsive updates
* feat: add Grafana branding to embedded solo panels
- Add 'Powered by Grafana' branding with text logo to embedded panels
- Create SoloPanelPageLogo component for reusable branding
- Implement responsive scaling based on panel dimensions
- Add hover-to-hide functionality to avoid content overlap
- Logo scales between 0.6x and 1.0x based on panel size
* refactor: move scale calculation into SoloPanelPageLogo component
- Move responsive scale calculation logic from SoloPanelRenderer to SoloPanelPageLogo
- Logo component now manages its own scaling based on container dimensions
- Improves separation of concerns and component encapsulation
* feat: add hideLogo query parameter to disable embedded panel branding
- Add hideLogo query parameter support to SoloPanelPage
- Logo can be hidden via ?hideLogo, ?hideLogo=true, or ?hideLogo=1
- Useful for customers who want to disable branding and for image rendering scenarios
- Update Props interface to include hideLogo in queryParams type
* feat: hide logo in panel image renderer URLs
- Add hideLogo=true parameter to image renderer URLs in ShareLinkTab
- Ensures logo is hidden when generating panel images through share feature
- Update test to expect hideLogo=true in render URL
* feat: hide logo in old dashboard sharing panel image URLs
- Add hideLogo=true parameter to buildImageUrl in ShareModal utils
- Ensures logo is hidden when generating panel images through old share modal
- Update all ShareLink tests to expect hideLogo=true in render URLs
* test: add comprehensive tests for SoloPanelPage and SoloPanelPageLogo
- Add SoloPanelPageLogo tests covering rendering, hover behavior, theme selection, and scaling
- Add SoloPanelPage tests covering logo visibility based on hideLogo prop
- Test logo hiding functionality (most important behavior)
- Test responsive scaling based on container dimensions
- Test ResizeObserver integration
- All 14 tests passing
* refactor: centralize hideLogo handling in SoloPanelPageLogo
Move hideLogo parsing and decision-making into SoloPanelPageLogo so SoloPanelPage/SoloPanelRenderer only pass through the raw query param value.
* chore: clean up solo logo test and share link params
Remove a duplicate SVG mock in SoloPanelPageLogo.test, and simplify ShareLinkTab image URL building without changing behavior.
* chore: revert ShareLinkTab image query refactor
Restore the previous image URL query-param mutation logic in ShareLinkTab to reduce risk.
* chore: set hideLogo once for ShareLinkTab image URLs
Avoid passing hideLogo twice when building the rendered image URL.
* fix: handle boolean hideLogo query param in SoloPanelPageLogo
Handle query params that are represented as booleans (e.g., ?hideLogo) and arrays, and avoid calling trim() on non-strings.
* fix i18n
* fix(dashboard-scene): address SoloPanelPageLogo review feedback
Avoid double-scaling logo margin, clarify scaling comments, and extend tests for null/array values and ResizeObserver cleanup.
* update margin left on logo to better match text spacing
* wip
* boop
* Base factor on data
* Add some basic option control
* Remove old comments
* Add feature flag
* Apply feature flag to axis options
* Turn factor calculation into exported function
* Simplify bucket factor function
* Clarify comments
* Fix cell sizing of pre-bucketed heatmaps with log
* Remove unnecessary category change
* Consolidate editor for calculate from data no
* Update bucket function sanity checks
* Wire up scale config from yBucketScale
* Hide bucket controls for heatmap cells
* Fix splits
* Add test coverage
* Fix failing test
* Add basic util test coverage
* Fix tooltip for legacy in linear
* Fix y bucket option width to be consistent
* Hide tick alignment for explicit scale modes
* Clarify comment
* Make sure units are passed properly for linear
* Remove null assertion operator
* Clean up nested ternary
* Add type protection to scaleLog
* Remove repeated code for ySize calcs
* Remove ternary for scaleDistribution
* Add test coverage for YBucketScaleEditor
* Add isHeatmapSparse function to tooltip utils
* Create calculateYSizeDivisor util function
* Fix y axis min and max options and extend to log
* Add toLogBase test coverage
* Create applyExplicitMinMax function
* Add additional test coverage for scale editor
* Run i18n-extract
* Update eslint suppressions
---------
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
* Dashboard migration: preserve legacy string datasource references
Fix v1beta1 → v2alpha1 conversion to handle legacy string datasource
references in QueryVariable, AdhocVariable, and GroupByVariable.
Previously, string datasource references (both template variables like
"$datasource" and direct names/UIDs like "prometheus") were being
dropped during conversion, causing variable chaining to break.
The frontend's DatasourceSrv.getInstanceSettings() already handles
string references by trying uid → name → id lookup at runtime, so we
preserve the string in the uid field and let the frontend resolve it.
* trigger frontend ci tests when dashboard migration code changes
* v1: if string convert to DS ref
* Update migration testdata to fix template variable datasource references
* update
* wip; DrilldownControls
* use wrapper so that drilldown controls wrap inline
* keep labels on top when input expands vertically
* add clear all button
* add collapsible prop
* i18n
* Increase maxWidth for adhoc
* bump scenes for testing
* fix
* remove clear all button
* use new feature toggle; pass collapsible in v2
* update variable controls to use new feature flag
* cleanup
* wip (#115441)
* wip
* fix
* update wrapping on smaller screens
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* Filter out variables that are not in inControlsMenu
* filter out inControlsMenu vars, not hidden ones
* canary scenes
* fix
* cleanup
* canary scenes
* pass wideInput to groupby based on ff
* update var name and bump scenes
* bump scenes
* yarn lock
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* Fix Grafana App SDK logger log level
What
This commit fixes the hardcoded value of the app SDK logger log level
by properly setting it during the log manager initialization.
Why
To prevent app SDK logging from always logging at DEBUG.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Add missing argument to the logging test
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* move content and mode properties to options level
* move to angular section
* Update comments
* handle missing angular text panel
* re-generate test files
* angualr panels tests
* fixing test
* Update output files
* Update output for dev dashboard
* Spread options at the top panel level for migration
* linting issue
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Remove the default alpine & ubuntu versions so that the ones in Dockerfile are used
* set default to just 'alpine' or 'ubuntu'
* use defaults instead
* Provisioning: Add Git Sync limitations warning and migrate resources checkbox
- Update SynchronizeStep alert to use warning severity with comprehensive Git Sync limitations
- Add conditional warnings for instance sync (permissions loss, alerts/library panels loss)
- Add conditional warnings for folder sync (folder structure changes, manual cleanup needed)
- Add "Migrate existing resources" checkbox for folder sync mode
- Update useCreateSyncJob hook to handle migrateResources option for folder sync
- Extract i18n translations for new strings
* Simplify createSyncJob: calculate requiresMigration in caller
- Remove syncTarget and migrateResources parameters from useCreateSyncJob hook
- Calculate requiresMigration in SynchronizeStep based on sync target and checkbox value
- Pass requiresMigration as parameter to createSyncJob function
* Revert: Pass requiresMigration as hook parameter
- Calculate requiresMigration in SynchronizeStep using useMemo
- Pass requiresMigration to useCreateSyncJob hook
- Remove parameter from createSyncJob function call
* Revert "Revert: Pass requiresMigration as hook parameter"
This reverts commit 97e3b7107d.
* Fix TypeScript errors in ProvisioningWizard
- Remove requiresMigration from useCreateSyncJob call
- Pass requiresMigration parameter to createSyncJob call
- Remove unused Target import from SynchronizeStep
* Show migrate resources checkbox for instance sync (checked and disabled)
- Display checkbox for both instance and folder sync
- For instance sync: checkbox is checked and disabled with explanation
- For instance sync: automatically set migrateResources to true via useEffect
- Update description to explain instance sync requires all resources to be managed
* Extract i18n translations for instance-migrate-resources-description
* Rename 'Synchronization options' to 'Options'
* Update i18n translations: rename synchronization-options to options
* Remove unnecessary conditional check for sync target
* Add bodySmall variant to announcement banner TextLink
* Move requiresMigration calculation logic into useResourceStats hook
- Add migrateResources parameter to useResourceStats hook
- Calculate final requiresMigration in hook based on sync target and checkbox value
- Use watch instead of getValues to reactively get migrateResources value
- Simplify startSynchronization to use requiresMigration from hook
* build(frontend): enable custom condition for resolving source files during dev and build
* feat(packages): apply conditional name to export properties
* chore(packages): add standard exports to flamegraph and prometheus
* chore(packages): resolve main, module, types to built files
* build(packages): clean up prepare-npm-package for custom condition changes
* refactor(packages): reduce repetition in conditional exports
* build(storybook): add @grafana-app/source to conditionNames
* test(frontend): add grafana-app/source customCondition for jest tests
* refactor(frontend): remove nested package import paths
* chore(jest): use customExportConditions for source files and browser
* chore(i18n): use src for ./eslint-plugin export
* chore(packages): set packages tsconfigs to moduleResolution bundler
* chore(packages): fix rollup builds
* build(packages): build cjs as multiple files
* chore(sql): reference MonitoringLogger for moduleresolution bundler to pass typecheck
* chore(ui): add type refs for moduleresolution bundler to pass typecheck
* feat(schema): add exports for cleaner import paths
* refactor(frontend): clean up schema paths to point to exports instead of nested file paths
* build(storybook): hack the builder-manager for custom conditions to resolve
* build(decoupled-plugins): fix broken builds due to missing conditionNames
* chore(e2e): pass condition to playwright to resolve local packages
* build(frontend): fix failing build
* chore(select): fix typings
* style(frontend): clean up eslint suppressions
* chore(packages): fix type errors due to incorrect tsconfig settings
* build(generate-apis): use swc with ts-node and moduleResolution bundler
* chore(cypress): add conditionNames to resolve monorepo packages
* build(npm): update prepare to work with latest exports changes
* build(packages): fix prepare-npm-package script
* fix(e2e-selectors): update debugoverlay for data-testid change
* build(packages): stop editing package.json at pack n publish time
* rerun ci
* chore(api-clients): use moduleResolution: bundler for customConditions support
* chore(api-clients): fix generation
* build(packages): remove aliasing exports, remove exports with only customConditions
* Revert "refactor(frontend): clean up schema paths to point to exports instead of nested file paths"
This reverts commit 7949b6ea0e.
* revert(schema): remove exports from package so builds work
* build(api-clients): fix up api-clients exports and rollup config
* build(api-clients): Update generated package exports for api clients
* build(schema): add overrides to cjsOutput and esmOutput so built directory structure is correct
* fix(packages): use rootDirs to prevent types/src directories in built d.ts file paths
* build(packages): prevent empty exports added to package.json during pack
* docs(packages): update readme with custom conditions information
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* `grafana-iam`: Add basic roles to the apis
* Fix validation
* chore: trigger CI
* Leave the hooks intact for now, moving them later
* Remove Role mention from the interface
* Refactor to use a NoopRest backend and Deny access
* fix(transformation): gray out transformation card on transformation tab
* fix(transformations): make data prop required in EmptyTransformationsMessage
This ensures TypeScript enforces that all call sites pass the data prop,
which is required for graying out inapplicable transformation cards.
- Changed data prop from optional to required in EmptyTransformationsProps
- Fixed TransformationsEditor.tsx to pass data (was missing in legacy code)
- Updated tests to pass the required data prop
---------
Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
* refactor template service to contstruct notification template in one place, get provenance before creating and calculate resource version after.
* refactor get by UID and name
* introduce template kind in NotificationTemplate
* introduce includeImported flag and use in the k8s api
* support imported templates
* add kind to template uid
* tests for imported templates
* update API model
* set kind to default templates
* unified-storage: add `Keys` support to the sqlkv implementation
* add validation for sort option
* Revert sort order validation, assume desc when invalid
* docs(public-img): add DO NOT MODIFY warning
* docs(typo): use US English spelling of behaviour
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* adjust conversion file to include empty properties array in overrides
* fix lint error
* add test case for empty properties and fix incorrect regex to v1 conversion
* Deprecate Legacy Storage Migration in Backend
* Change the messaging around legacy storage
* Disable cards to connect
* Commit import changes
* Block repository creation if resources are in legacy storage
* Update error message
* Prettify
* chore: uncomment unified migration
* chore: adapt and fix tests
* Remove legacy storage migration from frontend
* Refactor provisioning job options by removing legacy storage and history fields
- Removed the `History` field from `MigrateJobOptions` and related references in the codebase.
- Eliminated the `LegacyStorage` field from `RepositoryViewList` and its associated comments.
- Updated tests and generated OpenAPI schema to reflect these changes.
- Simplified the `MigrationWorker` by removing dependencies on legacy storage checks.
* Refactor OpenAPI schema and tests to remove deprecated fields
- Removed the `history` field from `MigrateJobOptions` and updated the OpenAPI schema accordingly.
- Eliminated the `legacyStorage` field from `RepositoryViewList` and its associated comments in the schema.
- Updated integration tests to reflect the removal of these fields.
* Fix typescript errors
* Refactor provisioning code to remove legacy storage dependencies
- Eliminated references to `dualwrite.Service` and related legacy storage checks across multiple files.
- Updated `APIBuilder`, `RepositoryController`, and `SyncWorker` to streamline resource handling without legacy storage considerations.
- Adjusted tests to reflect the removal of legacy storage mocks and dependencies, ensuring cleaner and more maintainable code.
* Fix unit tests
* Remove more references to legacy
* Enhance provisioning wizard with migration options
- Added a checkbox for migrating existing resources in the BootstrapStep component.
- Updated the form context to track the new migration option.
- Adjusted the SynchronizeStep and useCreateSyncJob hook to incorporate the migration logic.
- Enhanced localization with new descriptions and labels for migration features.
* Remove unused variable and dualwrite reference in provisioning code
- Eliminated an unused variable declaration in `provisioning_manifest.go`.
- Removed the `nil` reference for dualwrite in `repo_operator.go`, aligning with the standalone operator's assumption of unified storage.
* Update go.mod and go.sum to include new dependencies
- Added `github.com/grafana/grafana-app-sdk` version `0.48.5` and several indirect dependencies including `github.com/getkin/kin-openapi`, `github.com/hashicorp/errwrap`, and others.
- Updated `go.sum` to reflect the new dependencies and their respective versions.
* Refactor provisioning components for improved readability
- Simplified the import statement in HomePage.tsx by removing unnecessary line breaks.
- Consolidated props in the SynchronizeStep component for cleaner code.
- Enhanced the layout of the ProvisioningWizard component by streamlining the rendering of the SynchronizeStep.
* Deprecate MigrationWorker and clean up related comments
- Removed the deprecated MigrationWorker implementation and its associated comments from the provisioning code.
- This change reflects the ongoing effort to eliminate legacy components and improve code maintainability.
* Fix linting issues
* Add explicit comment
* Update useResourceStats hook in BootstrapStep component to accept selected target
- Modified the BootstrapStep component to pass the selected target to the useResourceStats hook.
- Updated related tests to reflect the change in expected arguments for the useResourceStats hook.
* fix(provisioning): Update migrate tests to match export-then-sync behavior for all repository types
Updates test expectations for folder-type repositories to match the
implementation changes where both folder and instance repository types
now run export followed by sync. Only the namespace cleaner is skipped
for folder-type repositories.
Changes:
- Update "should run export and sync for folder-type repositories" test to include export mocks
- Update "should fail when sync job fails for folder-type repositories" test to include export mocks
- Rename test to clarify that both export and sync run for folder types
- Add proper mock expectations for SetMessage, StrictMaxErrors, Process, and ResetResults
All migrate package tests now pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Update provisioning wizard text and improve resource counting display
- Enhanced descriptions for migrating existing resources to clarify that unmanaged resources will also be included.
- Refactored BootstrapStepResourceCounting component to simplify the rendering logic and ensure both external storage and unmanaged resources are displayed correctly.
- Updated alert messages in SynchronizeStep to reflect accurate information regarding resource management during migration.
- Adjusted localization strings for consistency with the new descriptions.
* Update provisioning wizard alert messages for clarity and accuracy
- Revised alert points to indicate that resources can still be modified during migration, with a note on potential export issues.
- Clarified that resources will be marked as managed post-provisioning and that dashboards remain accessible throughout the process.
* Fix issue with trigger wrong type of job
* Fix export failure when folder already exists in repository
When exporting resources to a repository, if a folder already exists,
the Read() method would fail with "path component is empty" error.
This occurred because:
1. Folders are identified by trailing slash (e.g., "Legacy Folder/")
2. The Read() method passes this path directly to GetTreeByPath()
3. GetTreeByPath() splits the path by "/" creating empty components
4. This causes the "path component is empty" error
The fix strips the trailing slash before calling GetTreeByPath() to
avoid empty path components, while still using the trailing slash
convention to identify directories.
The Create() method already handles this correctly by appending
".keep" to directory paths, which is why the first export succeeded
but subsequent exports failed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix folder tree not updated when folder already exists in repository
When exporting resources and a folder already exists in the repository,
the folder was not being added to the FolderManager's tree. This caused
subsequent dashboard exports to fail with "folder NOT found in tree".
The fix adds the folder to fm.tree even when it already exists in the
repository, ensuring all folders are available for resource lookups.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Revert "Merge remote-tracking branch 'origin/uncomment-unified-migration-code' into cleanup/deprecate-legacy-storage-migration-in-provisioning"
This reverts commit 6440fae342, reversing
changes made to ec39fb04f2.
* fix: handle empty folder titles in path construction
- Skip folders with empty titles in dirPath to avoid empty path components
- Skip folders with empty paths before checking if they exist in repository
- Fix unit tests to properly check useResourceStats hook calls with type annotations
* Update workspace
* Fix BootstrapStep tests after reverting unified migration merge
Updated test expectations to match the current component behavior where
resource counts are displayed for both instance and folder sync options.
- Changed 'Empty' count expectation from 3 to 4 (2 cards × 2 counts each)
- Changed '7 resources' test to use findAllByText instead of findByText
since the count appears in multiple cards
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove bubbletee deps
* Fix workspace
* provisioning: update error message to reference enableMigration config
Update the error message when provisioning cannot be used due to
incompatible data format to instruct users to enable data migration
for folders and dashboards using the enableMigration configuration
introduced in PR #114857.
Also update the test helper to include EnableMigration: true for both
dashboards and folders to match the new configuration pattern.
* provisioning: add comment explaining Mode5 and EnableMigration requirement
Add a comment in the integration test helper explaining that Provisioning
requires Mode5 (unified storage) and EnableMigration (data migration) as
it expects resources to be fully migrated to unified storage.
* Remove migrate resources checkbox from folder type provisioning wizard
- Remove checkbox UI for migrating existing resources in folder type
- Remove migrateExistingResources from migration logic
- Simplify migration to only use requiresMigration flag
- Remove unused translation keys
- Update i18n strings
* Fix linting
* Remove unnecessary React Fragment wrapper in BootstrapStep
* Address comments
---------
Co-authored-by: Rafael Paulovic <rafael.paulovic@grafana.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>