Skip to content

Commit

Permalink
Get rid of populated fields check
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Aug 8, 2023
1 parent ff3e49b commit 045a50d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ export const FieldStatsFlyoutProvider: FC<{
fieldStatsServices: FieldStatsServices;
timeRangeMs?: TimeRangeMs;
dslQuery?: FieldStatsProps['dslQuery'];
}> = ({ dataView, fieldStatsServices, timeRangeMs, dslQuery, children }) => {
disablePopulatedFields?: boolean;
}> = ({
dataView,
fieldStatsServices,
timeRangeMs,
dslQuery,
disablePopulatedFields = false,
children,
}) => {
const {
services: {
data: { search },
Expand All @@ -43,6 +51,7 @@ export const FieldStatsFlyoutProvider: FC<{
const [populatedFields$] = useState(new BehaviorSubject<Set<string>>(new Set()));

useEffect(() => {
if (disablePopulatedFields) return;
const abortController = new AbortController();

const queryAndRunTimeMappings = getMergedSampleDocsForPopulatedFieldsQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const AnalysisFieldsTable: FC<{
itemsPerPage: number;
}>({ pageIndex: 0, itemsPerPage: 5 });

const { handleFieldStatsButtonClick, populatedFields } = useFieldStatsTrigger();
const { handleFieldStatsButtonClick } = useFieldStatsTrigger();

const columns = [
{
Expand Down Expand Up @@ -88,7 +88,6 @@ export const AnalysisFieldsTable: FC<{
return (
<>
<FieldStatsInfoButton
isEmpty={!populatedFields?.has(name)}
field={field}
label={name}
onButtonClick={handleFieldStatsButtonClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ export const ConfigurationStepForm: FC<ConfigurationStepProps> = ({
fieldStatsServices={fieldStatsServices}
timeRangeMs={indexData.timeRangeMs}
dslQuery={jobConfigQuery}
// DFA wizard already filters out to populated fields
disablePopulatedFields={true}
>
<Fragment>
<Messages messages={requestMessages} />
Expand Down

0 comments on commit 045a50d

Please sign in to comment.