diff --git a/pkg/services/navtree/navtreeimpl/navtree.go b/pkg/services/navtree/navtreeimpl/navtree.go index 39ed0d2a245..ba763ae065b 100644 --- a/pkg/services/navtree/navtreeimpl/navtree.go +++ b/pkg/services/navtree/navtreeimpl/navtree.go @@ -436,8 +436,8 @@ func (s *ServiceImpl) buildAlertNavLinks(c *contextmodel.ReqContext) *navtree.Na hasAccess := ac.HasAccess(s.accessControl, c) var alertChildNavs []*navtree.NavLink - //nolint:staticcheck // not yet migrated to OpenFeature var alertActivityChildren []*navtree.NavLink + //nolint:staticcheck // not yet migrated to OpenFeature if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagAlertingTriage) { if hasAccess(ac.EvalAny(ac.EvalPermission(ac.ActionAlertingRuleRead), ac.EvalPermission(ac.ActionAlertingRuleExternalRead))) { alertActivityChildren = append(alertActivityChildren, &navtree.NavLink{ diff --git a/public/app/features/alerting/unified/NotificationPoliciesPage.test.tsx b/public/app/features/alerting/unified/NotificationPoliciesPage.test.tsx index dc948d1a6ff..f894fae0a46 100644 --- a/public/app/features/alerting/unified/NotificationPoliciesPage.test.tsx +++ b/public/app/features/alerting/unified/NotificationPoliciesPage.test.tsx @@ -1,6 +1,6 @@ import { produce } from 'immer'; import { clickSelectOption } from 'test/helpers/selectOptionInTest'; -import { render, screen, testWithFeatureToggles, userEvent, within } from 'test/test-utils'; +import { render, screen, userEvent, within } from 'test/test-utils'; import { byLabelText, byRole, byTestId } from 'testing-library-selector'; import { AppNotificationList } from 'app/core/components/AppNotifications/AppNotificationList'; diff --git a/public/app/features/alerting/unified/components/contact-points/ContactPoints.test.tsx b/public/app/features/alerting/unified/components/contact-points/ContactPoints.test.tsx index 5cdac0c6169..a624a00a83d 100644 --- a/public/app/features/alerting/unified/components/contact-points/ContactPoints.test.tsx +++ b/public/app/features/alerting/unified/components/contact-points/ContactPoints.test.tsx @@ -1,14 +1,6 @@ import { MemoryHistoryBuildOptions } from 'history'; import { ComponentProps, ReactNode } from 'react'; -import { - render, - screen, - testWithFeatureToggles, - userEvent, - waitFor, - waitForElementToBeRemoved, - within, -} from 'test/test-utils'; +import { render, screen, userEvent, waitFor, waitForElementToBeRemoved, within } from 'test/test-utils'; import { selectors } from '@grafana/e2e-selectors'; import { MIMIR_DATASOURCE_UID } from 'app/features/alerting/unified/mocks/server/constants'; diff --git a/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx b/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx index fe0fadd9344..1242604de7a 100644 --- a/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx +++ b/public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx @@ -7,6 +7,7 @@ import { AccessControlAction } from 'app/types/accessControl'; import { AlertmanagerAction, useAlertmanagerAbility } from '../../hooks/useAbilities'; import { usePagination } from '../../hooks/usePagination'; +import { useURLSearchParams } from '../../hooks/useURLSearchParams'; import { useNotificationConfigNav } from '../../navigation/useNotificationConfigNav'; import { useAlertmanager } from '../../state/AlertmanagerContext'; import { isExtraConfig } from '../../utils/alertmanager/extraConfigs'; @@ -23,6 +24,11 @@ import { useContactPointsSearch } from './useContactPointsSearch'; import { ALL_CONTACT_POINTS, useExportContactPoint } from './useExportContactPoint'; import { ContactPointWithMetadata } from './utils'; +export enum ActiveTab { + ContactPoints = 'contact_points', + NotificationTemplates = 'templates', +} + const DEFAULT_PAGE_SIZE = 10; const ContactPointsTab = () => { diff --git a/public/app/features/alerting/unified/navigation/useAlertRulesNav.test.tsx b/public/app/features/alerting/unified/navigation/useAlertRulesNav.test.tsx index f5dd670d161..01695fae27c 100644 --- a/public/app/features/alerting/unified/navigation/useAlertRulesNav.test.tsx +++ b/public/app/features/alerting/unified/navigation/useAlertRulesNav.test.tsx @@ -11,7 +11,7 @@ describe('useAlertRulesNav', () => { id: 'alert-rules', text: 'Alert rules', url: '/alerting/list', - icon: 'list-ul', + icon: 'list-ul' as const, }, 'alert-rules-list': { id: 'alert-rules-list', diff --git a/public/app/features/alerting/unified/triage/Triage.tsx b/public/app/features/alerting/unified/triage/Triage.tsx index dea96b7d3d8..f2d635f1850 100644 --- a/public/app/features/alerting/unified/triage/Triage.tsx +++ b/public/app/features/alerting/unified/triage/Triage.tsx @@ -1,4 +1,3 @@ -import { t } from '@grafana/i18n'; import { UrlSyncContextProvider } from '@grafana/scenes'; import { withErrorBoundary } from '@grafana/ui'; diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 9c8f04c6868..400de1c3461 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -938,10 +938,6 @@ "label-search-by-name-or-type": "Search by name or type", "placeholder-search": "Search" }, - "contact-points-page-contents": { - "label-contact-points": "Contact Points", - "label-notification-templates": "Notification Templates" - }, "contact-points-tab": { "aria-label-add-contact-point": "add contact point", "aria-label-export-all": "export all", @@ -1645,7 +1641,9 @@ "insights": { "monitor-status-of-system": "Monitor the status of your system", "monitor-status-system-tooltip": "Alerting insights provides pre-built dashboards to monitor your alerting data.", - "monitor-status-system-tooltip-identify": "You can identify patterns in why things go wrong and discover trends in alerting performance within your organization." + "monitor-status-system-tooltip-identify": "You can identify patterns in why things go wrong and discover trends in alerting performance within your organization.", + "not-available": "Insights are not available. Please configure the required data sources.", + "subtitle": "Analytics and history for alerting" }, "insights-menu-button-renderer": { "aria-label-rate-this-panel": "Rate this panel", @@ -1928,6 +1926,18 @@ "select-group": "Select group", "select-namespace": "Select namespace" }, + "navigation": { + "active-notifications": "Active notifications", + "alert-rules": "Alert rules", + "alert-state-history": "Alert state history", + "alerts": "Alerts", + "contact-points": "Contact points", + "notification-policies": "Notification policies", + "notification-templates": "Notification templates", + "recently-deleted": "Recently deleted", + "system-insights": "System Insights", + "time-intervals": "Time intervals" + }, "need-help-info": { "need-help": "Need help?" }, @@ -1976,10 +1986,6 @@ "title-error-loading-alertmanager-config": "Error loading Alertmanager config", "title-notification-policies-have-changed": "Notification policies have changed" }, - "notification-policies-tabs": { - "label-notification-policies": "Notification Policies", - "label-time-intervals": "Time intervals" - }, "notification-policy-drawer": { "view-notification-policy-tree": "View notification policy tree" }, @@ -2045,12 +2051,6 @@ "body-selected-alertmanager-not-found": "The selected Alertmanager no longer exists or you may not have permission to access it. You can select a different Alertmanager from the dropdown.", "title-selected-alertmanager-not-found": "Selected Alertmanager not found." }, - "pages": { - "triage": { - "subtitle": "See what is currently alerting and explore historical data to investigate current or past issues.", - "title": "Alerts" - } - }, "panel-alert-tab-content": { "alert": { "title-errors-loading-rules": "Errors loading rules"