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

Fixed build image page layout in new theme #9004

Merged
merged 1 commit into from
Jul 23, 2024
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
3 changes: 2 additions & 1 deletion java/code/src/com/suse/manager/webui/utils/ViewHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public enum ViewHelper {
"/rhn/manager/admin/setup/products",
"/rhn/systems/details/SystemRemoteCommand.do",
"/rhn/manager/systems/details/highstate",
"/rhn/manager/systems/details/recurring-actions"
"/rhn/manager/systems/details/recurring-actions",
"/rhn/manager/cm/build"
);

ViewHelper() { }
Expand Down
1 change: 1 addition & 0 deletions web/html/src/core/spa/view-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const BOOTSTRAP_READY_PAGES: string[] = [
"/rhn/systems/details/SystemRemoteCommand.do",
"/rhn/manager/systems/details/highstate",
"/rhn/manager/systems/details/recurring-actions",
"/rhn/manager/cm/build",
];

export const onEndNavigate = () => {
Expand Down
130 changes: 70 additions & 60 deletions web/html/src/manager/images/image-build.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,67 +345,77 @@ class BuildImage extends React.Component<Props, State> {
helpUrl="reference/images/images-build.html"
>
<Messages items={this.state.messages} />
<Form
model={this.state.model}
className="image-build-form"
onChange={this.onFormChange}
onSubmit={this.onBuild}
onValidate={this.onValidate}
divClass="col-md-7"
>
<Select
name="profileId"
required
label={t("Image Profile")}
onChange={this.handleProfileChange}
labelClass="col-md-3"
divClass="col-md-9"
invalidHint={
<span>
Image Profile is required.&nbsp;
<a href={"/rhn/manager/cm/imageprofiles/create?url_bounce=" + this.getBounceUrl()}>Create a new one</a>.
</span>
}
options={this.state.profiles}
getOptionValue={(option) => option.profileId}
/>

{this.state.profile.imageType === "dockerfile" && (
<Text name="version" label={t("Version")} labelClass="col-md-3" divClass="col-md-9" placeholder="latest" />
)}

<Select
name="buildHostId"
required
label={t("Build Host")}
labelClass="col-md-3"
divClass="col-md-9"
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
options={this.state.hosts}
/>

<ActionSchedule
earliest={this.state.model.earliest}
actionChains={window.actionChains}
actionType="image.build"
onActionChainChanged={this.onActionChainChanged}
onDateTimeChanged={this.onDateTimeChanged}
/>

<FormGroup>
<div className="col-md-offset-3 offset-md-3 col-md-9">
<SubmitButton
id="submit-btn"
className="btn-success"
icon="fa-cogs"
text={t("Build")}
disabled={this.state.isInvalid}
<div className="row">
<Form
model={this.state.model}
className="image-build-form col-md-7"
onChange={this.onFormChange}
onSubmit={this.onBuild}
onValidate={this.onValidate}
>
<Select
name="profileId"
required
label={t("Image Profile")}
onChange={this.handleProfileChange}
labelClass="col-md-3"
divClass="col-md-9"
invalidHint={
<span>
Image Profile is required.&nbsp;
<a href={"/rhn/manager/cm/imageprofiles/create?url_bounce=" + this.getBounceUrl()}>
Create a new one
</a>
.
</span>
}
options={this.state.profiles}
getOptionValue={(option) => option.profileId}
/>

{this.state.profile.imageType === "dockerfile" && (
<Text
name="version"
label={t("Version")}
labelClass="col-md-3"
divClass="col-md-9"
placeholder="latest"
/>
</div>
</FormGroup>
</Form>
{this.renderProfileSummary()}
)}

<Select
name="buildHostId"
required
label={t("Build Host")}
labelClass="col-md-3"
divClass="col-md-9"
getOptionLabel={(option) => option.name}
getOptionValue={(option) => option.id}
options={this.state.hosts}
/>

<ActionSchedule
earliest={this.state.model.earliest}
actionChains={window.actionChains}
actionType="image.build"
onActionChainChanged={this.onActionChainChanged}
onDateTimeChanged={this.onDateTimeChanged}
/>

<FormGroup>
<div className="col-md-offset-3 offset-md-3 col-md-9">
<SubmitButton
id="submit-btn"
className="btn-success"
icon="fa-cogs"
text={t("Build")}
disabled={this.state.isInvalid}
/>
</div>
</FormGroup>
</Form>
{this.renderProfileSummary()}
</div>
</TopPanel>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed broken layout of build image page
Loading