Skip to content

Commit 14b6415

Browse files
authored
Revert "ref(hybrid-cloud): use monitor urls with org slug frontend" (#42820)
1 parent d968493 commit 14b6415

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

static/app/views/monitors/details.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ class MonitorDetails extends AsyncView<Props, State> {
3535

3636
getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
3737
const {params, location} = this.props;
38-
return [
39-
[
40-
'monitor',
41-
`/monitors/${this.orgSlug}/${params.monitorId}/`,
42-
{query: location.query},
43-
],
44-
];
38+
return [['monitor', `/monitors/${params.monitorId}/`, {query: location.query}]];
4539
}
4640

4741
getTitle() {
@@ -74,14 +68,14 @@ class MonitorDetails extends AsyncView<Props, State> {
7468
<DatePageFilter alignDropdown="left" />
7569
</StyledPageFilterBar>
7670

77-
<MonitorStats monitor={monitor} orgId={this.orgSlug} />
71+
<MonitorStats monitor={monitor} />
7872

7973
<MonitorIssues monitor={monitor} orgId={this.orgSlug} />
8074

8175
<Panel>
8276
<PanelHeader>{t('Recent Check-ins')}</PanelHeader>
8377

84-
<MonitorCheckIns monitor={monitor} orgId={this.orgSlug} />
78+
<MonitorCheckIns monitor={monitor} />
8579
</Panel>
8680
</Fragment>
8781
)}

static/app/views/monitors/monitorCheckIns.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@ type CheckIn = {
2121

2222
type Props = {
2323
monitor: Monitor;
24-
orgId: string;
2524
};
2625

2726
type State = {
2827
checkInList: CheckIn[];
2928
};
3029

31-
const MonitorCheckIns = ({monitor, orgId}: Props) => {
30+
const MonitorCheckIns = ({monitor}: Props) => {
3231
const {data, hasError, renderComponent} = useApiRequests<State>({
3332
endpoints: [
34-
[
35-
'checkInList',
36-
`/monitors/${orgId}/${monitor.id}/checkins/`,
37-
{query: {per_page: '10'}},
38-
],
33+
['checkInList', `/monitors/${monitor.id}/checkins/`, {query: {per_page: '10'}}],
3934
],
4035
});
4136

static/app/views/monitors/monitorStats.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ import {Monitor, MonitorStat} from './types';
1717

1818
type Props = {
1919
monitor: Monitor;
20-
orgId: string;
2120
};
2221

2322
type State = {
2423
stats: MonitorStat[] | null;
2524
};
2625

27-
const MonitorStats = ({monitor, orgId}: Props) => {
26+
const MonitorStats = ({monitor}: Props) => {
2827
const {selection} = usePageFilters();
2928
const {start, end, period} = selection.datetime;
3029

@@ -42,7 +41,7 @@ const MonitorStats = ({monitor, orgId}: Props) => {
4241
endpoints: [
4342
[
4443
'stats',
45-
`/monitors/${orgId}/${monitor.id}/stats/`,
44+
`/monitors/${monitor.id}/stats/`,
4645
{
4746
query: {
4847
since: since.toString(),

0 commit comments

Comments
 (0)