Skip to content

Commit 2d9e435

Browse files
committed
Bug fixes XIII
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent e5104c6 commit 2d9e435

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

public/pages/workflow_detail/workflow_inputs/search_inputs/search_inputs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface SearchInputsProps {
2929
export function SearchInputs(props: SearchInputsProps) {
3030
const dispatch = useAppDispatch();
3131
const dataSourceId = getDataSourceId();
32-
const [showTransformQuery, setShowTransformQuery] = useState(true);
32+
const [showTransformQuery, setShowTransformQuery] = useState(false);
3333

3434
// re-fetch indices on initial load. When users are first creating,
3535
// they may enter this page without getting the updated index info

public/pages/workflows/workflow_list/workflow_list.tsx

+25-14
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function WorkflowList(props: WorkflowListProps) {
161161
</EuiFlyoutHeader>
162162
<EuiFlyoutBody>
163163
{!isValidUiWorkflow(selectedWorkflow) ||
164-
selectedWorkflow?.ui_metadata?.type === WORKFLOW_TYPE.UNKNOWN ? (
164+
selectedWorkflow?.ui_metadata?.type === WORKFLOW_TYPE.UNKNOWN ? (
165165
<EuiEmptyPrompt
166166
title={<h2>Invalid workflow type</h2>}
167167
titleSize="s"
@@ -199,16 +199,27 @@ export function WorkflowList(props: WorkflowListProps) {
199199
</EuiFlexGroup>
200200
</EuiFlexItem>
201201
<EuiFlexItem>
202-
<EuiInMemoryTable<Workflow>
203-
items={filteredWorkflows}
204-
rowHeader="name"
205-
// @ts-ignore
206-
columns={columns(tableActions)}
207-
sorting={sorting}
208-
pagination={true}
209-
message={loading === true ? <EuiLoadingSpinner size="xl" /> : null}
210-
hasActions={true}
211-
/>
202+
{loading ? (
203+
<EuiFlexGroup
204+
justifyContent="center"
205+
alignItems="center"
206+
style={{ minHeight: '400px' }}
207+
>
208+
<EuiFlexItem grow={false}>
209+
<EuiLoadingSpinner size="xl" />
210+
</EuiFlexItem>
211+
</EuiFlexGroup>
212+
) : (
213+
<EuiInMemoryTable<Workflow>
214+
items={filteredWorkflows}
215+
rowHeader="name"
216+
// @ts-ignore
217+
columns={columns(tableActions)}
218+
sorting={sorting}
219+
pagination={true}
220+
hasActions={true}
221+
/>
222+
)}
212223
</EuiFlexItem>
213224
</EuiFlexGroup>
214225
</>
@@ -235,7 +246,7 @@ function fetchFilteredWorkflows(
235246
...workflow.ui_metadata,
236247
type:
237248
workflow.ui_metadata?.type !== undefined &&
238-
Object.values(WORKFLOW_TYPE).includes(workflow.ui_metadata?.type)
249+
Object.values(WORKFLOW_TYPE).includes(workflow.ui_metadata?.type)
239250
? workflow.ui_metadata?.type
240251
: WORKFLOW_TYPE.UNKNOWN,
241252
} as UIState,
@@ -249,6 +260,6 @@ function fetchFilteredWorkflows(
249260
return searchQuery.length === 0
250261
? filteredWorkflows
251262
: filteredWorkflows.filter((workflow) =>
252-
workflow.name.toLowerCase().includes(searchQuery.toLowerCase())
253-
);
263+
workflow.name.toLowerCase().includes(searchQuery.toLowerCase())
264+
);
254265
}

0 commit comments

Comments
 (0)