Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix filters #621

Merged
merged 98 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
286e1f8
chore: move src to a new location
anrusina Apr 24, 2022
0efd1df
ci: allow branch to be built again
anrusina Apr 24, 2022
b49fed5
chore: replace link to github repository to a proper one
anrusina Apr 25, 2022
9503a4c
ci: basic test and test-coverage setup
anrusina Apr 25, 2022
3091c4b
chore: add first plugin package
anrusina Apr 25, 2022
3573659
chore: allow to start test from main directory
anrusina Apr 25, 2022
8d1fef9
ci: update lowest mkdirp version (#423)
anrusina Apr 25, 2022
48a1c92
chore: add build scripts for console app (#429)
ursucarina Apr 26, 2022
caaf5c2
fix: hide the legend (#435)
eugenejahn Apr 28, 2022
133038a
ci: move storybook related packages to top level (#434)
anrusina Apr 28, 2022
1651a6f
fix: fix issue 386 (#437)
eugenejahn Apr 28, 2022
eeb551b
ci: ensure unified tsconfig and remove mocks, test, stories from buil…
anrusina Apr 28, 2022
b6e9941
Make whole row clickable to open TaskExecutionDetails panel (#444)
eugenejahn May 2, 2022
b513280
ci: allow to start jest config for all project at once (#447)
anrusina May 3, 2022
ecfdd4c
minor: unable to view all the workflow versions (#446)
ursucarina May 4, 2022
5b44539
chore(tsc): exclude test/stories/mock files only from build (#451)
anrusina May 5, 2022
560b645
ci: ensure that webpack too doesn't include test/mock/specs files (#452)
anrusina May 6, 2022
5e2bcbc
minor: add support for StructuredDataSet Input/Output type (#445)
ursucarina May 6, 2022
86d5636
chore: Provide basic repo structure and ensure that stories, tests, v…
anrusina May 11, 2022
acf3cb9
ci: minimize babel presence (#457)
anrusina May 11, 2022
38a4e96
fix: update node executions to display map tasks (#455)
olga-union May 13, 2022
c2ee154
ci: resolve docker build issues (#462)
anrusina May 13, 2022
e84a3c0
Chore: Rebase devmain on top of master (#464)
anrusina May 13, 2022
0853680
fix: ensure that admin version is fully shown (#465)
anrusina May 14, 2022
093210b
chore: fix for console not respecting admin url (#468)
ursucarina May 17, 2022
1859cf5
chore: rebase on top of master
anrusina May 17, 2022
42d2632
fix: trigger release #patch (#477)
anrusina May 18, 2022
324b4f5
feat: add task version info (#485)
apTalya May 19, 2022
821299e
chore: update Readme with python note + package version update (#486)
apTalya May 19, 2022
c25daea
hotfix ci pipeline (#487)
yindia May 20, 2022
747b100
[Mapping][TaskInfo] V.2 - Update Task details to allow check informat…
olga-union May 18, 2022
b70d14b
fix: add eventVersion check for map tasks (#484)
olga-union May 19, 2022
7f6305f
fix: resolve minimist package to v1.2.6 (#492)
anrusina May 19, 2022
144349c
ci: add flyte-api plugin package (#490)
anrusina May 19, 2022
64b2793
fix: update/add graph related stories (#493)
olga-union May 23, 2022
7ea0c9f
fix: separate api auth to plugin folder (#495)
anrusina May 25, 2022
4a23f4e
feat: rerun task action in execution page (#488)
eugenejahn May 26, 2022
aaca9db
chore: update release version (#501)
anrusina Jun 2, 2022
d407301
chore(deps-dev): bump protobufjs from 6.8.9 to 6.11.3 (#502)
dependabot[bot] Jun 3, 2022
606e37e
chore: add package generator for basics/composites/plugins (#503)
anrusina Jun 6, 2022
1a0dc0f
fix(bug-508): executions can not be filtered by start time (#509)
anrusina Jun 9, 2022
1013deb
chore(deps-dev): bump semantic-release from 17.2.3 to 19.0.3 (#510)
dependabot[bot] Jun 10, 2022
32686cc
feat: support flyte decks (#504)
james-union Jun 13, 2022
1386b40
feat: navbar navigation dropdown (#511)
anrusina Jun 16, 2022
7606fdf
chore: support internal/external navigsation better (#513)
anrusina Jun 17, 2022
075a1f9
Update Contributing.md (#515)
anrusina Jun 23, 2022
161d7ee
chore: update navigationDropdown usage (#517)
anrusina Jun 23, 2022
32b92b4
chore(deps): bump jsdom from 16.4.0 to 16.7.0 (#516)
dependabot[bot] Jun 23, 2022
c1c386c
feat: launch plans list & detail page #none; (#507)
james-union Jun 27, 2022
54c8ca1
chore: release 1.1.3 (#520)
anrusina Jun 27, 2022
e933f21
fix: cache icon fro map task (#519)
eugenejahn Jun 28, 2022
1be5572
fix: Relaunch form does not persist security context values when chan…
james-union Jun 29, 2022
4006e3b
fix: release process (#529)
yindia Jun 30, 2022
a05e295
fix: fix semantic-release config (#532)
yindia Jul 1, 2022
daf28e6
test: fix time sensitive test (#533)
anrusina Jul 1, 2022
d191445
Rename upgrade idl workflow (#534)
yindia Jul 1, 2022
506b953
fix: support mapped tasks (#494)
james-union Jul 1, 2022
59d5d2a
fix(491): remove favicon package + use favicon.svg by default (#537)
anrusina Jul 1, 2022
7e44dca
Fixed undefined task input types access in NodeExecutionActions (#538)
Jul 6, 2022
f6f8283
feat: support union type for launch plan (#540)
eugenejahn Jul 13, 2022
64440c0
fix: graph has realtime updates as execution progresses (#543)
olga-union Jul 15, 2022
168d383
fix: make sure groups used in graph aren't undefined (#545)
olga-union Jul 19, 2022
7d196cd
Hotfix docker push GHWF (#547)
yindia Jul 20, 2022
e62b43b
fix: Graph Center on initial render (#541)
james-union Jul 20, 2022
28a224e
fix: graph edge overlaps nodes (#542)
james-union Jul 20, 2022
33b1cee
fix: flyteconsole tag in ci pipeline (#550)
yindia Jul 25, 2022
16d70a9
enable docker push for console (#552)
yindia Jul 26, 2022
bcdd464
chore(deps): bump terser from 4.8.0 to 4.8.1 (#548)
dependabot[bot] Jul 26, 2022
3f2bbfb
Update Flyteidl version (#558)
flyte-bot Aug 10, 2022
1f89e2b
fix: fix searchbar X button (#564)
ursucarina Aug 16, 2022
9b10e5f
fix: update timeline view to show dynamic wf internals on first rende…
olga-union Aug 17, 2022
a4bf213
fix: webmanifest missing crossorigin attribute (#566)
ursucarina Aug 17, 2022
cdd94b7
fix: console showing subworkflows as unknown (#570)
olga-union Aug 19, 2022
b6e1e40
fix: Dict value loses 1 trailing character on UI Launch. (#561)
james-union Aug 22, 2022
9c2632a
fix: launchform validation (#557)
james-union Aug 25, 2022
a3bbeb0
fix: integrate timeline and graph tabs wrappers under one component (…
olga-union Aug 31, 2022
e453bfe
chore(deps-dev): bump moment from 2.29.3 to 2.29.4 (#549)
dependabot[bot] Aug 31, 2022
dc1c73f
added none type in union type (#577)
eugenejahn Sep 6, 2022
7e3c6db
fix: correctly coerce `defaultValue` when rendering LaunchPlan detail…
rahul-theorem Sep 6, 2022
f027c43
#minor: inputHelpers InputProps (#579)
ursucarina Sep 7, 2022
afd85bf
fix: fix test of launchform (#581)
james-union Sep 7, 2022
250ab96
Pruning some unused packages (#583)
jsonporter Sep 8, 2022
ce59d55
feat: minor change (#584)
jsonporter Sep 9, 2022
786bced
fix: floor seconds to int in the edge case moment returns it as float…
olga-union Sep 9, 2022
9a1ae4c
Update Flyteidl version (#575)
flyte-bot Sep 12, 2022
a5cad5d
fix: add BASE_URL to dev startup, open deeply nested urls (#589)
ursucarina Sep 13, 2022
6fa1cc1
fix: add default disabled state for only mine filter (#585)
olga-union Sep 14, 2022
64e55be
Update Flyteidl version (#590)
flyte-bot Sep 15, 2022
b9eed42
Launch plan ref v2 (#601)
jsonporter Sep 29, 2022
d649546
fix: enable deeplinks in development (#602)
ursucarina Sep 29, 2022
b9ffd81
chore: release 1.3.5 (#605)
jsonporter Sep 30, 2022
2139738
Merge branch 'master' of https://github.com/flyteorg/flyteconsole int…
olga-union Sep 30, 2022
907363a
Merge branch 'devmain' of https://github.com/flyteorg/flyteconsole in…
olga-union Sep 30, 2022
bf7a750
Merge branch 'devmain' of https://github.com/flyteorg/flyteconsole in…
olga-union Oct 3, 2022
8d56eb9
Merge branch 'devmain' of https://github.com/flyteorg/flyteconsole in…
olga-union Oct 10, 2022
cb7cc32
Merge branch 'devmain' of https://github.com/flyteorg/flyteconsole in…
olga-union Oct 12, 2022
9ee47b3
fix: filters in node executions table view
olga-union Oct 17, 2022
43fc397
fix: effect dependency and tests
olga-union Oct 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 4 additions & 33 deletions packages/zapp/console/src/components/Entities/EntityInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { FilterOperationName } from 'models/AdminEntity/types';
import { ResourceIdentifier } from 'models/Common/types';
import { LaunchPlanClosure, LaunchPlanSpec } from 'models/Launch/types';
import * as React from 'react';
import { useMemo } from 'react';
import t from './strings';
import { transformLiterals } from '../Literals/helpers';

Expand Down Expand Up @@ -104,8 +105,8 @@ export const EntityInputs: React.FC<{
? launchPlanState.value[0].spec
: ({} as LaunchPlanSpec);

const expectedInputs = React.useMemo<Input[]>(() => {
const results = [] as Input[];
const expectedInputs = useMemo<Input[]>(() => {
const results: Input[] = [];
Object.keys(closure?.expectedInputs?.parameters ?? {}).forEach((name) => {
const parameter = closure?.expectedInputs.parameters[name];
if (parameter?.var?.type) {
Expand All @@ -121,25 +122,11 @@ export const EntityInputs: React.FC<{
return results;
}, [closure]);

const fixedInputs = React.useMemo<Input[]>(() => {
const fixedInputs = useMemo<Input[]>(() => {
const inputsMap = transformLiterals(spec?.fixedInputs?.literals ?? {});
return Object.keys(inputsMap).map((name) => ({ name, defaultValue: inputsMap[name] }));
}, [spec]);

const configs = React.useMemo(
() => [
{ name: t('configType'), value: 'single (csv)' },
{
name: t('configUrl'),
value:
'https://raw.githubusercontent.com/jbrownlee/Datasets/master/pima-indians-diabetes.data.csv',
},
{ name: t('configSeed'), value: '7' },
{ name: t('configTestSplitRatio'), value: '0.33' },
],
[],
);

return (
<>
<Typography className={styles.header} variant="h3">
Expand Down Expand Up @@ -232,22 +219,6 @@ export const EntityInputs: React.FC<{
)}
</div>
</div>
{/* <div className={styles.rowContainer}>
<div className={styles.firstColumnContainer}>
<Typography className={styles.header} variant="h4">
{t('configuration')}
</Typography>
<ul className={styles.configs}>
{configs.map(({ name, value }) => (
<li className={styles.config} key={name}>
<span className={styles.configName}><Typography variant="body">{name}:</Typography></span>
<span className={styles.configValue}><Typography variant="body">{value}</Typography></span>
</li>
))}
</ul>
</div>
<div className={styles.secondColumnContainer}></div>
</div> */}
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import { DataError } from 'components/Errors/DataError';
import { useTabState } from 'components/hooks/useTabState';
import { secondaryBackgroundColor } from 'components/Theme/constants';
import { Execution, ExternalResource, LogsByPhase, NodeExecution } from 'models/Execution/types';
import { useContext, useEffect, useMemo, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import { keyBy } from 'lodash';
import { isMapTaskV1 } from 'models/Task/utils';
import { useQueryClient } from 'react-query';
import { LargeLoadingSpinner } from 'components/common/LoadingSpinner';
import { FilterOperation } from 'models/AdminEntity/types';
import { NodeExecutionDetailsContextProvider } from '../contextProvider/NodeExecutionDetails';
import { NodeExecutionsByIdContext, NodeExecutionsRequestConfigContext } from '../contexts';
import { NodeExecutionsByIdContext } from '../contexts';
import { ExecutionFilters } from '../ExecutionFilters';
import { useNodeExecutionFiltersState } from '../filters/useExecutionFiltersState';
import { tabs } from './constants';
Expand Down Expand Up @@ -42,6 +43,13 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));

const isPhaseFilter = (appliedFilters: FilterOperation[]) => {
if (appliedFilters.length === 1 && appliedFilters[0].key === 'phase') {
return true;
}
return false;
};

interface WorkflowNodeExecution extends NodeExecution {
logsByPhase?: LogsByPhase;
}
Expand All @@ -57,7 +65,6 @@ export const ExecutionNodeViews: React.FC<ExecutionNodeViewsProps> = ({ executio
const filterState = useNodeExecutionFiltersState();
const tabState = useTabState(tabs, defaultTab);
const queryClient = useQueryClient();
const requestConfig = useContext(NodeExecutionsRequestConfigContext); // Can't find initialization of the provider
const [nodeExecutionsLoading, setNodeExecutionsLoading] = useState<boolean>(true);

const {
Expand All @@ -73,12 +80,12 @@ export const ExecutionNodeViews: React.FC<ExecutionNodeViewsProps> = ({ executio
return keyBy(nodeExecutionsWithResources, 'scopedId');
}, [nodeExecutionsWithResources]);

/* We want to maintain the filter selection when switching away from the Nodes
tab and back, but do not want to filter the nodes when viewing the graph. So,
we will only pass filters to the execution state when on the nodes tab. */
const appliedFilters = tabState.value === tabs.nodes.id ? filterState.appliedFilters : [];

const { nodeExecutionsQuery } = useExecutionNodeViewsState(execution, appliedFilters);
// query to get all data to build Graph and Timeline
const { nodeExecutionsQuery } = useExecutionNodeViewsState(execution);
// query to get filtered data to narrow down Table outputs
const {
nodeExecutionsQuery: { data: filteredNodeExecutions },
} = useExecutionNodeViewsState(execution, filterState.appliedFilters);

useEffect(() => {
let isCurrent = true;
Expand Down Expand Up @@ -131,10 +138,7 @@ export const ExecutionNodeViews: React.FC<ExecutionNodeViewsProps> = ({ executio
};
}, [nodeExecutions]);

const childGroupsQuery = useAllTreeNodeExecutionGroupsQuery(
nodeExecutionsQuery.data ?? [],
requestConfig,
);
const childGroupsQuery = useAllTreeNodeExecutionGroupsQuery(nodeExecutionsQuery.data ?? [], {});

useEffect(() => {
if (!childGroupsQuery.isLoading && childGroupsQuery.data) {
Expand All @@ -161,7 +165,13 @@ export const ExecutionNodeViews: React.FC<ExecutionNodeViewsProps> = ({ executio
loadingComponent={LoadingComponent}
>
{() => (
<ExecutionTab tabType={tabType} filteredNodeExecutions={nodeExecutionsQuery.data ?? []} />
<ExecutionTab
tabType={tabType}
// if only phase filter was applied, ignore request response, and filter out nodes via frontend filter
filteredNodeExecutions={
isPhaseFilter(filterState.appliedFilters) ? undefined : filteredNodeExecutions
}
/>
)}
</WaitForQuery>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ExecutionTabContent } from './ExecutionTabContent';

export interface ExecutionTabProps {
tabType: string;
filteredNodeExecutions: NodeExecution[];
filteredNodeExecutions?: NodeExecution[];
}

/** Contains the available ways to visualize the nodes of a WorkflowExecution */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import { checkForDynamicExecutions } from 'components/common/utils';
import { dNode } from 'models/Graph/types';
import { useContext, useEffect, useMemo, useState } from 'react';
import { useQuery } from 'react-query';
import {
FilterOperation,
FilterOperationName,
FilterOperationValueList,
} from 'models/AdminEntity/types';
import { isEqual } from 'lodash';
import { useNodeExecutionContext } from '../contextProvider/NodeExecutionDetails';
import { NodeExecutionsByIdContext } from '../contexts';
import { NodeExecutionsTable } from '../Tables/NodeExecutionsTable';
Expand All @@ -20,10 +26,12 @@ import { ExecutionTimeline } from './Timeline/ExecutionTimeline';
import { ExecutionTimelineFooter } from './Timeline/ExecutionTimelineFooter';
import { convertToPlainNodes, TimeZone } from './Timeline/helpers';
import { DetailsPanelContext } from './DetailsPanelContext';
import { useNodeExecutionFiltersState } from '../filters/useExecutionFiltersState';
import { nodeExecutionPhaseConstants } from '../constants';

export interface ExecutionTabContentProps {
tabType: string;
filteredNodeExecutions: NodeExecution[];
filteredNodeExecutions?: NodeExecution[];
}

const useStyles = makeStyles(() => ({
Expand All @@ -39,29 +47,50 @@ const useStyles = makeStyles(() => ({
},
}));

const executionMatchesPhaseFilter = (
nodeExecution: NodeExecution,
{ key, value, operation }: FilterOperation,
) => {
if (key === 'phase' && operation === FilterOperationName.VALUE_IN) {
// default to UNKNOWN phase if the field does not exist on a closure
const itemValue =
nodeExecutionPhaseConstants[nodeExecution?.closure[key]]?.value ??
nodeExecutionPhaseConstants[0].value;
// phase check filters always return values in an array
const valuesArray = value as FilterOperationValueList;
return valuesArray.includes(itemValue);
}
return false;
};

export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({
tabType,
filteredNodeExecutions,
}) => {
const styles = useStyles();
const { compiledWorkflowClosure } = useNodeExecutionContext();
const { appliedFilters } = useNodeExecutionFiltersState();
const nodeExecutionsById = useContext(NodeExecutionsByIdContext);

const { dag, staticExecutionIdsMap, error } = compiledWorkflowClosure
? transformerWorkflowToDag(compiledWorkflowClosure)
: { dag: {}, staticExecutionIdsMap: {}, error: null };
const nodeExecutionsById = useContext(NodeExecutionsByIdContext);
const dynamicParents = checkForDynamicExecutions(nodeExecutionsById, staticExecutionIdsMap);
const { data: dynamicWorkflows } = useQuery(
makeNodeExecutionDynamicWorkflowQuery(dynamicParents),
);
const [initialNodes, setInitialNodes] = useState<dNode[]>([]);
const [initialFilteredNodes, setInitialFilteredNodes] = useState<dNode[] | undefined>(undefined);
const [mergedDag, setMergedDag] = useState(null);
const [filters, setFilters] = useState<FilterOperation[]>(appliedFilters);
const [isFiltersChanged, setIsFiltersChanged] = useState<boolean>(false);

useEffect(() => {
const nodes: dNode[] = compiledWorkflowClosure
? transformerWorkflowToDag(compiledWorkflowClosure, dynamicWorkflows).dag.nodes
: [];
// we remove start/end node info in the root dNode list during first assignment
const initialNodes = convertToPlainNodes(nodes);
const plainNodes = convertToPlainNodes(nodes);

let newMergedDag = dag;

Expand All @@ -77,9 +106,38 @@ export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({
}
}
setMergedDag(newMergedDag);
setInitialNodes(initialNodes);
setInitialNodes(plainNodes);
}, [compiledWorkflowClosure, dynamicWorkflows]);

useEffect(() => {
if (!isEqual(filters, appliedFilters)) {
setFilters(appliedFilters);
setIsFiltersChanged(true);
} else {
setIsFiltersChanged(false);
}
}, [appliedFilters]);

useEffect(() => {
if (appliedFilters.length > 0) {
// if filter was apllied, but filteredNodeExecutions is empty, we only appliied Phase filter,
// and need to clear out items manually
if (!filteredNodeExecutions) {
const filteredNodes = initialNodes.filter((node) =>
executionMatchesPhaseFilter(nodeExecutionsById[node.scopedId], appliedFilters[0]),
);
setInitialFilteredNodes(filteredNodes);
} else {
const filteredNodes = initialNodes.filter((node: dNode) =>
filteredNodeExecutions.find(
(execution: NodeExecution) => execution.scopedId === node.scopedId,
),
);
setInitialFilteredNodes(filteredNodes);
}
}
}, [initialNodes, filteredNodeExecutions, isFiltersChanged]);

const [selectedNodes, setSelectedNodes] = useState<string[]>([]);

// Note: flytegraph allows multiple selection, but we only support showing
Expand Down Expand Up @@ -140,10 +198,7 @@ export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({
switch (tabType) {
case tabs.nodes.id:
return (
<NodeExecutionsTable
initialNodes={initialNodes}
filteredNodeExecutions={filteredNodeExecutions}
/>
<NodeExecutionsTable initialNodes={initialNodes} filteredNodes={initialFilteredNodes} />
);
case tabs.graph.id:
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ import { createTestQueryClient } from 'test/utils';
import { tabs } from '../constants';
import { ExecutionNodeViews } from '../ExecutionNodeViews';

jest.mock('chart.js', () => ({
Chart: { register: () => null },
Tooltip: { positioners: { cursor: () => null } },
registerables: [],
}));

jest.mock('chartjs-plugin-datalabels', () => ({
ChartDataLabels: null,
}));

jest.mock('components/Executions/Tables/NodeExecutionRow', () => ({
NodeExecutionRow: jest.fn(({ children, execution }) => (
NodeExecutionRow: jest.fn(({ nodeExecution }) => (
<div data-testid="node-execution-row">
<span id="node-execution-col-id">{execution?.id?.nodeId}</span>
{children}
<span id="node-execution-col-id">{nodeExecution?.id?.nodeId}</span>
</div>
)),
}));

jest.mock('components/Executions/ExecutionDetails/Timeline/ExecutionTimelineFooter', () => ({
ExecutionTimelineFooter: jest.fn(() => <div></div>),
}));

jest.mock('components/Executions/ExecutionDetails/Timeline/TimelineChart/index', () => ({
TimelineChart: jest.fn(() => <div></div>),
}));

jest.mock('components/Executions/ExecutionDetails/Timeline/NodeExecutionName', () => ({
NodeExecutionName: jest.fn(({ name }) => <div>{name}</div>),
}));

// ExecutionNodeViews uses query params for NE list, so we must match them
// for the list to be returned properly
const baseQueryParams = {
Expand Down Expand Up @@ -77,7 +79,7 @@ describe('ExecutionNodeViews', () => {
await waitFor(() => getByText(tabs.nodes.label));

const nodesTab = getByText(tabs.nodes.label);
const graphTab = getByText(tabs.graph.label);
const timelineTab = getByText(tabs.timeline.label);

// Ensure we are on Nodes tab
fireEvent.click(nodesTab);
Expand All @@ -96,11 +98,11 @@ describe('ExecutionNodeViews', () => {
await waitFor(() => queryByText(failedNodeName));

expect(queryByText(succeededNodeName)).not.toBeInTheDocument();
expect(getByText(failedNodeName)).toBeInTheDocument();
expect(queryByText(failedNodeName)).toBeInTheDocument();

// Switch to the Graph tab
fireEvent.click(statusButton);
fireEvent.click(graphTab);
fireEvent.click(timelineTab);
await waitFor(() => queryByText(succeededNodeName));

expect(queryByText(succeededNodeName)).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ export const ExecutionFilters: React.FC<ExecutionFiltersProps> = ({
filters = filters.map((filter) => {
const onChangeFunc = filter.onChange;
filter.onChange = (value) => {
if (clearCharts) clearCharts();
if (onChangeFunc) onChangeFunc(value);
if (clearCharts) {
clearCharts();
}
if (onChangeFunc) {
onChangeFunc(value);
}
};
return filter;
});
Expand Down
Loading