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

Bug fixes XIII #630

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface SearchInputsProps {
export function SearchInputs(props: SearchInputsProps) {
const dispatch = useAppDispatch();
const dataSourceId = getDataSourceId();
const [showTransformQuery, setShowTransformQuery] = useState(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm, in the case of MDS disabled, this still gets switched to true? Need to make sure this doesn't introduce any regression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added condition for MDS disabled case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added condition for MDS disabled case.

MDS enabled: datasource 2.19
Screenshot 2025-02-18 at 2 57 06 PM

MDS enabled: datasource 2.17
Screenshot 2025-02-18 at 2 54 43 PM

MDS disabled:
Screenshot 2025-02-18 at 2 47 10 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is now doing the inverse of the original change, does this cause the reverse issue of not showing the Transform query section for a split second now?

Copy link
Member

@ohltyler ohltyler Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you send a video of loading the page with MDS disabled, for example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen-capture.44.webm

const [showTransformQuery, setShowTransformQuery] = useState(false);

// re-fetch indices on initial load. When users are first creating,
// they may enter this page without getting the updated index info
Expand All @@ -44,6 +44,8 @@ export function SearchInputs(props: SearchInputsProps) {
if (dataSourceId !== undefined) {
const version = await getEffectiveVersion(dataSourceId);
setShowTransformQuery(semver.gte(version, '2.19.0'));
} else {
setShowTransformQuery(true);
}
} catch (error) {
console.error('Error checking version:', error);
Expand Down
39 changes: 25 additions & 14 deletions public/pages/workflows/workflow_list/workflow_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function WorkflowList(props: WorkflowListProps) {
</EuiFlyoutHeader>
<EuiFlyoutBody>
{!isValidUiWorkflow(selectedWorkflow) ||
selectedWorkflow?.ui_metadata?.type === WORKFLOW_TYPE.UNKNOWN ? (
selectedWorkflow?.ui_metadata?.type === WORKFLOW_TYPE.UNKNOWN ? (
<EuiEmptyPrompt
title={<h2>Invalid workflow type</h2>}
titleSize="s"
Expand Down Expand Up @@ -199,16 +199,27 @@ export function WorkflowList(props: WorkflowListProps) {
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem>
<EuiInMemoryTable<Workflow>
items={filteredWorkflows}
rowHeader="name"
// @ts-ignore
columns={columns(tableActions)}
sorting={sorting}
pagination={true}
message={loading === true ? <EuiLoadingSpinner size="xl" /> : null}
hasActions={true}
/>
{loading ? (
<EuiFlexGroup
justifyContent="center"
alignItems="center"
style={{ minHeight: '400px' }}
>
<EuiFlexItem grow={false}>
<EuiLoadingSpinner size="xl" />
</EuiFlexItem>
</EuiFlexGroup>
) : (
<EuiInMemoryTable<Workflow>
items={filteredWorkflows}
rowHeader="name"
// @ts-ignore
columns={columns(tableActions)}
sorting={sorting}
pagination={true}
hasActions={true}
/>
)}
</EuiFlexItem>
</EuiFlexGroup>
</>
Expand All @@ -235,7 +246,7 @@ function fetchFilteredWorkflows(
...workflow.ui_metadata,
type:
workflow.ui_metadata?.type !== undefined &&
Object.values(WORKFLOW_TYPE).includes(workflow.ui_metadata?.type)
Object.values(WORKFLOW_TYPE).includes(workflow.ui_metadata?.type)
? workflow.ui_metadata?.type
: WORKFLOW_TYPE.UNKNOWN,
} as UIState,
Expand All @@ -249,6 +260,6 @@ function fetchFilteredWorkflows(
return searchQuery.length === 0
? filteredWorkflows
: filteredWorkflows.filter((workflow) =>
workflow.name.toLowerCase().includes(searchQuery.toLowerCase())
);
workflow.name.toLowerCase().includes(searchQuery.toLowerCase())
);
}
Loading