Skip to content

Commit 8994fbe

Browse files
committed
remove readonly block once provisioned; add provision callout
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent c3019d6 commit 8994fbe

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

public/pages/workflow_detail/component_details/component_details.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ interface ComponentDetailsProps {
2828
export function ComponentDetails(props: ComponentDetailsProps) {
2929
return (
3030
<EuiPanel paddingSize="m">
31-
{props.isDeprovisionable ? (
31+
{/* TODO: determine if we need this view if we want the workspace to remain
32+
readonly once provisioned */}
33+
{/* {props.isDeprovisionable ? (
3234
<ProvisionedComponentInputs />
33-
) : props.selectedComponent ? (
35+
) : */}
36+
{props.selectedComponent ? (
3437
<ComponentInputs
3538
selectedComponent={props.selectedComponent}
3639
onFormChange={props.onFormChange}

public/pages/workflow_detail/workspace/resizable_workspace.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
117117
props.workflow !== undefined &&
118118
!props.isNewWorkflow &&
119119
props.workflow?.state !== WORKFLOW_STATE.NOT_STARTED;
120+
// TODO: maybe remove this field. It depends on final UX if we want the
121+
// workspace to be readonly once provisioned or not.
120122
const readonly = props.workflow === undefined || isDeprovisionable;
121123

122124
// Loading state
@@ -321,6 +323,17 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
321323
components.
322324
</EuiCallOut>
323325
)}
326+
{isDeprovisionable && isDirty && (
327+
<EuiCallOut
328+
title="The configured flow has been provisioned"
329+
color="warning"
330+
iconType="alert"
331+
style={{ marginBottom: '16px' }}
332+
>
333+
Changes cannot be saved until the flow has first been
334+
deprovisioned.
335+
</EuiCallOut>
336+
)}
324337
<EuiPageHeader
325338
style={{ marginBottom: '8px' }}
326339
rightSideItems={[
@@ -458,7 +471,7 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
458471
<Workspace
459472
id="ingest"
460473
workflow={workflow}
461-
readonly={readonly}
474+
readonly={false}
462475
onNodesChange={onNodesChange}
463476
onSelectionChange={onSelectionChange}
464477
/>

0 commit comments

Comments
 (0)