|
@@ -5,6 +5,7 @@ import Alert from 'sentry/components/alert';
|
|
import {t} from 'sentry/locale';
|
|
import {t} from 'sentry/locale';
|
|
import {Organization, Project} from 'sentry/types';
|
|
import {Organization, Project} from 'sentry/types';
|
|
import {metric} from 'sentry/utils/analytics';
|
|
import {metric} from 'sentry/utils/analytics';
|
|
|
|
+import routeTitleGen from 'sentry/utils/routeTitle';
|
|
import RuleForm from 'sentry/views/alerts/incidentRules/ruleForm';
|
|
import RuleForm from 'sentry/views/alerts/incidentRules/ruleForm';
|
|
import {IncidentRule} from 'sentry/views/alerts/incidentRules/types';
|
|
import {IncidentRule} from 'sentry/views/alerts/incidentRules/types';
|
|
import AsyncView from 'sentry/views/asyncView';
|
|
import AsyncView from 'sentry/views/asyncView';
|
|
@@ -35,6 +36,19 @@ class IncidentRulesDetails extends AsyncView<Props, State> {
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ getTitle(): string {
|
|
|
|
+ const {organization, project} = this.props;
|
|
|
|
+ const {rule} = this.state;
|
|
|
|
+ const ruleName = rule?.name;
|
|
|
|
+
|
|
|
|
+ return routeTitleGen(
|
|
|
|
+ ruleName ? t('Alert %s', ruleName) : '',
|
|
|
|
+ organization.slug,
|
|
|
|
+ false,
|
|
|
|
+ project?.slug
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
|
|
getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
|
|
const {orgId, ruleId} = this.props.params;
|
|
const {orgId, ruleId} = this.props.params;
|
|
|
|
|