Skip to content

Commit b150857

Browse files
RI-7687: fix PR comments
1 parent a05694b commit b150857

File tree

1 file changed

+51
-54
lines changed
  • redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button

1 file changed

+51
-54
lines changed

redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { PrimaryButton } from 'uiSrc/components/base/forms/buttons'
1919
import { Icon, RocketIcon, InfoIcon } from 'uiSrc/components/base/icons'
2020
import { Checkbox } from 'uiSrc/components/base/forms/checkbox/Checkbox'
2121
import { RiTooltip } from 'uiSrc/components/base'
22-
import { Modal } from '@redis-ui/components'
22+
import { Modal } from 'uiSrc/components/base/display/modal'
2323
import { UploadWarningBanner } from 'uiSrc/components/upload-warning/styles'
2424

2525
export interface Props {
@@ -87,61 +87,58 @@ const DeployPipelineButton = ({ loading, disabled, onReset }: Props) => {
8787
}
8888

8989
return (
90-
<>
91-
<Modal
92-
id="deploy-pipeline-modal"
93-
title="Are you sure you want to deploy the pipeline?"
94-
content={
95-
<Col gap="l">
96-
{!isPipelineValid && (
97-
<UploadWarningBanner
98-
message="Your RDI pipeline contains errors. Are you sure you want to continue?"
99-
show
100-
showIcon
101-
variant="attention"
102-
/>
103-
)}
104-
<FlexItem>
105-
<Text>
106-
When deployed, this local configuration will overwrite any
107-
existing pipeline.
108-
</Text>
109-
<Text>
110-
After deployment, consider flushing the target Redis database
111-
and resetting the pipeline to ensure that all data is
112-
reprocessed.
113-
</Text>
114-
</FlexItem>
115-
<Row align="center">
116-
<Checkbox
117-
id="resetPipeline"
118-
name="resetPipeline"
119-
label="Reset"
120-
labelSize="M"
121-
checked={resetPipeline}
122-
onChange={(e) => handleSelectReset(e.target.checked)}
123-
data-testid="reset-pipeline-checkbox"
124-
/>
90+
<Modal
91+
id="deploy-pipeline-modal"
92+
title="Are you sure you want to deploy the pipeline?"
93+
content={
94+
<Col gap="l">
95+
{!isPipelineValid && (
96+
<UploadWarningBanner
97+
message="Your RDI pipeline contains errors. Are you sure you want to continue?"
98+
show
99+
showIcon
100+
variant="attention"
101+
/>
102+
)}
103+
<FlexItem>
104+
<Text>
105+
When deployed, this local configuration will overwrite any
106+
existing pipeline.
107+
</Text>
108+
<Text>
109+
After deployment, consider flushing the target Redis database and
110+
resetting the pipeline to ensure that all data is reprocessed.
111+
</Text>
112+
</FlexItem>
113+
<Row align="center">
114+
<Checkbox
115+
id="resetPipeline"
116+
name="resetPipeline"
117+
label="Reset"
118+
labelSize="M"
119+
checked={resetPipeline}
120+
onChange={(e) => handleSelectReset(e.target.checked)}
121+
data-testid="reset-pipeline-checkbox"
122+
/>
125123

126-
<RiTooltip content="The pipeline will take a new snapshot of the data and process it, then continue tracking changes.">
127-
<Icon icon={InfoIcon} data-testid="reset-checkbox-info-icon" />
128-
</RiTooltip>
129-
</Row>
130-
</Col>
131-
}
132-
primaryButtonText="Deploy"
133-
onPrimaryButtonClick={handleDeployPipeline}
124+
<RiTooltip content="The pipeline will take a new snapshot of the data and process it, then continue tracking changes.">
125+
<Icon icon={InfoIcon} data-testid="reset-checkbox-info-icon" />
126+
</RiTooltip>
127+
</Row>
128+
</Col>
129+
}
130+
primaryButtonText="Deploy"
131+
onPrimaryButtonClick={handleDeployPipeline}
132+
>
133+
<PrimaryButton
134+
icon={RocketIcon}
135+
disabled={disabled}
136+
loading={loading}
137+
data-testid="deploy-rdi-pipeline"
134138
>
135-
<PrimaryButton
136-
icon={RocketIcon}
137-
disabled={disabled}
138-
loading={loading}
139-
data-testid="deploy-rdi-pipeline"
140-
>
141-
Deploy
142-
</PrimaryButton>
143-
</Modal>
144-
</>
139+
Deploy
140+
</PrimaryButton>
141+
</Modal>
145142
)
146143
}
147144

0 commit comments

Comments
 (0)