From 2b8c74de2e9039f31fce3e5ce4ca66b538d7df97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=A4ggmark?= Date: Thu, 12 Jun 2025 11:03:52 +0200 Subject: [PATCH] i18n: removes useTranslate hook (#106556) * i18n: removes useTranslate hook * chore: fix duplicate imports * chore: fix import sorting and hook dependencies --- contribute/internationalization.md | 6 ++-- packages/grafana-i18n/src/i18n.tsx | 5 --- packages/grafana-i18n/src/index.ts | 2 +- packages/grafana-i18n/src/internal/index.ts | 1 - public/app/api/clients/provisioning/index.ts | 2 +- .../AccessControl/AddPermission.tsx | 3 +- .../AccessControl/PermissionListItem.tsx | 4 +-- .../components/AccessControl/Permissions.tsx | 3 +- .../components/AppChrome/AppChromeService.tsx | 2 +- .../ExtensionToolbarItemButton.test.tsx | 16 +++------ .../ExtensionToolbarItemButton.tsx | 3 +- .../AppChrome/History/HistoryContainer.tsx | 3 +- .../AppChrome/History/HistoryWrapper.tsx | 5 ++- .../AppChrome/MegaMenu/MegaMenu.tsx | 4 +-- .../AppChrome/MegaMenu/MegaMenuHeader.tsx | 4 +-- .../AppChrome/MegaMenu/MegaMenuItem.tsx | 3 +- .../AppChrome/MegaMenu/MegaMenuItemText.tsx | 4 +-- .../components/AppChrome/MegaMenu/utils.ts | 2 +- .../components/AppChrome/News/NewsDrawer.tsx | 4 +-- .../components/AppChrome/News/NewsWrapper.tsx | 3 +- .../OrganizationSelect.tsx | 4 +-- .../AppChrome/QuickAdd/QuickAdd.tsx | 6 ++-- .../ReturnToPrevious/DismissableButton.tsx | 4 +-- .../ReturnToPrevious/ReturnToPrevious.tsx | 4 +-- .../AppChrome/TopBar/ProfileButton.tsx | 4 +-- .../AppChrome/TopBar/SingleTopBar.tsx | 4 +-- .../TopSearchBarCommandPaletteTrigger.tsx | 6 ++-- .../BouncingLoader/BouncingLoader.tsx | 4 +-- .../components/Breadcrumbs/Breadcrumbs.tsx | 4 +-- .../components/CloseButton/CloseButton.tsx | 3 +- .../components/FolderFilter/FolderFilter.tsx | 3 +- public/app/core/components/Footer/Footer.tsx | 2 +- .../ForgottenPassword/ChangePassword.tsx | 4 +-- .../ForgottenPassword/ForgottenPassword.tsx | 3 +- .../core/components/FormPrompt/FormPrompt.tsx | 4 +-- .../InviteUserButton/InviteUserButton.tsx | 4 +-- .../components/Layers/LayerDragDropList.tsx | 4 +-- .../app/core/components/Layers/LayerName.tsx | 3 +- .../app/core/components/Login/LoginCtrl.tsx | 2 +- .../app/core/components/Login/LoginForm.tsx | 4 +-- .../app/core/components/Login/LoginPage.tsx | 4 +-- .../Login/PasswordlessConfirmationForm.tsx | 3 +- .../Login/PasswordlessLoginForm.tsx | 4 +-- .../NestedFolderPicker/FolderRepo.tsx | 3 +- .../NestedFolderPicker/NestedFolderPicker.tsx | 3 +- .../components/NestedFolderPicker/Trigger.tsx | 4 +-- .../app/core/components/OptionsUI/color.tsx | 4 +-- .../core/components/OptionsUI/fieldColor.tsx | 3 +- .../app/core/components/OptionsUI/units.tsx | 4 +-- .../core/components/Page/EditableTitle.tsx | 3 +- .../PanelTypeFilter/PanelTypeFilter.tsx | 4 +-- .../PasswordField/PasswordField.tsx | 4 +-- .../core/components/PluginHelp/PluginHelp.tsx | 4 +-- .../QueryOperationRowHeader.tsx | 4 +-- .../RolePicker/RoleMenuGroupOption.tsx | 4 +-- .../components/RolePicker/RoleMenuOption.tsx | 4 +-- .../components/RolePicker/RolePickerInput.tsx | 3 +- .../components/RolePicker/RolePickerMenu.tsx | 4 +-- .../RolePicker/RolePickerSubMenu.tsx | 4 +-- .../RolePickerDrawer/RolePickerBadges.tsx | 4 +-- .../RolePickerDrawer/RolePickerDrawer.tsx | 3 +- .../components/Select/OldFolderPicker.tsx | 4 +-- .../app/core/components/Select/OrgPicker.tsx | 3 +- .../Select/ServiceAccountPicker.tsx | 2 +- .../app/core/components/Select/SortPicker.tsx | 3 +- .../app/core/components/Select/TeamPicker.tsx | 2 +- .../app/core/components/Select/UserPicker.tsx | 2 +- .../SharedPreferences/SharedPreferences.tsx | 3 +- .../app/core/components/Signup/SignupPage.tsx | 4 +-- .../core/components/Signup/VerifyEmail.tsx | 4 +-- .../core/components/TagFilter/TagFilter.tsx | 4 +-- .../core/components/TagFilter/TagOption.tsx | 4 +-- .../components/ThemeSelector/ThemeCard.tsx | 7 ++-- .../ThemeSelector/ThemeSelectorDrawer.tsx | 4 +-- .../TimePicker/TimePickerWithHistory.tsx | 4 +-- .../core/components/Upgrade/UpgradeBox.tsx | 4 +-- .../ValidationLabels/ValidationLabels.tsx | 2 +- .../VersionHistoryComparison.tsx | 4 +-- public/app/core/components/help/HelpModal.tsx | 7 ++-- .../app/core/navigation/GrafanaRouteError.tsx | 3 +- .../app/core/utils/navBarItem-translations.ts | 2 +- public/app/core/utils/richHistory.ts | 2 +- public/app/core/utils/shortLinks.ts | 2 +- public/app/features/actions/ActionEditor.tsx | 4 +-- .../actions/ActionVariablesEditor.tsx | 4 +-- public/app/features/actions/ParamsEditor.tsx | 3 +- .../app/features/admin/AdminEditOrgPage.tsx | 4 +-- .../admin/AdminFeatureTogglesPage.tsx | 4 +-- .../admin/AdminFeatureTogglesTable.tsx | 4 +-- public/app/features/admin/AdminOrgsTable.tsx | 4 +-- public/app/features/admin/OrgRolePicker.tsx | 4 +-- public/app/features/admin/UpgradePage.tsx | 6 +--- public/app/features/admin/UserAdminPage.tsx | 3 +- public/app/features/admin/UserCreatePage.tsx | 3 +- .../app/features/admin/UserLdapSyncInfo.tsx | 3 +- .../app/features/admin/UserListAdminPage.tsx | 4 +-- .../features/admin/UserListAnonymousPage.tsx | 3 +- public/app/features/admin/UserListPage.tsx | 5 +-- .../DashboardsListModalButton.tsx | 5 +-- .../DeleteUserModalButton.tsx | 6 ++-- .../UserListPublicDashboardPage.tsx | 4 +-- public/app/features/admin/UserOrgs.tsx | 3 +- public/app/features/admin/UserPermissions.tsx | 4 +-- public/app/features/admin/UserProfile.tsx | 5 ++- public/app/features/admin/UserSessions.tsx | 3 +- .../features/admin/Users/OrgUsersTable.tsx | 6 ++-- .../app/features/admin/Users/UsersTable.tsx | 6 ++-- .../admin/ldap/LdapConnectionStatus.tsx | 8 ++--- public/app/features/admin/ldap/LdapDrawer.tsx | 3 +- .../features/admin/ldap/LdapGroupMapping.tsx | 3 +- public/app/features/admin/ldap/LdapPage.tsx | 3 +- .../features/admin/ldap/LdapSettingsPage.tsx | 3 +- .../features/admin/ldap/LdapUserGroups.tsx | 5 ++- .../app/features/alerting/state/alertDef.ts | 2 +- .../features/alerting/unified/AlertGroups.tsx | 4 +-- .../alerting/unified/AlertingNotEnabled.tsx | 3 +- .../alerting/unified/AlertsFolderView.tsx | 4 +-- .../unified/GrafanaRuleQueryViewer.tsx | 6 ++-- .../alerting/unified/NewSilencePage.tsx | 3 +- .../unified/NotificationPoliciesPage.tsx | 4 +-- .../alerting/unified/PanelAlertTabContent.tsx | 4 +-- .../alerting/unified/RedirectToRuleViewer.tsx | 3 +- .../features/alerting/unified/RuleViewer.tsx | 4 +-- .../features/alerting/unified/Settings.tsx | 3 +- .../alerting/unified/api/alertRuleApi.ts | 2 +- .../unified/api/alertingFolderActionsApi.ts | 2 +- .../unified/components/AlertLabel.tsx | 4 +-- .../unified/components/AlertLabelDropdown.tsx | 4 +-- .../unified/components/AlertLabels.tsx | 4 +-- .../unified/components/DynamicTable.tsx | 3 +- .../GrafanaAlertmanagerDeliveryWarning.tsx | 3 +- .../unified/components/InfoPausedRule.tsx | 4 +-- .../components/InvalidIntervalWarning.tsx | 4 +-- .../unified/components/MoreButton.tsx | 4 +-- .../components/NoAlertManagerWarning.tsx | 6 +--- .../unified/components/Provisioning.tsx | 5 +-- .../components/alert-groups/AlertDetails.tsx | 4 +-- .../alert-groups/AlertGroupAlertsTable.tsx | 5 ++- .../components/alert-groups/GroupBy.tsx | 3 +- .../components/alert-groups/MatcherFilter.tsx | 3 +- .../MuteTimingsSelector.tsx | 3 +- .../bridges/DeclareIncidentButton.tsx | 6 ++-- .../unified/components/common/DetailText.tsx | 3 +- .../contact-points/ContactPointHeader.tsx | 4 +-- .../contact-points/ContactPoints.tsx | 7 ++-- .../DuplicateMessageTemplate.tsx | 5 +-- .../contact-points/EditContactPoint.tsx | 3 +- .../contact-points/EditMessageTemplate.tsx | 5 +-- .../contact-points/NewMessageTemplate.tsx | 4 +-- .../contact-points/NotificationTemplates.tsx | 4 +-- .../components/ContactPointsFilter.tsx | 3 +- .../components/GlobalConfig.tsx | 3 +- .../components/GlobalConfigAlert.tsx | 3 +- .../contact-points/components/Modals.tsx | 7 ++-- .../contact-points/components/UnusedBadge.tsx | 4 +-- .../components/contact-points/utils.ts | 2 +- .../create-folder/CreateNewFolder.tsx | 4 +-- .../export/ExportNewGrafanaRule.tsx | 3 +- .../components/export/FileExportPreview.tsx | 3 +- .../components/export/GrafanaExportDrawer.tsx | 3 +- .../components/export/GrafanaModifyExport.tsx | 5 +-- .../export/GrafanaMuteTimingsExporter.tsx | 6 ++-- .../export/GrafanaPoliciesExporter.tsx | 3 +- .../export/GrafanaReceiverExporter.tsx | 3 +- .../export/GrafanaReceiversExporter.tsx | 3 +- .../components/export/GrafanaRuleExporter.tsx | 3 +- .../export/GrafanaRuleFolderExporter.tsx | 4 +-- .../export/GrafanaRuleGroupExporter.tsx | 4 +-- .../export/GrafanaRulesExporter.tsx | 4 +-- .../components/expressions/Expression.tsx | 8 ++--- .../AlertInstanceExtensionPoint.tsx | 4 +-- .../components/folder-actions/DeleteModal.tsx | 4 +-- .../folder-actions/FolderActionsButton.tsx | 7 +--- .../PauseUnpauseActionMenuItem.tsx | 4 +-- .../import-to-gma/ConfirmConvertModal.tsx | 7 ++-- .../import-to-gma/ImportToGMARules.tsx | 8 +---- .../import-to-gma/NamespaceAndGroupFilter.tsx | 3 +- .../mute-timings/EditMuteTiming.tsx | 3 +- .../mute-timings/MuteTimingActionsButtons.tsx | 4 +-- .../mute-timings/MuteTimingForm.tsx | 4 +-- .../mute-timings/MuteTimingTimeInterval.tsx | 4 +-- .../mute-timings/MuteTimingTimeRange.tsx | 4 +-- .../mute-timings/MuteTimingsTable.tsx | 5 ++- .../components/mute-timings/NewMuteTiming.tsx | 3 +- .../AlertGroupsSummary.tsx | 3 +- .../ContactPointSelector.tsx | 3 +- .../EditDefaultPolicyForm.tsx | 4 +-- .../EditNotificationPolicyForm.tsx | 4 +-- .../notification-policies/Filters.tsx | 3 +- .../notification-policies/Modals.tsx | 23 +++---------- .../NotificationPoliciesList.tsx | 3 +- .../notification-policies/Policy.tsx | 12 +++---- .../PolicyUpdateErrorAlert.tsx | 3 +- .../NewRuleFromPanelButton.tsx | 3 +- .../permissions/ManagePermissions.tsx | 3 +- .../receivers/AlertInstanceModalSelector.tsx | 3 +- .../components/receivers/GlobalConfigForm.tsx | 4 +-- .../components/receivers/PayloadEditor.tsx | 4 +-- .../components/receivers/ReceiversSection.tsx | 4 +-- .../components/receivers/TemplateForm.tsx | 6 ++-- .../components/receivers/TemplatePreview.tsx | 5 ++- .../components/receivers/TemplatesTable.tsx | 6 ++-- .../editor/templateDataSuggestions.ts | 2 +- .../receivers/form/ChannelSubForm.tsx | 3 +- .../form/CloudCommonChannelSettings.tsx | 3 +- .../receivers/form/CloudReceiverForm.tsx | 3 +- .../receivers/form/GenerateAlertDataModal.tsx | 3 +- .../form/GrafanaCommonChannelSettings.tsx | 4 +-- .../receivers/form/GrafanaReceiverForm.tsx | 3 +- .../receivers/form/ReceiverForm.tsx | 3 +- .../receivers/form/TestContactPointModal.tsx | 4 +-- .../form/fields/KeyValueMapInput.tsx | 3 +- .../form/fields/StringArrayInput.tsx | 4 +-- .../form/fields/SubformArrayField.tsx | 4 +-- .../receivers/form/fields/SubformField.tsx | 4 +-- .../form/fields/TemplateContentAndPreview.tsx | 4 +-- .../form/fields/TemplateSelector.tsx | 6 ++-- .../onCall/useOnCallIntegration.tsx | 7 ++-- .../rule-editor/AlertRuleNameInput.tsx | 4 +-- .../rule-editor/AnnotationHeaderField.tsx | 3 +- .../rule-editor/AnnotationsStep.tsx | 3 +- .../rule-editor/CloudEvaluationBehavior.tsx | 3 +- .../CustomAnnotationHeaderField.tsx | 4 +-- .../rule-editor/DashboardPicker.tsx | 3 +- .../rule-editor/DurationQuickPick.tsx | 2 +- .../rule-editor/ExpressionEditor.tsx | 4 +-- .../components/rule-editor/FolderSelector.tsx | 3 +- .../rule-editor/GrafanaEvaluationBehavior.tsx | 5 +-- .../GrafanaFolderAndLabelsStep.tsx | 4 +-- .../rule-editor/GroupAndNamespaceFields.tsx | 3 +- .../rule-editor/NotificationsStep.tsx | 8 +---- .../components/rule-editor/PreviewRule.tsx | 4 +-- .../rule-editor/PreviewRuleResult.tsx | 4 +-- .../components/rule-editor/QueryOptions.tsx | 4 +-- .../components/rule-editor/QueryWrapper.tsx | 4 +-- .../RecordingRulesNameSpaceAndGroupStep.tsx | 4 +-- .../rule-editor/RuleEditorSection.tsx | 4 +-- .../components/rule-editor/RuleInspector.tsx | 4 +-- .../alert-rule-form/AlertRuleForm.tsx | 4 +-- .../alert-rule-form/ModifyExportRuleForm.tsx | 5 ++- .../simplifiedRouting/AlertManagerRouting.tsx | 3 +- .../contactPoint/ContactPointSelector.tsx | 4 +-- .../route-settings/ActiveTimingFields.tsx | 4 +-- .../route-settings/MuteTimingFields.tsx | 4 +-- .../route-settings/RouteSettings.tsx | 3 +- .../rule-editor/labels/LabelsButtons.tsx | 3 +- .../rule-editor/labels/LabelsEditorModal.tsx | 3 +- .../rule-editor/labels/LabelsField.tsx | 20 +++++------ .../rule-editor/labels/LabelsFieldInForm.tsx | 4 +-- .../NotificationPreview.tsx | 3 +- .../NotificationPreviewByAlertManager.tsx | 4 +-- .../notificaton-preview/NotificationRoute.tsx | 4 +-- .../NotificationRouteDetailsModal.tsx | 4 +-- .../UnknownContactPointDetails.tsx | 4 +-- .../CloudDataSourceSelector.tsx | 4 +-- .../QueryAndExpressionsStep.tsx | 3 +- .../SimpleCondition.tsx | 4 +-- .../SmartAlertTypeDetector.tsx | 4 +-- .../rule-types/DisabledTooltip.tsx | 4 +-- .../components/rule-viewer/AlertRuleMenu.tsx | 4 +-- .../components/rule-viewer/DeleteModal.tsx | 5 ++- .../rule-viewer/FederatedRuleWarning.tsx | 4 +-- .../components/rule-viewer/RuleViewer.tsx | 6 ++-- .../rule-viewer/tabs/AlertVersionHistory.tsx | 3 +- .../components/rule-viewer/tabs/Details.tsx | 3 +- .../components/rule-viewer/tabs/Query.tsx | 3 +- .../tabs/version-history/ComparisonDrawer.tsx | 3 +- .../ConfirmVersionRestoreModal.tsx | 3 +- .../tabs/version-history/UpdatedBy.tsx | 3 +- .../version-history/VersionHistoryTable.tsx | 3 +- .../tabs/version-history/versions-utils.tsx | 2 +- .../components/rules/AlertInstanceDetails.tsx | 4 +-- .../components/rules/AlertStateTag.tsx | 3 +- .../unified/components/rules/CloneRule.tsx | 6 ++-- .../unified/components/rules/CloudRules.tsx | 5 ++- .../rules/Filter/RulesFilter.v1.tsx | 5 ++- .../rules/Filter/RulesFilter.v2.tsx | 8 ++--- .../unified/components/rules/GrafanaRules.tsx | 4 +-- .../rules/MultipleDataSourcePicker.tsx | 3 +- .../unified/components/rules/NoRulesCTA.tsx | 5 +-- .../components/rules/RuleActionsButtons.tsx | 3 +- .../unified/components/rules/RuleDetails.tsx | 6 ++-- .../rules/RuleDetailsDataSources.tsx | 3 +- .../rules/RuleDetailsExpression.tsx | 4 +-- .../rules/RuleDetailsFederatedSources.tsx | 3 +- .../components/rules/RuleListErrors.tsx | 8 ++--- .../unified/components/rules/RuleState.tsx | 4 +-- .../unified/components/rules/RuleStats.tsx | 3 +- .../unified/components/rules/RulesGroup.tsx | 4 +-- .../unified/components/rules/RulesTable.tsx | 5 ++- .../CentralAlertHistoryScene.tsx | 8 ++--- .../CentralHistoryRuntimeDataSource.ts | 2 +- .../central-state-history/EventDetails.tsx | 3 +- .../EventListSceneObject.tsx | 5 ++- .../HistoryErrorMessage.tsx | 3 +- .../ConfirmDeletePermanantlyModal.tsx | 4 +-- .../ConfirmRestoreDeletedRuleModal.tsx | 4 +-- .../rules/deleted-rules/DeletedRules.tsx | 4 +-- .../rules/deleted-rules/DeletedRulesPage.tsx | 3 +- .../rules/state-history/LogRecordViewer.tsx | 4 +-- .../rules/state-history/LogTimelineViewer.tsx | 3 +- .../rules/state-history/LokiStateHistory.tsx | 5 +-- .../rules/state-history/StateHistory.tsx | 4 +-- .../components/settings/AlertmanagerCard.tsx | 3 +- .../settings/AlertmanagerConfig.tsx | 3 +- .../settings/ConfigurationDrawer.tsx | 14 ++------ .../components/settings/VersionManager.tsx | 3 +- .../components/silences/MatchersField.tsx | 3 +- .../components/silences/NoSilencesCTA.tsx | 3 +- .../silences/SilenceGrafanaRuleDrawer.tsx | 3 +- .../components/silences/SilencePeriod.tsx | 4 +-- .../silences/SilencedInstancesPreview.tsx | 4 +-- .../components/silences/SilencesEditor.tsx | 6 ++-- .../components/silences/SilencesFilter.tsx | 4 +-- .../components/silences/SilencesTable.tsx | 7 ++-- .../group-details/GroupDetailsPage.tsx | 6 ++-- .../unified/group-details/GroupEditPage.tsx | 5 ++- .../components/DraggableRulesTable.tsx | 5 ++- .../unified/group-details/validation.ts | 2 +- .../alerting/unified/home/GettingStarted.tsx | 4 +-- .../features/alerting/unified/home/Home.tsx | 3 +- .../alerting/unified/home/Insights.tsx | 3 +- .../hooks/ruleGroup/useDeleteRuleFromGroup.ts | 4 +-- .../hooks/ruleGroup/usePauseAlertRule.ts | 4 +-- .../hooks/ruleGroup/useUpdateRuleGroup.ts | 7 ++-- .../ruleGroup/useUpsertRuleFromRuleGroup.ts | 6 ++-- .../unified/hooks/useStateHistoryModal.tsx | 6 ++-- .../unified/insights/InsightsMenuButton.tsx | 4 +-- .../insights/grafana/MostFiringLabels.tsx | 2 +- .../unified/integration/AlertRulesDrawer.tsx | 5 +-- .../integration/AlertRulesDrawerContent.tsx | 4 +-- .../integration/AlertRulesToolbarButton.tsx | 3 +- .../unified/plugins/PluginOriginBadge.tsx | 3 +- .../unified/rule-editor/CloneRuleEditor.tsx | 4 +-- .../rule-editor/ExistingRuleEditor.tsx | 4 +-- .../unified/rule-editor/RuleEditor.tsx | 5 ++- .../rule-list/DataSourceGroupLoader.tsx | 3 +- .../alerting/unified/rule-list/FilterView.tsx | 3 +- .../unified/rule-list/FilterViewStatus.tsx | 4 +-- .../unified/rule-list/GrafanaGroupLoader.tsx | 3 +- .../unified/rule-list/GrafanaRuleLoader.tsx | 3 +- .../unified/rule-list/RuleList.v1.tsx | 4 +-- .../unified/rule-list/RuleList.v2.tsx | 6 ++-- .../unified/rule-list/RuleListPageTitle.tsx | 4 +-- .../components/AlertRuleListItem.tsx | 3 +- .../components/AlertRuleListItemLoader.tsx | 3 +- .../components/DataSourceErrorBoundary.tsx | 4 +-- .../components/DataSourceSection.tsx | 3 +- .../rule-list/components/EvaluationGroup.tsx | 4 +-- .../rule-list/components/GroupStatus.tsx | 4 +-- .../rule-list/components/LazyPagination.tsx | 3 +- .../rule-list/components/ListGroup.tsx | 4 +-- .../rule-list/components/ListSection.tsx | 4 +-- .../rule-list/components/LoadMoreButton.tsx | 3 +- .../rule-list/components/Namespace.tsx | 4 +-- .../components/RuleActionsButtons.V2.tsx | 3 +- .../rule-list/components/RuleGroup.tsx | 3 +- .../unified/state/AlertingQueryRunner.ts | 2 +- .../alerting/unified/utils/k8s/errors.ts | 2 +- .../StandardAnnotationQueryEditor.tsx | 3 +- .../app/features/auth-config/AuthDrawer.tsx | 3 +- .../auth-config/ProviderConfigForm.tsx | 3 +- .../auth-config/ProviderConfigPage.tsx | 4 +-- .../auth-config/components/ProviderCard.tsx | 3 +- .../components/ServerDiscoveryModal.tsx | 3 +- public/app/features/auth-config/fields.tsx | 3 +- .../app/features/bookmarks/BookmarksPage.tsx | 3 +- .../BrowseFolderAlertingPage.tsx | 3 +- .../browse-dashboards/RecentlyDeletedPage.tsx | 3 +- .../api/browseDashboardsAPI.ts | 2 +- .../BrowseActions/BrowseActions.tsx | 3 +- .../components/BrowseActions/DeleteModal.tsx | 4 +-- .../BrowseActions/DescendantCount.tsx | 3 +- .../components/BrowseActions/MoveModal.tsx | 4 +-- .../components/BrowseActions/utils.ts | 2 +- .../components/BrowseView.tsx | 4 +-- .../components/CheckboxCell.tsx | 3 +- .../components/CheckboxHeaderCell.tsx | 3 +- .../components/DashboardsTree.tsx | 5 ++- .../components/FolderActionsButton.tsx | 4 +-- .../browse-dashboards/components/NameCell.tsx | 4 +-- .../components/NewFolderForm.tsx | 3 +- .../components/NewProvisionedFolderForm.tsx | 17 ++-------- .../components/PermanentlyDeleteModal.tsx | 3 +- .../components/RecentlyDeletedEmptyState.tsx | 3 +- .../components/RestoreModal.tsx | 4 +-- .../components/SearchView.tsx | 3 +- .../app/features/canvas/elements/button.tsx | 2 +- public/app/features/canvas/elements/cloud.tsx | 2 +- .../app/features/canvas/elements/ellipse.tsx | 2 +- .../features/canvas/elements/metricValue.tsx | 2 +- .../canvas/elements/parallelogram.tsx | 2 +- .../features/canvas/elements/rectangle.tsx | 2 +- public/app/features/canvas/elements/text.tsx | 5 ++- .../app/features/canvas/elements/triangle.tsx | 2 +- .../app/features/canvas/runtime/element.tsx | 2 +- .../commandPalette/CommandPalette.tsx | 5 ++- .../actions/dashboardActions.ts | 2 +- .../actions/recentScopesActions.ts | 4 +-- .../commandPalette/actions/staticActions.ts | 2 +- .../commandPalette/actions/useActions.tsx | 2 +- .../AdvisorRedirectNotice.tsx | 4 +-- .../ConnectionsRedirectNotice.tsx | 4 +-- .../hooks/useDataSourceSettingsNav.ts | 3 +- .../pages/DataSourceDetailsPage.tsx | 3 +- .../connections/pages/NewDataSourcePage.tsx | 3 +- .../tabs/ConnectData/CardGrid/CardGrid.tsx | 4 +-- .../tabs/ConnectData/ConnectData.tsx | 4 +-- .../tabs/ConnectData/Search/Search.tsx | 4 +-- .../correlations/CorrelationsPage.tsx | 8 ++--- .../ConfigureCorrelationBasicInfoForm.tsx | 4 +-- .../Forms/ConfigureCorrelationSourceForm.tsx | 8 ++--- .../Forms/ConfigureCorrelationTargetForm.tsx | 4 +-- .../Forms/CorrelationFormNavigation.tsx | 4 +-- .../correlations/Forms/QueryEditorField.tsx | 3 +- .../Forms/TransformationEditorRow.tsx | 4 +-- .../app/features/correlations/Forms/types.ts | 2 +- .../components/EmptyCorrelationsCTA.tsx | 3 +- .../addToDashboard/AddToDashboardForm.tsx | 3 +- .../addToDashboard/addToDashboard.ts | 2 +- .../ConditionalRendering.tsx | 2 +- .../ConditionalRenderingBase.tsx | 3 +- .../ConditionalRenderingData.tsx | 2 +- .../ConditionalRenderingEditor.tsx | 3 +- .../ConditionalRenderingGroup.tsx | 2 +- .../ConditionalRenderingGroupAdd.tsx | 6 ++-- .../ConditionalRenderingGroupCondition.tsx | 5 ++- .../ConditionalRenderingGroupVisibility.tsx | 6 ++-- .../ConditionalRenderingOverlay.tsx | 3 +- .../ConditionalRenderingTimeRangeSize.tsx | 2 +- .../ConditionalRenderingVariable.tsx | 2 +- .../edit-pane/DashboardEditPaneRenderer.tsx | 4 +-- .../edit-pane/DashboardEditableElement.tsx | 3 +- .../edit-pane/DashboardOutline.tsx | 4 +-- .../edit-pane/EditPaneHeader.tsx | 4 +-- .../MultiSelectedObjectsEditableElement.tsx | 2 +- .../MultiSelectedVizPanelsEditableElement.tsx | 2 +- .../edit-pane/VizPanelEditableElement.tsx | 3 +- .../dashboard-scene/edit-pane/shared.ts | 2 +- .../embedding/EmbeddedDashboard.tsx | 3 +- .../embedding/EmbeddedDashboardTestPage.tsx | 3 +- .../inspect/HelpWizard/HelpWizard.tsx | 4 +-- .../HelpWizard/SupportSnapshotService.ts | 2 +- .../inspect/InspectDataTab.tsx | 3 +- .../inspect/InspectJsonTab.tsx | 3 +- .../inspect/InspectMetaDataTab.tsx | 2 +- .../inspect/InspectQueryTab.tsx | 2 +- .../inspect/InspectStatsTab.tsx | 2 +- .../inspect/PanelInspectDrawer.tsx | 4 +-- .../pages/DashboardScenePageStateManager.ts | 2 +- .../PanelDataPane/NewAlertRuleButton.tsx | 4 +-- .../PanelDataPane/PanelDataAlertingTab.tsx | 3 +- .../PanelDataTransformationsTab.tsx | 3 +- .../PanelDataPane/TransformationsDrawer.tsx | 3 +- .../panel-edit/PanelEditControls.tsx | 3 +- .../panel-edit/PanelEditor.tsx | 2 +- .../panel-edit/PanelEditorRenderer.tsx | 5 ++- .../panel-edit/PanelOptionsPane.tsx | 2 +- .../panel-edit/PanelVizTypePicker.tsx | 3 +- .../panel-edit/SaveLibraryVizPanelModal.tsx | 4 +-- .../panel-edit/getPanelFrameOptions.tsx | 2 +- .../saving/DashboardPrompt.tsx | 4 +-- .../saving/SaveDashboardAsForm.tsx | 4 +-- .../saving/SaveDashboardDrawer.tsx | 2 +- .../saving/SaveDashboardForm.tsx | 4 +-- .../provisioned/DashboardPreviewBanner.tsx | 4 +-- .../ProvisionedResourceDeleteModal.tsx | 4 +-- .../SaveProvisionedDashboardForm.tsx | 6 ++-- .../saving/provisioned/defaults.ts | 2 +- .../dashboard-scene/saving/shared.tsx | 4 +-- .../scene/AddLibraryPanelDrawer.tsx | 2 +- .../dashboard-scene/scene/DashboardScene.tsx | 2 +- .../scene/GoToSnapshotOriginButton.tsx | 7 ++-- .../scene/NavToolbarActions.tsx | 4 +-- .../dashboard-scene/scene/PanelLinks.tsx | 4 +-- .../scene/PanelMenuBehavior.tsx | 2 +- .../scene/UnconfiguredPanel.tsx | 3 +- .../dashboard-scene/scene/UnlinkModal.tsx | 4 +-- .../layout-auto-grid/AutoGridItemEditor.tsx | 2 +- .../AutoGridLayoutManager.tsx | 2 +- .../AutoGridLayoutManagerEditor.tsx | 5 +-- .../DashboardGridItemEditor.tsx | 5 ++- .../DefaultGridLayoutManager.tsx | 2 +- .../SceneGridRowEditableElement.tsx | 3 +- .../layout-default/row-actions/RowActions.tsx | 2 +- .../row-actions/RowActionsRenderer.tsx | 3 +- .../row-actions/RowOptionsButton.tsx | 4 +-- .../row-actions/RowOptionsForm.tsx | 4 +-- .../row-actions/RowOptionsModal.tsx | 4 +-- .../scene/layout-rows/RowItem.tsx | 2 +- .../scene/layout-rows/RowItemEditor.tsx | 10 +++--- .../scene/layout-rows/RowItemRenderer.tsx | 3 +- .../scene/layout-rows/RowItems.tsx | 2 +- .../scene/layout-rows/RowItemsEditor.tsx | 2 +- .../scene/layout-rows/RowsLayoutManager.tsx | 2 +- .../scene/layout-tabs/TabItem.tsx | 2 +- .../scene/layout-tabs/TabItemEditor.tsx | 9 +++-- .../scene/layout-tabs/TabItemRenderer.tsx | 5 ++- .../scene/layout-tabs/TabItems.tsx | 2 +- .../scene/layout-tabs/TabsLayoutManager.tsx | 2 +- .../layouts-shared/CanvasGridAddActions.tsx | 4 +-- .../DashboardLayoutSelector.tsx | 6 ++-- .../actions/DashboardSettingsButton.tsx | 4 +-- .../actions/DiscardLibraryPanelButton.tsx | 4 +-- .../actions/DiscardPanelButton.tsx | 4 +-- .../actions/EditDashboardSwitch.tsx | 4 +-- .../actions/EditSchemaV2Button.tsx | 4 +-- .../actions/ExportDashboardButton.tsx | 4 +-- .../actions/MakeDashboardEditableButton.tsx | 4 +-- .../actions/PlayListNextButton.tsx | 4 +-- .../actions/PlayListPreviousButton.tsx | 4 +-- .../actions/PublicDashboardBadge.tsx | 3 +- .../new-toolbar/actions/SaveDashboard.tsx | 3 +- .../actions/SaveLibraryPanelButton.tsx | 4 +-- .../actions/ShareDashboardButton.tsx | 3 +- .../actions/ShareExportDashboardButton.tsx | 4 +-- .../scene/new-toolbar/actions/StarButton.tsx | 4 +-- .../actions/UnlinkLibraryPanelButton.tsx | 4 +-- .../buildNewDashboardSaveModel.ts | 2 +- .../settings/DashboardLinksEditView.tsx | 3 +- .../settings/DeleteDashboardButton.tsx | 6 +--- .../settings/GeneralSettingsEditView.tsx | 4 +-- .../settings/JsonModelEditView.tsx | 3 +- .../annotations/AnnotationSettingsEdit.tsx | 3 +- .../annotations/AnnotationSettingsList.tsx | 4 +-- .../settings/links/DashboardLinkForm.tsx | 4 +-- .../settings/links/DashboardLinkList.tsx | 4 +-- .../dashboard-scene/settings/utils.ts | 3 +- .../LocalVariableEditableElement.tsx | 2 +- .../variables/VariableEditableElement.tsx | 3 +- .../settings/variables/VariableEditorForm.tsx | 4 +-- .../settings/variables/VariableEditorList.tsx | 3 +- .../variables/VariableEditorListRow.tsx | 6 ++-- .../variables/VariableSetEditableElement.tsx | 4 +-- .../variables/VariablesUnknownTable.tsx | 3 +- .../components/AdHocVariableForm.tsx | 3 +- .../components/ConstantVariableForm.tsx | 4 +-- .../components/CustomVariableForm.tsx | 5 +-- .../components/GroupByVariableForm.tsx | 3 +- .../components/IntervalVariableForm.tsx | 4 +-- .../components/QueryVariableForm.tsx | 4 +-- .../components/SelectionOptionsForm.tsx | 4 +-- .../components/TextBoxVariableForm.tsx | 4 +-- .../components/VariableHideSelect.tsx | 3 +- .../editors/ConstantVariableEditor.tsx | 5 +-- .../editors/CustomVariableEditor.tsx | 2 +- .../editors/DataSourceVariableEditor.tsx | 2 +- .../variables/editors/QueryVariableEditor.tsx | 6 ++-- .../editors/TextBoxVariableEditor.tsx | 4 +-- .../useVariableSelectionOptionsCategory.tsx | 6 ++-- .../version-history/RevertDashboardModal.tsx | 4 +-- .../version-history/VersionHistoryButtons.tsx | 4 +-- .../VersionHistoryComparison.tsx | 4 +-- .../version-history/VersionHistoryHeader.tsx | 4 +-- .../version-history/VersionHistoryTable.tsx | 4 +-- .../sharing/ExportButton/ExportAsCode.tsx | 4 +-- .../sharing/ExportButton/ExportButton.tsx | 3 +- .../sharing/ExportButton/ExportMenu.tsx | 6 ++-- .../sharing/ExportButton/ResourceExport.tsx | 3 +- .../sharing/ShareButton/ShareButton.tsx | 3 +- .../sharing/ShareButton/ShareMenu.tsx | 5 ++- .../ConfigEmailSharing/ConfigEmailSharing.tsx | 4 +-- .../EmailListConfiguration.tsx | 7 ++-- .../EmailShare/CreateEmailSharing.tsx | 3 +- .../PublicShare/CreatePublicSharing.tsx | 4 +-- .../share-externally/ShareConfiguration.tsx | 4 +-- .../share-externally/ShareExternally.tsx | 5 ++- .../ShareButton/share-externally/utils.ts | 2 +- .../share-internally/ShareInternally.tsx | 4 +-- .../share-snapshot/ShareSnapshot.tsx | 4 +-- .../share-snapshot/UpsertSnapshot.tsx | 4 +-- .../ShareDrawer/ShareDrawerConfirmAction.tsx | 3 +- .../sharing/ShareExportTab.tsx | 3 +- .../sharing/ShareInternallyConfiguration.tsx | 4 +-- .../sharing/ShareLibraryPanelTab.tsx | 2 +- .../dashboard-scene/sharing/ShareLinkTab.tsx | 3 +- .../dashboard-scene/sharing/ShareModal.tsx | 2 +- .../sharing/SharePanelEmbedTab.tsx | 2 +- .../sharing/ShareSnapshotTab.tsx | 5 +-- .../panel-share/SharePanelInternally.tsx | 4 +-- .../sharing/panel-share/SharePanelPreview.tsx | 4 +-- .../ConfigPublicDashboard.tsx | 3 +- .../SharePublicDashboardTab.tsx | 2 +- .../dashboard-scene/solo/SoloPanelPage.tsx | 4 +-- .../features/dashboard-scene/utils/utils.ts | 2 +- .../v2schema/ImportDashboardFormV2.tsx | 4 +-- .../variables/VariableUsagesButton.tsx | 4 +-- .../variables/VariablesDependenciesButton.tsx | 3 +- .../dashboard-scene/variables/utils.ts | 2 +- public/app/features/dashboard/api/legacy.ts | 2 +- .../dashboard/api/publicDashboardApi.ts | 2 +- public/app/features/dashboard/api/v1.ts | 2 +- public/app/features/dashboard/api/v2.ts | 2 +- .../AddLibraryPanelWidget.tsx | 4 +-- .../AddPanelButton/AddPanelMenu.tsx | 4 +-- .../AnnotationSettingsEdit.tsx | 3 +- .../AnnotationSettingsList.tsx | 4 +-- .../dashboard/components/DashNav/DashNav.tsx | 4 +-- .../DashNav/DashNavTimeControls.tsx | 2 +- .../components/DashboardRow/DashboardRow.tsx | 3 +- .../AutoRefreshIntervals.tsx | 3 +- .../DashboardSettings/DashboardSettings.tsx | 4 +-- .../DashboardSettings/GeneralSettings.tsx | 4 +-- .../DashboardSettings/TimePickerSettings.tsx | 2 +- .../DeleteDashboard/DeleteDashboardModal.tsx | 4 +-- .../components/GenAI/GenAIHistory.tsx | 3 +- .../GenAI/MinimalisticPagination.tsx | 3 +- .../components/HelpWizard/HelpWizard.tsx | 3 +- .../HelpWizard/SupportSnapshotService.ts | 2 +- .../dashboard/components/HelpWizard/utils.ts | 2 +- .../components/Inspector/InspectContent.tsx | 5 ++- .../dashboard/components/Inspector/hooks.ts | 6 ++-- .../PanelEditor/DynamicConfigValueEditor.tsx | 4 +-- .../PanelEditor/OptionsPaneOptions.tsx | 4 +-- .../PanelEditor/OverrideCategoryTitle.tsx | 4 +-- .../components/PanelEditor/PanelEditor.tsx | 3 +- .../PanelEditor/PanelEditorTableView.tsx | 3 +- .../PanelEditor/VisualizationButton.tsx | 4 +-- .../PanelEditor/VisualizationSelectPane.tsx | 3 +- .../PanelEditor/getFieldOverrideElements.tsx | 2 +- .../PanelEditor/getLibraryPanelOptions.tsx | 2 +- .../PanelEditor/getPanelFrameOptions.tsx | 2 +- .../PanelEditor/getVisualizationOptions.tsx | 2 +- .../components/PanelEditor/state/selectors.ts | 2 +- .../PublicDashboardNotAvailable.tsx | 4 +-- .../RepeatRowSelect/RepeatRowSelect.tsx | 8 ++--- .../RowOptions/RowOptionsButton.tsx | 4 +-- .../components/RowOptions/RowOptionsForm.tsx | 4 +-- .../components/RowOptions/RowOptionsModal.tsx | 4 +-- .../SaveDashboard/DashboardValidation.tsx | 3 +- .../SaveDashboard/SaveDashboardDiff.tsx | 3 +- .../SaveDashboard/SaveDashboardDrawer.tsx | 3 +- .../SaveDashboard/SaveDashboardErrorProxy.tsx | 6 ++-- .../SaveDashboard/UnsavedChangesModal.tsx | 3 +- .../forms/SaveDashboardAsForm.tsx | 4 +-- .../SaveDashboard/forms/SaveDashboardForm.tsx | 4 +-- .../components/ShareModal/ShareEmbed.tsx | 4 +-- .../components/ShareModal/ShareExport.tsx | 3 +- .../components/ShareModal/ShareLink.tsx | 3 +- .../components/ShareModal/ShareModal.tsx | 2 +- .../ConfigPublicDashboard.tsx | 4 +-- .../ConfigPublicDashboard/Configuration.tsx | 4 +-- .../EmailSharingConfiguration.tsx | 6 ++-- .../SettingsBarHeader.tsx | 4 +-- .../ConfigPublicDashboard/SettingsSummary.tsx | 4 +-- .../AcknowledgeCheckboxes.tsx | 4 +-- .../ModalAlerts/NoUpsertPermissionsAlert.tsx | 4 +-- .../ModalAlerts/SaveDashboardChangesAlert.tsx | 4 +-- .../UnsupportedDataSourcesAlert.tsx | 4 +-- .../UnsupportedTemplateVariablesAlert.tsx | 4 +-- .../components/ShareModal/ShareSnapshot.tsx | 3 +- .../components/ShareModal/ThemePicker.tsx | 4 +-- .../components/ShareModal/ViewJsonModal.tsx | 3 +- .../SubMenu/DashboardLinksDashboard.tsx | 4 +-- .../dashboard/components/SubMenu/SubMenu.tsx | 2 +- .../TransformationEditor.tsx | 3 +- .../TransformationFilter.tsx | 4 +-- .../TransformationOperationRow.tsx | 4 +-- .../TransformationPicker.tsx | 4 +-- .../TransformationPickerNg.tsx | 3 +- .../TransformationsEditor.tsx | 3 +- .../VersionHistory/RevertDashboardModal.tsx | 4 +-- .../VersionHistoryComparison.tsx | 4 +-- .../VersionHistory/VersionHistoryTable.tsx | 4 +-- .../containers/DashboardPageError.tsx | 3 +- .../dashboard/containers/SoloPanelPage.tsx | 4 +-- .../dashboard/dashgrid/PanelLinks.tsx | 3 +- .../dashboard/services/DashboardSrv.ts | 2 +- .../features/dashboard/services/TimeSrv.ts | 2 +- .../features/dashboard/state/initDashboard.ts | 2 +- .../app/features/dashboard/state/reducers.ts | 2 +- .../app/features/dashboard/utils/dashboard.ts | 2 +- .../features/dashboard/utils/getPanelMenu.ts | 2 +- public/app/features/dashboard/utils/panel.ts | 2 +- .../datasources/components/BasicSettings.tsx | 5 +-- .../datasources/components/CloudInfoBox.tsx | 3 +- .../components/DashboardsTable.tsx | 4 +-- .../DataSourceMissingRightsMessage.tsx | 4 +-- .../components/DataSourceReadOnlyMessage.tsx | 4 +-- .../components/DataSourceTestingStatus.tsx | 6 ++-- .../components/DataSourceTypeCard.tsx | 4 +-- .../components/DataSourcesList.tsx | 4 +-- .../datasources/components/NewDataSource.tsx | 4 +-- .../picker/AddNewDataSourceButton.tsx | 4 +-- .../picker/BuiltInDataSourceList.tsx | 8 ++--- .../components/picker/DataSourceModal.tsx | 4 +-- .../components/picker/DataSourcePicker.tsx | 4 +-- .../components/useDataSourceInfo.tsx | 3 +- .../app/features/datasources/state/actions.ts | 2 +- .../datasources/state/buildCategories.ts | 2 +- .../app/features/datasources/state/hooks.ts | 2 +- .../features/datasources/state/navModel.ts | 2 +- .../features/datasources/state/reducers.ts | 2 +- .../dimensions/editors/FileUploader.tsx | 4 +-- .../dimensions/editors/FolderPickerTab.tsx | 4 +-- .../editors/ResourceDimensionEditor.tsx | 3 +- .../editors/ScalarDimensionEditor.tsx | 3 +- .../editors/ScaleDimensionEditor.tsx | 3 +- .../editors/TextDimensionEditor.tsx | 3 +- .../ThresholdsEditor/ThresholdsEditor.tsx | 3 +- .../dimensions/editors/URLPickerTab.tsx | 4 +-- .../ValueMappingEditRow.tsx | 4 +-- .../ValueMappingsEditor.tsx | 3 +- .../ValueMappingsEditorModal.tsx | 4 +-- .../explore/ContentOutline/ContentOutline.tsx | 4 +-- .../ContentOutlineItemButton.tsx | 4 +-- .../explore/CorrelationEditorModeBar.tsx | 4 +-- .../features/explore/CorrelationHelper.tsx | 4 +-- .../CorrelationTransformationAddModal.tsx | 4 +-- .../CorrelationUnsavedChangesModal.tsx | 4 +-- .../features/explore/DrilldownAlertBox.tsx | 4 +-- public/app/features/explore/Explore.tsx | 2 +- .../explore/ExploreQueryInspector.tsx | 3 +- .../explore/ExploreRunQueryButton.tsx | 4 +-- .../app/features/explore/ExploreToolbar.tsx | 4 +-- .../features/explore/Graph/GraphContainer.tsx | 3 +- .../app/features/explore/LiveTailButton.tsx | 4 +-- public/app/features/explore/Logs/LiveLogs.tsx | 3 +- public/app/features/explore/Logs/Logs.tsx | 4 +-- .../explore/Logs/LogsColumnSearch.tsx | 4 +-- .../features/explore/Logs/LogsContainer.tsx | 2 +- .../app/features/explore/Logs/LogsMetaRow.tsx | 3 +- .../features/explore/Logs/LogsNavigation.tsx | 3 +- .../features/explore/Logs/LogsSamplePanel.tsx | 4 +-- .../explore/Logs/LogsTableAvailableFields.tsx | 4 +-- .../explore/Logs/LogsTableNavField.tsx | 4 +-- .../features/explore/Logs/LogsTableWrap.tsx | 3 +- .../features/explore/Logs/LogsVolumePanel.tsx | 4 +-- .../explore/Logs/LogsVolumePanelList.tsx | 4 +-- .../app/features/explore/Logs/PopoverMenu.tsx | 4 +-- .../explore/NodeGraph/NodeGraphContainer.tsx | 4 +-- .../PrometheusListView/RawListContainer.tsx | 4 +-- .../PrometheusListView/RawListItem.tsx | 4 +-- .../explore/RichHistory/RichHistory.tsx | 5 ++- .../RichHistory/RichHistoryAddToLibrary.tsx | 3 +- .../explore/RichHistory/RichHistoryCard.tsx | 7 ++-- .../RichHistory/RichHistoryQueriesTab.tsx | 3 +- .../RichHistory/RichHistorySettingsTab.tsx | 4 +-- .../RichHistory/RichHistoryStarredTab.tsx | 3 +- .../app/features/explore/SecondaryActions.tsx | 4 +-- .../features/explore/ShortLinkButtonMenu.tsx | 4 +-- .../features/explore/Table/TableContainer.tsx | 3 +- .../app/features/explore/TimeSyncButton.tsx | 4 +-- .../features/explore/TraceView/TraceView.tsx | 3 +- .../explore/TraceView/TraceViewContainer.tsx | 3 +- .../Actions/TracePageActions.tsx | 4 +-- .../SearchBar/NextPrevResult.tsx | 4 +-- .../SearchBar/TracePageSearchBar.tsx | 4 +-- .../SpanFilters/SpanFilters.tsx | 4 +-- .../SpanFilters/SpanFiltersTags.tsx | 4 +-- .../TracePageHeader/TracePageHeader.tsx | 4 +-- .../SpanDetail/AccordianReferences.tsx | 4 +-- .../SpanDetail/SpanDetailLinkButtons.tsx | 3 +- .../TraceTimelineViewer/SpanDetail/index.tsx | 4 +-- .../TimelineHeaderRow/TimelineCollapser.tsx | 3 +- .../VirtualizedTraceView.tsx | 2 +- .../TraceView/components/common/CopyIcon.tsx | 4 +-- .../components/common/SearchBarInput.tsx | 2 +- .../components/settings/SpanBarSettings.tsx | 5 ++- .../explore/TraceView/createSpanLink.tsx | 4 +-- .../AddToDashboard/addToDashboard.ts | 2 +- .../extensions/AddToDashboard/index.tsx | 3 +- .../extensions/toolbar/BasicExtensions.tsx | 3 +- .../toolbar/QuerylessAppsExtensions.tsx | 3 +- public/app/features/explore/state/time.ts | 2 +- public/app/features/explore/utils/links.ts | 2 +- .../expressions/ExpressionQueryEditor.tsx | 4 +-- .../components/ClassicConditions.tsx | 4 +-- .../features/expressions/components/Math.tsx | 4 +-- .../expressions/components/Reduce.tsx | 4 +-- .../expressions/components/Resample.tsx | 4 +-- .../expressions/components/Threshold.tsx | 8 ++--- public/app/features/folders/state/navModel.ts | 2 +- .../components/ConfigCard.tsx | 3 +- .../components/Essentials.tsx | 4 +-- .../gops/configuration-tracker/irmHooks.ts | 2 +- .../features/inspector/InspectDataOptions.tsx | 4 +-- .../app/features/inspector/InspectDataTab.tsx | 3 +- .../app/features/inspector/InspectJSONTab.tsx | 12 +++---- .../features/inspector/InspectStatsTab.tsx | 4 +-- .../app/features/inspector/QueryInspector.tsx | 3 +- public/app/features/invites/InviteeRow.tsx | 2 +- public/app/features/invites/SignupInvited.tsx | 4 +-- .../AddLibraryPanelModal.tsx | 5 +-- .../DeleteLibraryPanelModal.tsx | 4 +-- .../LibraryPanelsSearch.tsx | 4 +-- .../LibraryPanelsView/LibraryPanelsView.tsx | 3 +- .../OpenLibraryPanelModal.tsx | 4 +-- .../SaveLibraryPanelModal.tsx | 4 +-- .../library-panels/utils/usePanelSave.ts | 4 +-- .../features/live/LiveConnectionWarning.tsx | 2 +- .../live/dashboard/DashboardChangedModal.tsx | 4 +-- .../features/logs/components/LogDetails.tsx | 3 +- .../logs/components/LogDetailsBody.tsx | 4 +-- .../logs/components/LogDetailsRow.tsx | 2 +- .../logs/components/LogLabelStats.tsx | 2 +- .../features/logs/components/LogLabels.tsx | 5 +-- .../app/features/logs/components/LogRow.tsx | 4 +-- .../logs/components/LogRowMenuCell.tsx | 4 +-- .../app/features/logs/components/LogRows.tsx | 4 +-- .../log-context/LogContextButtons.tsx | 4 +-- .../log-context/LogRowContextModal.tsx | 3 +- .../app/features/logs/components/logParser.ts | 2 +- .../logs/components/panel/InfiniteScroll.tsx | 9 ++--- .../logs/components/panel/LogLine.tsx | 3 +- .../logs/components/panel/LogLineDetails.tsx | 3 +- .../logs/components/panel/LogLineMenu.tsx | 5 +-- .../logs/components/panel/LogList.tsx | 3 +- .../logs/components/panel/LogListControls.tsx | 8 ++--- public/app/features/logs/logsModel.ts | 2 +- .../manage-dashboards/DashboardImportPage.tsx | 3 +- .../components/ImportDashboardForm.tsx | 4 +-- .../DeletePublicDashboardButton.tsx | 4 +-- .../DeletePublicDashboardModal.tsx | 5 +-- .../PublicDashboardListTable.tsx | 6 ++-- .../components/SnapshotListTable.tsx | 4 +-- .../components/SnapshotListTableRow.tsx | 3 +- .../manage-dashboards/utils/validation.ts | 2 +- .../cloud/EmptyState/InfoPane.tsx | 4 +-- .../cloud/EmptyState/MigrationStepsPane.tsx | 3 +- .../MigrationTokenPane/CreateTokenModal.tsx | 5 +-- .../DeleteMigrationTokenModal.tsx | 4 +-- .../DeleteTokenConfirmationModal.tsx | 3 +- .../MigrationTokenPane/MigrationTokenPane.tsx | 4 +-- .../cloud/TokenErrorAlert.tsx | 4 +-- .../onprem/DisconnectModal.tsx | 4 +-- .../EmptyState/CallToAction/ConnectModal.tsx | 8 ++--- .../onprem/EmptyState/InfoPaneLeft.tsx | 3 +- .../onprem/EmptyState/InfoPaneRight.tsx | 4 +-- .../onprem/MigrationSummary.tsx | 3 +- .../features/migrate-to-cloud/onprem/Page.tsx | 34 +++++++------------ .../onprem/ResourceDetailsModal.tsx | 9 +++-- .../migrate-to-cloud/onprem/SnapshotCTAs.tsx | 4 +-- .../migrate-to-cloud/onprem/StatusCell.tsx | 8 ++--- .../migrate-to-cloud/onprem/TypeCell.tsx | 7 ++-- .../migrate-to-cloud/onprem/resourceInfo.ts | 2 +- .../onprem/useNotifyOnSuccess.tsx | 10 +++--- .../notifications/StoredNotifications.tsx | 4 +-- public/app/features/org/NewOrgPage.tsx | 4 +-- public/app/features/org/OrgDetailsPage.tsx | 2 +- public/app/features/org/OrgProfile.tsx | 3 +- public/app/features/org/UserInviteForm.tsx | 4 +-- public/app/features/org/UserInvitePage.tsx | 3 +- .../panel/components/PanelPluginError.tsx | 6 +--- .../VizTypePicker/PanelTypeCard.tsx | 4 +-- .../panel/panellinks/linkSuppliers.ts | 2 +- .../app/features/panel/panellinks/link_srv.ts | 2 +- public/app/features/playlist/PlaylistCard.tsx | 4 +-- .../features/playlist/PlaylistEditPage.tsx | 4 +-- public/app/features/playlist/PlaylistForm.tsx | 4 +-- .../app/features/playlist/PlaylistNewPage.tsx | 3 +- public/app/features/playlist/PlaylistPage.tsx | 4 +-- .../app/features/playlist/PlaylistTable.tsx | 4 +-- .../features/playlist/PlaylistTableRows.tsx | 3 +- public/app/features/playlist/ShareModal.tsx | 4 +-- public/app/features/playlist/StartModal.tsx | 4 +-- .../Badges/PluginDeprecatedBadge.tsx | 4 +-- .../components/Badges/PluginDisabledBadge.tsx | 4 +-- .../Badges/PluginEnterpriseBadge.tsx | 3 +- .../components/Badges/PluginInstallBadge.tsx | 3 +- .../admin/components/ConnectionsTab.tsx | 4 +-- .../GetStartedWithDataSource.tsx | 4 +-- .../InstallControls/InstallControlsButton.tsx | 4 +-- .../InstallControlsWarning.tsx | 4 +-- .../PluginDetailsDeprecatedWarning.tsx | 4 +-- .../components/PluginDetailsDisabledError.tsx | 3 +- .../admin/components/PluginDetailsPage.tsx | 5 +-- .../components/PluginDetailsSignature.tsx | 3 +- .../plugins/admin/components/PluginList.tsx | 4 +-- .../admin/components/PluginListItem.tsx | 4 +-- .../plugins/admin/components/PluginUsage.tsx | 4 +-- .../plugins/admin/components/SearchField.tsx | 3 +- .../admin/components/UpdateAllModal.tsx | 8 ++--- .../admin/components/UpdateAllModalBody.tsx | 6 ++-- .../admin/components/VersionInstallButton.tsx | 4 +-- .../admin/hooks/usePluginDetailsTabs.tsx | 2 +- .../plugins/admin/hooks/usePluginInfo.tsx | 3 +- .../features/plugins/admin/pages/Browse.tsx | 4 +-- .../plugins/components/AppRootPage.tsx | 4 +-- .../plugins/components/PluginStateInfo.tsx | 2 +- .../plugins/components/PluginsErrorsInfo.tsx | 4 +-- .../extensions/logs/LogViewFilters.tsx | 3 +- .../plugins/extensions/logs/dataSource.ts | 2 +- .../features/profile/ChangePasswordForm.tsx | 4 +-- .../features/profile/UserOrganizations.tsx | 3 +- .../features/profile/UserProfileEditForm.tsx | 6 +--- .../features/profile/UserProfileEditTabs.tsx | 6 ++-- public/app/features/profile/UserSessions.tsx | 3 +- public/app/features/profile/UserTeams.tsx | 3 +- .../provisioning/Config/ConfigForm.tsx | 8 ++--- .../Config/ConfigFormGithubCollapse.tsx | 3 +- .../features/provisioning/Config/defaults.ts | 2 +- .../provisioning/File/FileStatusPage.tsx | 5 ++- .../features/provisioning/File/FilesView.tsx | 4 +-- .../GettingStarted/GettingStarted.tsx | 8 ++--- .../GettingStarted/GettingStartedPage.tsx | 4 +-- .../GettingStarted/SidebarItem.tsx | 4 +-- public/app/features/provisioning/HomePage.tsx | 6 ++-- .../provisioning/Job/FinishedJobStatus.tsx | 4 +-- .../features/provisioning/Job/JobContent.tsx | 4 +-- .../features/provisioning/Job/RecentJobs.tsx | 10 ++---- .../Repository/DeleteRepositoryButton.tsx | 4 +-- .../Repository/EditRepositoryPage.tsx | 3 +- .../Repository/RepositoryHealth.tsx | 4 +-- .../Repository/RepositoryOverview.tsx | 4 +-- .../Repository/RepositoryResources.tsx | 3 +- .../Repository/RepositoryStatusPage.tsx | 6 ++-- .../Repository/SyncRepository.tsx | 4 +-- .../Shared/ConnectRepositoryButton.tsx | 3 +- .../provisioning/Shared/RepositoryList.tsx | 4 +-- .../provisioning/Wizard/BootstrapStep.tsx | 3 +- .../provisioning/Wizard/ConnectPage.tsx | 3 +- .../provisioning/Wizard/ConnectStep.tsx | 4 +-- .../provisioning/Wizard/FinishStep.tsx | 4 +-- .../Wizard/ProvisioningWizard.tsx | 12 +++---- .../provisioning/Wizard/SynchronizeStep.tsx | 3 +- .../features/provisioning/Wizard/actions.ts | 6 ++-- .../query/components/QueryEditorRow.tsx | 3 +- .../query/components/QueryEditorRowHeader.tsx | 4 +-- .../features/query/components/QueryGroup.tsx | 4 +-- .../query/components/QueryGroupOptions.tsx | 4 +-- .../scopes/dashboards/ScopesDashboards.tsx | 4 +-- .../ScopesDashboardsTreeFolderItem.tsx | 4 +-- .../dashboards/ScopesDashboardsTreeSearch.tsx | 4 +-- .../features/scopes/selector/ScopesInput.tsx | 6 ++-- .../scopes/selector/ScopesSelector.tsx | 4 +-- .../scopes/selector/ScopesTreeItem.tsx | 3 +- .../scopes/selector/ScopesTreeSearch.tsx | 4 +-- .../search/page/components/ActionRow.tsx | 8 ++--- .../page/components/SearchResultsTable.tsx | 4 +-- .../search/page/components/columns.tsx | 3 +- public/app/features/search/service/bluge.ts | 2 +- public/app/features/search/service/unified.ts | 2 +- public/app/features/search/tempI18nPhrases.ts | 2 +- .../ServiceAccountCreatePage.tsx | 4 +-- .../serviceaccounts/ServiceAccountPage.tsx | 3 +- .../ServiceAccountPermissions.tsx | 4 +-- .../serviceaccounts/ServiceAccountTable.tsx | 4 +-- .../ServiceAccountsListPage.tsx | 4 +-- .../components/CreateTokenModal.tsx | 4 +-- .../components/ServiceAccountProfile.tsx | 4 +-- .../components/ServiceAccountProfileRow.tsx | 4 +-- .../components/ServiceAccountRoleRow.tsx | 3 +- .../components/ServiceAccountTokensTable.tsx | 7 ++-- .../components/ServiceAccountsListItem.tsx | 4 +-- .../support-bundles/SupportBundles.tsx | 4 +-- .../support-bundles/SupportBundlesCreate.tsx | 3 +- public/app/features/teams/CreateTeam.tsx | 4 +-- public/app/features/teams/TeamGroupSync.tsx | 3 +- public/app/features/teams/TeamList.tsx | 6 ++-- public/app/features/teams/TeamSettings.tsx | 4 +-- public/app/features/teams/state/navModel.ts | 2 +- .../FilterByValueFilterEditor.tsx | 3 +- .../FilterByValueTransformerEditor.tsx | 3 +- .../ValueMatchers/BasicMatcherEditor.tsx | 3 +- .../ValueMatchers/RangeMatcherEditor.tsx | 4 +-- .../ValueMatchers/RegexMatcherEditor.tsx | 3 +- .../calculateHeatmap/editor/AxisEditor.tsx | 4 +-- .../ConfigFromQueryTransformerEditor.tsx | 4 +-- .../BinaryOperationOptionsEditor.tsx | 3 +- .../CalculateFieldTransformerEditor.tsx | 4 +-- .../CumulativeOptionsEditor.tsx | 3 +- .../IndexOptionsEditor.tsx | 3 +- .../ReduceRowOptionsEditor.tsx | 3 +- .../UnaryOperationEditor.tsx | 3 +- .../WindowOptionsEditor.tsx | 3 +- .../editors/ConcatenateTransformerEditor.tsx | 2 +- .../ConvertFieldTypeTransformerEditor.tsx | 3 +- .../transformers/editors/EnumMappingRow.tsx | 4 +-- .../editors/FilterByNameTransformerEditor.tsx | 2 +- .../editors/FormatStringTransformerEditor.tsx | 4 +-- .../editors/FormatTimeTransformerEditor.tsx | 3 +- .../editors/GroupByTransformerEditor.tsx | 5 ++- .../GroupToNestedTableTransformerEditor.tsx | 5 +-- .../GroupingToMatrixTransformerEditor.tsx | 4 +-- .../editors/HistogramTransformerEditor.tsx | 4 +-- .../editors/JoinByFieldTransformerEditor.tsx | 4 +-- .../LabelsToFieldsTransformerEditor.tsx | 4 +-- .../editors/LimitTransformerEditor.tsx | 4 +-- .../OrganizeFieldsTransformerEditor.tsx | 4 +-- .../editors/ReduceTransformerEditor.tsx | 4 +-- .../editors/RenameByRegexTransformer.tsx | 2 +- .../editors/SortByTransformerEditor.tsx | 4 +-- .../editors/TransposeTransformerEditor.tsx | 4 +-- .../ExtractFieldsTransformerEditor.tsx | 4 +-- .../components/JSONPathEditor.tsx | 5 ++- ...eldConfigMappingHandlerArgumentsEditor.tsx | 3 +- .../JoinByLabelsTransformerEditor.tsx | 6 ++-- .../FieldLookupTransformerEditor.tsx | 4 +-- .../PartitionByValuesEditor.tsx | 3 +- .../PrepareTimeSeriesEditor.tsx | 4 +-- .../regression/regressionEditor.tsx | 3 +- .../spatial/SpatialTransformerEditor.tsx | 2 +- .../transformers/spatial/optionsHelper.tsx | 2 +- .../TimeSeriesTableTransformEditor.tsx | 4 +-- public/app/features/transformers/utils.ts | 2 +- .../app/features/users/TokenRevokedModal.tsx | 4 +-- public/app/features/users/UsersActionBar.tsx | 4 +-- .../app/features/variables/adhoc/adapter.ts | 2 +- .../variables/adhoc/picker/AdHocFilter.tsx | 2 +- .../adhoc/picker/AdHocFilterBuilder.tsx | 4 +-- .../variables/adhoc/picker/AdHocFilterKey.tsx | 4 +-- .../app/features/variables/custom/adapter.ts | 2 +- .../features/variables/datasource/reducer.ts | 2 +- .../variables/editor/ConfirmDeleteModal.tsx | 4 +-- .../editor/LegacyVariableQueryEditor.tsx | 4 +-- .../variables/editor/VariableEditorEditor.tsx | 3 +- .../variables/editor/VariableEditorList.tsx | 4 +-- .../editor/VariableEditorListRow.tsx | 6 ++-- .../inspect/VariableUsagesButton.tsx | 4 +-- .../inspect/VariablesDependenciesButton.tsx | 4 +-- .../inspect/VariablesUnknownButton.tsx | 4 +-- .../inspect/VariablesUnknownTable.tsx | 3 +- .../app/features/variables/inspect/utils.ts | 2 +- .../features/variables/interval/adapter.ts | 2 +- .../pickers/shared/VariableInput.tsx | 2 +- .../variables/pickers/shared/VariableLink.tsx | 3 +- .../pickers/shared/VariableOptions.tsx | 3 +- .../query/QueryVariableRefreshSelect.tsx | 3 +- .../query/QueryVariableSortSelect.tsx | 3 +- .../app/features/variables/query/adapter.ts | 2 +- .../textbox/TextBoxVariableEditor.tsx | 4 +-- .../textbox/TextBoxVariablePicker.tsx | 4 +-- .../ArgQueryEditor/SubscriptionField.tsx | 3 +- .../AppRegistrationCredentials.tsx | 3 +- .../ConfigEditor/AzureCredentialsForm.tsx | 3 +- .../ConfigEditor/BasicLogsToggle.tsx | 3 +- .../components/ConfigEditor/ConfigEditor.tsx | 2 +- .../CurrentUserFallbackCredentials.tsx | 3 +- .../ConfigEditor/DefaultSubscription.tsx | 3 +- .../LogsQueryBuilder/AggregateItem.tsx | 3 +- .../LogsQueryBuilder/AggregationSection.tsx | 3 +- .../LogsQueryBuilder/FilterItem.tsx | 3 +- .../LogsQueryBuilder/FilterSection.tsx | 3 +- .../LogsQueryBuilder/FuzzySearch.tsx | 3 +- .../LogsQueryBuilder/GroupByItem.tsx | 3 +- .../LogsQueryBuilder/GroupBySection.tsx | 3 +- .../LogsQueryBuilder/KQLPreview.tsx | 3 +- .../LogsQueryBuilder/LimitSection.tsx | 4 +-- .../LogsQueryBuilder/LogsQueryBuilder.tsx | 3 +- .../LogsQueryBuilder/OrderBySection.tsx | 3 +- .../LogsQueryBuilder/TableSection.tsx | 4 +-- .../AdvancedResourcePicker.tsx | 3 +- .../LogsQueryEditor/AzureCheatSheet.tsx | 4 +-- .../LogsQueryEditor/AzureCheatSheetModal.tsx | 3 +- .../LogsQueryEditor/LogsManagement.tsx | 4 +-- .../components/LogsQueryEditor/RawQuery.tsx | 4 +-- .../LogsQueryEditor/TimeManagement.tsx | 3 +- .../AdvancedResourcePicker.tsx | 3 +- .../MetricsQueryEditor/AggregationField.tsx | 3 +- .../MetricsQueryEditor/DimensionFields.tsx | 3 +- .../MetricsQueryEditor/LegendFormatField.tsx | 3 +- .../MetricsQueryEditor/MetricNameField.tsx | 3 +- .../MetricNamespaceField.tsx | 3 +- .../MetricsQueryEditor/TimeGrainField.tsx | 3 +- .../MetricsQueryEditor/TopField.tsx | 3 +- .../components/QueryEditor/QueryEditor.tsx | 6 +--- .../components/QueryEditor/QueryHeader.tsx | 3 +- .../ResourceField/ResourceField.tsx | 3 +- .../ResourcePicker/AdvancedMulti.tsx | 3 +- .../components/ResourcePicker/NestedRow.tsx | 3 +- .../ResourcePicker/ResourcePicker.tsx | 3 +- .../components/ResourcePicker/Search.tsx | 3 +- .../components/TracesQueryEditor/Filter.tsx | 3 +- .../components/TracesQueryEditor/Filters.tsx | 3 +- .../TracesQueryEditor/TraceTypeField.tsx | 3 +- .../TracesQueryEditor/TracesQueryEditor.tsx | 3 +- .../GrafanaTemplateVariableFn.tsx | 3 +- .../VariableEditor/VariableEditor.tsx | 4 +-- .../components/shared/FormatAsField.tsx | 3 +- .../grafana/components/TimeRegionEditor.tsx | 4 +-- .../mssql/azureauth/AzureCredentialsForm.tsx | 3 +- .../configuration/ConfigurationEditor.tsx | 4 +-- .../mssql/configuration/Kerberos.tsx | 6 ++-- .../panel/alertlist/GroupByWithLoading.tsx | 3 +- .../panel/alertlist/UnifiedAlertList.tsx | 4 +-- .../unified-alerting/UngroupedView.tsx | 3 +- .../plugins/panel/annolist/AnnoListPanel.tsx | 3 +- .../panel/barchart/TickSpacingEditor.tsx | 3 +- .../canvas/components/CanvasContextMenu.tsx | 3 +- .../panel/canvas/editor/LineStyleEditor.tsx | 3 +- .../panel/canvas/editor/element/APIEditor.tsx | 3 +- .../editor/element/ButtonStyleEditor.tsx | 3 +- .../canvas/editor/element/ParamsEditor.tsx | 3 +- .../canvas/editor/element/PlacementEditor.tsx | 3 +- .../editor/element/QuickPositioning.tsx | 3 +- .../panel/canvas/editor/inline/InlineEdit.tsx | 3 +- .../canvas/editor/inline/InlineEditBody.tsx | 3 +- .../editor/layer/TreeNavigationEditor.tsx | 3 +- .../canvas/editor/layer/TreeNodeTitle.tsx | 3 +- .../panel/canvas/editor/panZoomHelp.tsx | 3 +- .../panel/datagrid/components/AddColumn.tsx | 3 +- .../components/DatagridContextMenu.tsx | 3 +- .../plugins/panel/debug/RenderInfoViewer.tsx | 3 +- public/app/plugins/panel/debug/StateView.tsx | 3 +- .../app/plugins/panel/geomap/GeomapPanel.tsx | 2 +- .../panel/geomap/components/MarkersLegend.tsx | 3 +- .../geomap/components/MeasureOverlay.tsx | 3 +- .../editor/CoordinatesMapViewEditor.tsx | 3 +- .../panel/geomap/editor/FitMapViewEditor.tsx | 3 +- .../geomap/editor/FrameSelectionEditor.tsx | 4 +-- .../geomap/editor/GeomapStyleRulesEditor.tsx | 3 +- .../panel/geomap/editor/LayersEditor.tsx | 3 +- .../panel/geomap/editor/MapViewEditor.tsx | 3 +- .../panel/geomap/editor/StyleEditor.tsx | 3 +- .../panel/geomap/editor/StyleRuleEditor.tsx | 3 +- .../panel/gettingstarted/GettingStarted.tsx | 3 +- .../gettingstarted/components/DocsCard.tsx | 3 +- .../components/TutorialCard.tsx | 3 +- .../plugins/panel/live/LiveChannelEditor.tsx | 3 +- public/app/plugins/panel/live/LivePanel.tsx | 3 +- public/app/plugins/panel/news/NewsPanel.tsx | 3 +- public/app/plugins/panel/nodeGraph/Edge.tsx | 3 +- public/app/plugins/panel/nodeGraph/Marker.tsx | 3 +- public/app/plugins/panel/nodeGraph/Node.tsx | 3 +- .../app/plugins/panel/nodeGraph/NodeGraph.tsx | 3 +- .../plugins/panel/nodeGraph/ViewControls.tsx | 3 +- .../nodeGraph/editor/ArcOptionsEditor.tsx | 3 +- .../panel/nodeGraph/useContextMenu.tsx | 4 +-- .../table/cells/AutoCellOptionsEditor.tsx | 4 +-- .../table/cells/BarGaugeCellOptionsEditor.tsx | 4 +-- .../ColorBackgroundCellOptionsEditor.tsx | 4 +-- .../table/cells/ImageCellOptionsEditor.tsx | 3 +- .../table-new/cells/AutoCellOptionsEditor.tsx | 4 +-- .../cells/BarGaugeCellOptionsEditor.tsx | 4 +-- .../ColorBackgroundCellOptionsEditor.tsx | 4 +-- .../cells/ImageCellOptionsEditor.tsx | 3 +- .../panel/timeseries/LineStyleEditor.tsx | 3 +- .../panel/timeseries/NullsThresholdInput.tsx | 3 +- .../panel/timeseries/TimezonesEditor.tsx | 3 +- .../annotations2/AnnotationEditor2.tsx | 3 +- .../annotations2/AnnotationTooltip2.tsx | 3 +- .../plugins/panel/xychart/SeriesEditor.tsx | 3 +- public/locales/en-US/grafana.json | 5 +++ 1134 files changed, 1605 insertions(+), 2663 deletions(-) diff --git a/contribute/internationalization.md b/contribute/internationalization.md index d33e354a5a7..bc117459808 100644 --- a/contribute/internationalization.md +++ b/contribute/internationalization.md @@ -75,9 +75,8 @@ const ErrorMessage = ({ id, message }) => There Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this. ```jsx -import { useTranslate } from "@grafana/i18n" +import { t } from "@grafana/i18n" -const { t } = useTranslate(); const placeholder = t('form.username-placeholder','Username'); return @@ -211,9 +210,8 @@ import { Trans } from '@grafana/i18n'; ``` ```js -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; -const { t } = useTranslate(); const translatedString = t('inbox.heading', 'You got {{count}} messages', { count: messages.length }); ``` diff --git a/packages/grafana-i18n/src/i18n.tsx b/packages/grafana-i18n/src/i18n.tsx index 343061a6c42..6a5f3f25c05 100644 --- a/packages/grafana-i18n/src/i18n.tsx +++ b/packages/grafana-i18n/src/i18n.tsx @@ -192,11 +192,6 @@ export const t: TFunction = (id: string, defaultMessage: string, values?: Record return tFunc(id, defaultMessage, values); }; -export function useTranslate() { - initDefaultI18nInstance(); - return { t }; -} - export function Trans(props: TransProps) { initDefaultI18nInstance(); const Component = transComponent ?? I18NextTrans; diff --git a/packages/grafana-i18n/src/index.ts b/packages/grafana-i18n/src/index.ts index 1aa6432ed39..a4ebd2b5289 100644 --- a/packages/grafana-i18n/src/index.ts +++ b/packages/grafana-i18n/src/index.ts @@ -22,6 +22,6 @@ export { PSEUDO_LOCALE, DEFAULT_LANGUAGE, } from './constants'; -export { initPluginTranslations, Trans, useTranslate } from './i18n'; +export { initPluginTranslations, t, Trans } from './i18n'; export type { ResourceLoader, Resources, TFunction, TransProps } from './types'; export { formatDate, formatDuration, formatDateRange } from './dates'; diff --git a/packages/grafana-i18n/src/internal/index.ts b/packages/grafana-i18n/src/internal/index.ts index c54d0ef93fb..7757d7b622d 100644 --- a/packages/grafana-i18n/src/internal/index.ts +++ b/packages/grafana-i18n/src/internal/index.ts @@ -17,5 +17,4 @@ export { getLanguage, getResolvedLanguage, initializeI18n, - t, } from '../i18n'; diff --git a/public/app/api/clients/provisioning/index.ts b/public/app/api/clients/provisioning/index.ts index c206d8611fa..99a5ca42f23 100644 --- a/public/app/api/clients/provisioning/index.ts +++ b/public/app/api/clients/provisioning/index.ts @@ -1,4 +1,4 @@ -import { t } from '@grafana/i18n/internal'; +import { t } from '@grafana/i18n'; import { isFetchError } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createSuccessNotification, createErrorNotification } from 'app/core/copy/appNotification'; diff --git a/public/app/core/components/AccessControl/AddPermission.tsx b/public/app/core/components/AccessControl/AddPermission.tsx index 3b2cde7838b..c7569ff09f6 100644 --- a/public/app/core/components/AccessControl/AddPermission.tsx +++ b/public/app/core/components/AccessControl/AddPermission.tsx @@ -1,7 +1,6 @@ import { useEffect, useMemo, useState } from 'react'; -import { Trans } from '@grafana/i18n'; -import { t } from '@grafana/i18n/internal'; +import { Trans, t } from '@grafana/i18n'; import { Button, Select, Stack } from '@grafana/ui'; import { CloseButton } from 'app/core/components/CloseButton/CloseButton'; import { ServiceAccountPicker } from 'app/core/components/Select/ServiceAccountPicker'; diff --git a/public/app/core/components/AccessControl/PermissionListItem.tsx b/public/app/core/components/AccessControl/PermissionListItem.tsx index 5a18bd566b6..cab4decff7b 100644 --- a/public/app/core/components/AccessControl/PermissionListItem.tsx +++ b/public/app/core/components/AccessControl/PermissionListItem.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; -import { Trans, useTranslate } from '@grafana/i18n'; +import { Trans, t } from '@grafana/i18n'; import { Box, Button, Icon, Select, Tooltip, useStyles2 } from '@grafana/ui'; import { ResourcePermission } from './types'; @@ -16,7 +16,7 @@ interface Props { export const PermissionListItem = ({ item, permissionLevels, canSet, onRemove, onChange }: Props) => { const styles = useStyles2(getStyles); - const { t } = useTranslate(); + return ( {getAvatar(item)} diff --git a/public/app/core/components/AccessControl/Permissions.tsx b/public/app/core/components/AccessControl/Permissions.tsx index 36b32270160..6106de8d640 100644 --- a/public/app/core/components/AccessControl/Permissions.tsx +++ b/public/app/core/components/AccessControl/Permissions.tsx @@ -4,8 +4,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import * as React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { Trans } from '@grafana/i18n'; -import { t } from '@grafana/i18n/internal'; +import { Trans, t } from '@grafana/i18n'; import { Text, Box, Button, useStyles2, Space } from '@grafana/ui'; import { SlideDown } from 'app/core/components/Animations/SlideDown'; import { getBackendSrv } from 'app/core/services/backend_srv'; diff --git a/public/app/core/components/AppChrome/AppChromeService.tsx b/public/app/core/components/AppChrome/AppChromeService.tsx index 68a98eef634..8c91066066b 100644 --- a/public/app/core/components/AppChrome/AppChromeService.tsx +++ b/public/app/core/components/AppChrome/AppChromeService.tsx @@ -2,7 +2,7 @@ import { useObservable } from 'react-use'; import { BehaviorSubject } from 'rxjs'; import { AppEvents, NavModel, NavModelItem, PageLayoutType, UrlQueryValue } from '@grafana/data'; -import { t } from '@grafana/i18n/internal'; +import { t } from '@grafana/i18n'; import { config, locationService, reportInteraction } from '@grafana/runtime'; import appEvents from 'app/core/app_events'; import store from 'app/core/store'; diff --git a/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.test.tsx b/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.test.tsx index 3756924f507..32b0b644a64 100644 --- a/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.test.tsx +++ b/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.test.tsx @@ -1,26 +1,18 @@ import { render, screen, fireEvent } from '@testing-library/react'; -import { useTranslate } from '@grafana/i18n'; - import { ExtensionToolbarItemButton } from './ExtensionToolbarItemButton'; // Mock the useTranslate hook jest.mock('@grafana/i18n', () => ({ - useTranslate: jest.fn(), -})); - -describe('ExtensionToolbarItemButton', () => { - const mockTranslate = (_: string, fallback: string, values?: Record) => { + t: (_: string, fallback: string, values?: Record) => { if (values) { return fallback.replace('{{title}}', values.title); } return fallback; - }; - - beforeEach(() => { - (useTranslate as jest.Mock).mockReturnValue({ t: mockTranslate }); - }); + }, +})); +describe('ExtensionToolbarItemButton', () => { it('renders open button with default tooltip when no title is provided', () => { render(); diff --git a/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.tsx b/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.tsx index 070698d4190..da79fc15536 100644 --- a/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.tsx +++ b/public/app/core/components/AppChrome/ExtensionSidebar/ExtensionToolbarItemButton.tsx @@ -2,7 +2,7 @@ import { css, cx } from '@emotion/css'; import React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { ToolbarButton, useStyles2 } from '@grafana/ui'; interface ToolbarItemButtonProps { @@ -16,7 +16,6 @@ function ExtensionToolbarItemButtonComponent( ref: React.ForwardedRef ) { const styles = useStyles2(getStyles); - const { t } = useTranslate(); if (isOpen) { // render button to close the sidebar diff --git a/public/app/core/components/AppChrome/History/HistoryContainer.tsx b/public/app/core/components/AppChrome/History/HistoryContainer.tsx index d2e677f3b12..88cbde02856 100644 --- a/public/app/core/components/AppChrome/History/HistoryContainer.tsx +++ b/public/app/core/components/AppChrome/History/HistoryContainer.tsx @@ -3,7 +3,7 @@ import { useEffect } from 'react'; import { useToggle } from 'react-use'; import { GrafanaTheme2, store } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { Drawer, ToolbarButton, useStyles2 } from '@grafana/ui'; import { appEvents } from 'app/core/app_events'; import { RecordHistoryEntryEvent } from 'app/types/events'; @@ -47,7 +47,6 @@ export function HistoryContainer() { }; }); }, []); - const { t } = useTranslate(); return ( <> diff --git a/public/app/core/components/AppChrome/History/HistoryWrapper.tsx b/public/app/core/components/AppChrome/History/HistoryWrapper.tsx index a0713e30055..f6120e81c8c 100644 --- a/public/app/core/components/AppChrome/History/HistoryWrapper.tsx +++ b/public/app/core/components/AppChrome/History/HistoryWrapper.tsx @@ -3,7 +3,7 @@ import moment from 'moment'; import { useState } from 'react'; import { FieldType, GrafanaTheme2, store } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { Button, Card, IconButton, Space, Stack, Text, useStyles2, Box, Sparkline, useTheme2, Icon } from '@grafana/ui'; import { formatDate } from 'app/core/internationalization/dates'; @@ -13,7 +13,6 @@ import { HistoryEntry } from '../types'; import { logClickUnifiedHistoryEntryEvent, logUnifiedHistoryShowMoreEvent } from './eventsTracking'; export function HistoryWrapper({ onClose }: { onClose: () => void }) { - const { t } = useTranslate(); const history = store.getObject(HISTORY_LOCAL_STORAGE_KEY, []).filter((entry) => { return moment(entry.time).isAfter(moment().subtract(2, 'day').startOf('day')); }); @@ -89,7 +88,7 @@ function HistoryEntryAppView({ entry, isSelected, onClick }: ItemProps) { const styles = useStyles2(getStyles); const theme = useTheme2(); const [isExpanded, setIsExpanded] = useState(isSelected && entry.views.length > 0); - const { t } = useTranslate(); + const { breadcrumbs, views, time, url, sparklineData } = entry; const expandedLabel = isExpanded ? t('nav.history-wrapper.collapse', 'Collapse') diff --git a/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx b/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx index 4e68c1b8f18..9f85383b4d8 100644 --- a/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx +++ b/public/app/core/components/AppChrome/MegaMenu/MegaMenu.tsx @@ -5,7 +5,7 @@ import { useLocation } from 'react-router-dom-v5-compat'; import { GrafanaTheme2, NavModelItem } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { config, reportInteraction } from '@grafana/runtime'; import { ScrollContainer, useStyles2 } from '@grafana/ui'; import { useGrafana } from 'app/core/context/GrafanaContext'; @@ -37,7 +37,7 @@ export const MegaMenu = memo( const state = chrome.useState(); const [patchPreferences] = usePatchUserPreferencesMutation(); const pinnedItems = usePinnedItems(); - const { t } = useTranslate(); + // Remove profile + help from tree const navItems = navTree .filter((item) => item.id !== 'profile' && item.id !== 'help') diff --git a/public/app/core/components/AppChrome/MegaMenu/MegaMenuHeader.tsx b/public/app/core/components/AppChrome/MegaMenu/MegaMenuHeader.tsx index b44c3e62745..7a5dc8d8d4f 100644 --- a/public/app/core/components/AppChrome/MegaMenu/MegaMenuHeader.tsx +++ b/public/app/core/components/AppChrome/MegaMenu/MegaMenuHeader.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { IconButton, Stack, ToolbarButton, useTheme2 } from '@grafana/ui'; import { useGrafana } from 'app/core/context/GrafanaContext'; @@ -22,7 +22,7 @@ export function MegaMenuHeader({ handleMegaMenu, handleDockedMenu, onClose }: Pr const theme = useTheme2(); const { chrome } = useGrafana(); const state = chrome.useState(); - const { t } = useTranslate(); + const styles = getStyles(theme); return ( diff --git a/public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx b/public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx index fe99a1efad8..4c8afa5671f 100644 --- a/public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx +++ b/public/app/core/components/AppChrome/MegaMenu/MegaMenuItem.tsx @@ -5,7 +5,7 @@ import { useLocation } from 'react-router-dom-v5-compat'; import { useLocalStorage } from 'react-use'; import { FeatureState, GrafanaTheme2, NavModelItem, toIconName } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { useStyles2, Text, IconButton, Icon, Stack, FeatureBadge } from '@grafana/ui'; import { useGrafana } from 'app/core/context/GrafanaContext'; @@ -58,7 +58,6 @@ export function MegaMenuItem({ link, activeItem, level = 0, onClick, onPin, isPi }); } }, [isActive]); - const { t } = useTranslate(); if (!link.url) { return null; diff --git a/public/app/core/components/AppChrome/MegaMenu/MegaMenuItemText.tsx b/public/app/core/components/AppChrome/MegaMenu/MegaMenuItemText.tsx index 1b9434aa313..b76e6006d78 100644 --- a/public/app/core/components/AppChrome/MegaMenu/MegaMenuItemText.tsx +++ b/public/app/core/components/AppChrome/MegaMenu/MegaMenuItemText.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { config } from '@grafana/runtime'; import { Icon, IconButton, Link, useTheme2 } from '@grafana/ui'; import { contextSrv } from 'app/core/services/context_srv'; @@ -20,7 +20,7 @@ export interface Props { export function MegaMenuItemText({ children, isActive, onClick, target, url, onPin, isPinned }: Props) { const theme = useTheme2(); - const { t } = useTranslate(); + const styles = getStyles(theme, isActive); const LinkComponent = !target && url.startsWith('/') ? Link : 'a'; diff --git a/public/app/core/components/AppChrome/MegaMenu/utils.ts b/public/app/core/components/AppChrome/MegaMenu/utils.ts index 55ec4af5389..9996db02879 100644 --- a/public/app/core/components/AppChrome/MegaMenu/utils.ts +++ b/public/app/core/components/AppChrome/MegaMenu/utils.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { NavModelItem } from '@grafana/data'; -import { t } from '@grafana/i18n/internal'; +import { t } from '@grafana/i18n'; import { config, reportInteraction } from '@grafana/runtime'; import { MEGA_MENU_TOGGLE_ID } from 'app/core/constants'; import { HOME_NAV_ID } from 'app/core/reducers/navModel'; diff --git a/public/app/core/components/AppChrome/News/NewsDrawer.tsx b/public/app/core/components/AppChrome/News/NewsDrawer.tsx index d582a5267b4..f2122497204 100644 --- a/public/app/core/components/AppChrome/News/NewsDrawer.tsx +++ b/public/app/core/components/AppChrome/News/NewsDrawer.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { IconButton, Drawer, useStyles2, Text } from '@grafana/ui'; import { DEFAULT_FEED_URL } from 'app/plugins/panel/news/constants'; import grotNewsSvg from 'img/grot-news.svg'; @@ -16,7 +16,7 @@ interface NewsContainerProps { export function NewsContainer({ onClose }: NewsContainerProps) { const styles = useStyles2(getStyles); - const { t } = useTranslate(); + return ( { getNews(); }, [getNews]); - const { t } = useTranslate(); if (state.error) { return
{state.error && state.error.message}
; diff --git a/public/app/core/components/AppChrome/OrganizationSwitcher/OrganizationSelect.tsx b/public/app/core/components/AppChrome/OrganizationSwitcher/OrganizationSelect.tsx index b75688a9c8c..2a33cf03123 100644 --- a/public/app/core/components/AppChrome/OrganizationSwitcher/OrganizationSelect.tsx +++ b/public/app/core/components/AppChrome/OrganizationSwitcher/OrganizationSelect.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import { useMemo, useState } from 'react'; import { SelectableValue, GrafanaTheme2 } from '@grafana/data'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { Icon, Select, useStyles2 } from '@grafana/ui'; import { contextSrv } from 'app/core/services/context_srv'; import { UserOrg } from 'app/types'; @@ -11,7 +11,7 @@ import { OrganizationBaseProps } from './types'; export function OrganizationSelect({ orgs, onSelectChange }: OrganizationBaseProps) { const styles = useStyles2(getStyles); - const { t } = useTranslate(); + const { orgId } = contextSrv.user; const options = useMemo( diff --git a/public/app/core/components/AppChrome/QuickAdd/QuickAdd.tsx b/public/app/core/components/AppChrome/QuickAdd/QuickAdd.tsx index 74b8749144a..a528a0c8341 100644 --- a/public/app/core/components/AppChrome/QuickAdd/QuickAdd.tsx +++ b/public/app/core/components/AppChrome/QuickAdd/QuickAdd.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from 'react'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { reportInteraction } from '@grafana/runtime'; import { Menu, Dropdown, ToolbarButton } from '@grafana/ui'; import { getExternalUserMngLinkUrl } from 'app/features/users/utils'; @@ -16,7 +16,7 @@ export interface Props {} export const QuickAdd = ({}: Props) => { const navBarTree = useSelector((state) => state.navBarTree); const [isOpen, setIsOpen] = useState(false); - const { t } = useTranslate(); + const createActions = useMemo(() => { const actions = findCreateActions(navBarTree); @@ -33,7 +33,7 @@ export const QuickAdd = ({}: Props) => { } return actions; - }, [navBarTree, t]); + }, [navBarTree]); const showQuickAdd = createActions.length > 0; if (!showQuickAdd) { diff --git a/public/app/core/components/AppChrome/ReturnToPrevious/DismissableButton.tsx b/public/app/core/components/AppChrome/ReturnToPrevious/DismissableButton.tsx index b618f69c291..ad417de2745 100644 --- a/public/app/core/components/AppChrome/ReturnToPrevious/DismissableButton.tsx +++ b/public/app/core/components/AppChrome/ReturnToPrevious/DismissableButton.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; -import { useTranslate } from '@grafana/i18n'; +import { t } from '@grafana/i18n'; import { Button, ButtonGroup, useStyles2 } from '@grafana/ui'; export interface DismissableButtonProps { @@ -13,7 +13,7 @@ export interface DismissableButtonProps { export const DismissableButton = ({ label, onClick, onDismiss }: DismissableButtonProps) => { const styles = useStyles2(getStyles); - const { t } = useTranslate(); + return (