Alerting: Remove incorrect usage of "title" for alerting page wrapper (#108180)

This commit is contained in:
Gilles De Mey
2025-07-30 10:10:10 +00:00
committed by GitHub
parent d14e794aa4
commit 07a561d24e
4 changed files with 9 additions and 17 deletions
@@ -11,8 +11,11 @@ import { NoAlertManagerWarning } from './NoAlertManagerWarning';
/**
* This is the main alerting page wrapper, used by the alertmanager page wrapper and the alert rules list view
*
* NOTE: we're omitting "title" here because it's not actually rendering the title (it's the html attribute "title").
* Use "renderTitle" instead for custom page titles.
*/
type AlertingPageWrapperProps = Omit<PageProps, 'children'> & {
type AlertingPageWrapperProps = Omit<PageProps, 'children' | 'title'> & {
isLoading?: boolean;
children?: ReactNode;
};
@@ -99,7 +99,7 @@ function GroupEditPage() {
if (!!dsFeatures && !dsFeatures.rulerConfig) {
return (
<AlertingPageWrapper pageNav={pageNav} title={groupName} navId="alert-list" isLoading={isLoadingGroup}>
<AlertingPageWrapper pageNav={pageNav} navId="alert-list" isLoading={isLoadingGroup}>
<Alert title={t('alerting.group-edit.group-not-editable', 'Selected group cannot be edited')}>
<Trans i18nKey="alerting.group-edit.group-not-editable-description">
This group belongs to a data source that does not support editing.
@@ -124,12 +124,7 @@ function GroupEditPage() {
};
return (
<AlertingPageWrapper
pageNav={pageNav}
title={t('alerting.group-edit.title', 'Edit evaluation group')}
navId="alert-list"
isLoading={isLoadingGroup}
>
<AlertingPageWrapper pageNav={pageNav} navId="alert-list" isLoading={isLoadingGroup}>
<>
{Boolean(dsFeaturesError) && (
<Alert
@@ -20,11 +20,7 @@ function Home() {
const insightsScene = getInsightsScenes();
return (
<AlertingPageWrapper
title={t('alerting.home.title-alerting', 'Alerting')}
subTitle="Learn about problems in your systems moments after they occur"
navId="alerting"
>
<AlertingPageWrapper subTitle="Learn about problems in your systems moments after they occur" navId="alerting">
<Stack gap={2} direction="column">
<WelcomeHeader />
<PluginIntegrations />
+2 -4
View File
@@ -1548,8 +1548,7 @@
"group-not-editable": "Selected group cannot be edited",
"group-not-editable-description": "This group belongs to a data source that does not support editing.",
"page-title": "Edit rule group",
"rule-group-error": "Error loading rule group",
"title": "Edit evaluation group"
"rule-group-error": "Error loading rule group"
},
"group-loader": {
"group-load-failed": "Failed to load rules from group {{ groupName }} in {{ namespaceName }}",
@@ -1583,8 +1582,7 @@
"synthetic-monitoring-card-item-2": "Run ping, DNS, HTTP/S, and TCP checks at every network layer.",
"synthetic-monitoring-card-item-3": "Use 20+ global probes or private probes behind your firewall.",
"synthetic-monitoring-card-item-4": "Track SLOs with built-in Prometheus-style alerts — right from the UI.",
"synthetic-monitoring-card-title": "Synthetic Monitoring",
"title-alerting": "Alerting"
"synthetic-monitoring-card-title": "Synthetic Monitoring"
},
"import-to-gma": {
"action-button": "Import",