|
@@ -6,9 +6,12 @@ import moment from 'moment';
|
|
|
|
|
|
import {CompactSelect} from 'sentry/components/compactSelect';
|
|
|
import DatePageFilter from 'sentry/components/datePageFilter';
|
|
|
+import {normalizeDateTimeParams} from 'sentry/components/organizations/pageFilters/parse';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import {space} from 'sentry/styles/space';
|
|
|
import {Series} from 'sentry/types/echarts';
|
|
|
+import {useApiQuery} from 'sentry/utils/queryClient';
|
|
|
+import useOrganization from 'sentry/utils/useOrganization';
|
|
|
import usePageFilters from 'sentry/utils/usePageFilters';
|
|
|
import Chart from 'sentry/views/starfish/components/chart';
|
|
|
import ChartPanel from 'sentry/views/starfish/components/chartPanel';
|
|
@@ -59,6 +62,7 @@ export default function APIModuleView({location, onSelect}: Props) {
|
|
|
transaction: '',
|
|
|
});
|
|
|
const endpointTableRef = useRef<HTMLInputElement>(null);
|
|
|
+ const organization = useOrganization();
|
|
|
|
|
|
const endpointsDomainEventView = getEndpointDomainsEventView({
|
|
|
datetime: pageFilter.selection.datetime,
|
|
@@ -67,6 +71,27 @@ export default function APIModuleView({location, onSelect}: Props) {
|
|
|
datetime: pageFilter.selection.datetime,
|
|
|
});
|
|
|
|
|
|
+ const {selection} = pageFilter;
|
|
|
+ const {projects, environments, datetime} = selection;
|
|
|
+
|
|
|
+ useApiQuery<null>(
|
|
|
+ [
|
|
|
+ `/organizations/${organization.slug}/events-starfish/`,
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ ...{
|
|
|
+ environment: environments,
|
|
|
+ project: projects.map(proj => String(proj)),
|
|
|
+ },
|
|
|
+ ...normalizeDateTimeParams(datetime),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ {
|
|
|
+ staleTime: 10,
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
const {isLoading: _isDomainsLoading, data: domains} = useSpansQuery({
|
|
|
eventView: endpointsDomainEventView,
|
|
|
queryString: endpointsDomainQuery,
|