|
@@ -21,7 +21,7 @@ import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
|
|
|
import {IconEdit} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import space from 'sentry/styles/space';
|
|
|
-import {DateString, Organization, Project} from 'sentry/types';
|
|
|
+import {DateString, Member, Organization, Project} from 'sentry/types';
|
|
|
import {IssueAlertRule} from 'sentry/types/alerts';
|
|
|
import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
|
|
|
import {ALERT_DEFAULT_CHART_PERIOD} from 'sentry/views/alerts/rules/metric/details/constants';
|
|
@@ -36,6 +36,7 @@ type Props = AsyncComponent['props'] & {
|
|
|
} & RouteComponentProps<{orgId: string; projectId: string; ruleId: string}, {}>;
|
|
|
|
|
|
type State = AsyncComponent['state'] & {
|
|
|
+ memberList: Member[];
|
|
|
rule: IssueAlertRule | null;
|
|
|
};
|
|
|
|
|
@@ -75,6 +76,7 @@ class AlertRuleDetails extends AsyncComponent<Props, State> {
|
|
|
return {
|
|
|
...super.getDefaultState(),
|
|
|
rule: null,
|
|
|
+ memberList: [],
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -86,6 +88,11 @@ class AlertRuleDetails extends AsyncComponent<Props, State> {
|
|
|
`/projects/${orgId}/${projectId}/rules/${ruleId}/`,
|
|
|
{query: {expand: 'lastTriggered'}},
|
|
|
],
|
|
|
+ [
|
|
|
+ 'memberList',
|
|
|
+ `/organizations/${orgId}/users/`,
|
|
|
+ {query: {project: this.props.project.id}},
|
|
|
+ ],
|
|
|
];
|
|
|
}
|
|
|
|
|
@@ -186,7 +193,7 @@ class AlertRuleDetails extends AsyncComponent<Props, State> {
|
|
|
const {orgId, ruleId, projectId} = params;
|
|
|
const {cursor} = location.query;
|
|
|
const {period, start, end, utc} = this.getDataDatetime();
|
|
|
- const {rule} = this.state;
|
|
|
+ const {rule, memberList} = this.state;
|
|
|
|
|
|
if (!rule) {
|
|
|
return <LoadingError message={t('There was an error loading the alert rule.')} />;
|
|
@@ -291,7 +298,7 @@ class AlertRuleDetails extends AsyncComponent<Props, State> {
|
|
|
/>
|
|
|
</Layout.Main>
|
|
|
<Layout.Side>
|
|
|
- <Sidebar rule={rule} />
|
|
|
+ <Sidebar rule={rule} memberList={memberList} teams={project.teams} />
|
|
|
</Layout.Side>
|
|
|
</Layout.Body>
|
|
|
</PageFiltersContainer>
|