-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
147 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
ui/src/pages/version/components/forms/components/ImageBuilderSection.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { FormLabelWithToolTip, useOnChangeHandler } from "@caraml-dev/ui-lib"; | ||
import { | ||
EuiAccordion, | ||
EuiFieldText, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiFormRow, | ||
EuiSpacer | ||
} from "@elastic/eui"; | ||
|
||
|
||
export const ImageBuilderSection = ({ | ||
imageBuilderResourceConfig, | ||
onChangeHandler, | ||
errors = {}, | ||
}) => { | ||
|
||
const { onChange } = useOnChangeHandler(onChangeHandler); | ||
|
||
return ( | ||
<EuiAccordion | ||
id="imagebuilderOption" | ||
buttonContent="Advanced configurations"> | ||
<EuiSpacer size="s" /> | ||
<EuiFlexGroup direction="row"> | ||
<EuiFlexItem> | ||
<EuiFormRow | ||
label={ | ||
<FormLabelWithToolTip | ||
label="Image Builder CPU *" | ||
content="To set a higher CPU above platform default for Image Building" | ||
/> | ||
} | ||
isInvalid={!!errors.cpu_request} | ||
error={errors.cpu_request} | ||
fullWidth | ||
> | ||
<EuiFieldText | ||
placeholder="500m" | ||
value={imageBuilderResourceConfig.cpu_request} | ||
onChange={(e) => onChange("cpu_request")(e.target.value)} | ||
isInvalid={!!errors.cpu_request} | ||
name="cpu" | ||
/> | ||
</EuiFormRow> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem> | ||
<EuiFormRow | ||
label={ | ||
<FormLabelWithToolTip | ||
label="Image Builder Memory *" | ||
content="To set a higher Mem above platform default for Image Building" | ||
/> | ||
} | ||
isInvalid={!!errors.memory_request} | ||
error={errors.memory_request} | ||
fullWidth | ||
> | ||
<EuiFieldText | ||
placeholder="500Mi" | ||
value={imageBuilderResourceConfig.memory_request} | ||
onChange={(e) => onChange("memory_request")(e.target.value)} | ||
isInvalid={!!errors.memory_request} | ||
name="memory" | ||
/> | ||
</EuiFormRow> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiAccordion> | ||
)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters