From 9d5a63b55e46a1d2eeed8955b7ecdcad2b49e753 Mon Sep 17 00:00:00 2001 From: Cathy Teng <70817427+cathyteng17@users.noreply.github.com> Date: Thu, 5 Jan 2023 10:04:36 -0800 Subject: [PATCH] Revert "ref(hybrid-cloud): use monitor urls with org slug frontend (#42728)" This reverts commit 04db1541946160beda445008a5ebab3210d802dc. --- static/app/views/monitors/details.tsx | 12 +++--------- static/app/views/monitors/monitorCheckIns.tsx | 9 ++------- static/app/views/monitors/monitorStats.tsx | 5 ++--- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/static/app/views/monitors/details.tsx b/static/app/views/monitors/details.tsx index 197f4f4d7b406d..bfd0e0f1a1a2c6 100644 --- a/static/app/views/monitors/details.tsx +++ b/static/app/views/monitors/details.tsx @@ -35,13 +35,7 @@ class MonitorDetails extends AsyncView { getEndpoints(): ReturnType { const {params, location} = this.props; - return [ - [ - 'monitor', - `/monitors/${this.orgSlug}/${params.monitorId}/`, - {query: location.query}, - ], - ]; + return [['monitor', `/monitors/${params.monitorId}/`, {query: location.query}]]; } getTitle() { @@ -74,14 +68,14 @@ class MonitorDetails extends AsyncView { - + {t('Recent Check-ins')} - + )} diff --git a/static/app/views/monitors/monitorCheckIns.tsx b/static/app/views/monitors/monitorCheckIns.tsx index 0d34bc66796ad7..b2f9a62637b5ba 100644 --- a/static/app/views/monitors/monitorCheckIns.tsx +++ b/static/app/views/monitors/monitorCheckIns.tsx @@ -21,21 +21,16 @@ type CheckIn = { type Props = { monitor: Monitor; - orgId: string; }; type State = { checkInList: CheckIn[]; }; -const MonitorCheckIns = ({monitor, orgId}: Props) => { +const MonitorCheckIns = ({monitor}: Props) => { const {data, hasError, renderComponent} = useApiRequests({ endpoints: [ - [ - 'checkInList', - `/monitors/${orgId}/${monitor.id}/checkins/`, - {query: {per_page: '10'}}, - ], + ['checkInList', `/monitors/${monitor.id}/checkins/`, {query: {per_page: '10'}}], ], }); diff --git a/static/app/views/monitors/monitorStats.tsx b/static/app/views/monitors/monitorStats.tsx index a26d11a5ec6ab8..17977ce62afa30 100644 --- a/static/app/views/monitors/monitorStats.tsx +++ b/static/app/views/monitors/monitorStats.tsx @@ -17,14 +17,13 @@ import {Monitor, MonitorStat} from './types'; type Props = { monitor: Monitor; - orgId: string; }; type State = { stats: MonitorStat[] | null; }; -const MonitorStats = ({monitor, orgId}: Props) => { +const MonitorStats = ({monitor}: Props) => { const {selection} = usePageFilters(); const {start, end, period} = selection.datetime; @@ -42,7 +41,7 @@ const MonitorStats = ({monitor, orgId}: Props) => { endpoints: [ [ 'stats', - `/monitors/${orgId}/${monitor.id}/stats/`, + `/monitors/${monitor.id}/stats/`, { query: { since: since.toString(),