|
@@ -1,14 +1,22 @@
|
|
|
import {useCallback, useEffect, useRef} from 'react';
|
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
+import Feature from 'sentry/components/acl/feature';
|
|
|
import Button from 'sentry/components/button';
|
|
|
+import ButtonBar from 'sentry/components/buttonBar';
|
|
|
+import DatePageFilter from 'sentry/components/datePageFilter';
|
|
|
+import EnvironmentPageFilter from 'sentry/components/environmentPageFilter';
|
|
|
import Input from 'sentry/components/forms/controls/input';
|
|
|
import Field from 'sentry/components/forms/field';
|
|
|
+import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
|
|
|
+import ProjectPageFilter from 'sentry/components/projectPageFilter';
|
|
|
import {IconAdd, IconDelete} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import space from 'sentry/styles/space';
|
|
|
import {Organization, PageFilters} from 'sentry/types';
|
|
|
+import {ReleasesProvider} from 'sentry/utils/releases/releasesProvider';
|
|
|
import {getDatasetConfig} from 'sentry/views/dashboardsV2/datasetConfig/base';
|
|
|
+import ReleasesSelectControl from 'sentry/views/dashboardsV2/releasesSelectControl';
|
|
|
import {WidgetQuery, WidgetType} from 'sentry/views/dashboardsV2/types';
|
|
|
|
|
|
import {BuildStep} from '../buildStep';
|
|
@@ -100,6 +108,18 @@ export function FilterResultsStep({
|
|
|
: t('This is how you filter down your search.')
|
|
|
}
|
|
|
>
|
|
|
+ <Feature features={['dashboards-top-level-filter']}>
|
|
|
+ <StyledPageFilterBar>
|
|
|
+ <ProjectPageFilter disabled />
|
|
|
+ <EnvironmentPageFilter disabled />
|
|
|
+ <DatePageFilter alignDropdown="left" disabled />
|
|
|
+ </StyledPageFilterBar>
|
|
|
+ <FilterButtons>
|
|
|
+ <ReleasesProvider organization={organization} selection={selection}>
|
|
|
+ <StyledReleasesSelectControl isDisabled className="widget-release-select" />
|
|
|
+ </ReleasesProvider>
|
|
|
+ </FilterButtons>
|
|
|
+ </Feature>
|
|
|
<div>
|
|
|
{queries.map((query, queryIndex) => {
|
|
|
return (
|
|
@@ -165,6 +185,26 @@ const QueryField = styled(Field)`
|
|
|
padding-bottom: ${space(1)};
|
|
|
`;
|
|
|
|
|
|
+const StyledPageFilterBar = styled(PageFilterBar)`
|
|
|
+ margin-bottom: ${space(1)};
|
|
|
+ margin-right: ${space(2)};
|
|
|
+`;
|
|
|
+
|
|
|
+const FilterButtons = styled(ButtonBar)`
|
|
|
+ grid-template-columns: 1fr;
|
|
|
+
|
|
|
+ margin-bottom: ${space(1)};
|
|
|
+ margin-right: ${space(2)};
|
|
|
+
|
|
|
+ justify-content: space-between;
|
|
|
+`;
|
|
|
+
|
|
|
+const StyledReleasesSelectControl = styled(ReleasesSelectControl)`
|
|
|
+ button {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+`;
|
|
|
+
|
|
|
const SearchConditionsWrapper = styled('div')`
|
|
|
display: flex;
|
|
|
align-items: center;
|