Skip to content

Fixes #39532 - All hosts - add action - bulk add capsule#616

Open
Lukshio wants to merge 3 commits into
theforeman:masterfrom
Lukshio:addBulkAction
Open

Fixes #39532 - All hosts - add action - bulk add capsule#616
Lukshio wants to merge 3 commits into
theforeman:masterfrom
Lukshio:addBulkAction

Conversation

@Lukshio

@Lukshio Lukshio commented Jul 16, 2026

Copy link
Copy Markdown

Users can assign an OpenSCAP Proxy to a host. This can be done individually for a host via the host edit form, but also in bulk via the legacy host overview UI (see screenshot). The new UI currently doesn't support this.

Option can be found on AllHosts page -> select hosts -> kebab menu -> Change association -> OpenSCAP Capsule

@MariaAga MariaAga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial review:
Capsule is for downstream, and gets translated from "Proxy" please only use proxy here.

Going to do some tests now, and then a more in depth review once it gets updated

Comment thread webpack/components/HostsIndex/ChangeOpenscapProxyAction.js
};

const descriptionText = selectAllHostsMode ? (
<>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FormattedMessage might be helpful here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering what will be the best approach, but I decided to not use FormattedMessage so we don't rely on external libs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use react-intl anyway for out translations

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you prefer to have it in FormattedMessage or I can leave it like this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can leave it as is. was mostly sharing info

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success message doesn't include host count (inconsistent with core bulk actions)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried changing org and location but it does not show count either

@sbernhard

Copy link
Copy Markdown
Contributor

Please have a look at this, too: #615
Might be a valid different approach or a nice addition.

handleModalClose();
};

const handleError = () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to re-use the error handling from theforeman/foreman#11045 ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbernhard Thanks for the feedback. It is actually solving different issues. In my case, I am using handleError for closing the modal and setting state. For handleSuccess I am using for refreshing the page and closing modal.

The foreman PR is solving parsing error/sucess messages from the server response and displaying Toast by using addToast. In my case, I am using directly success/errorToast built in APIActions so it's actually different codes for different purpose.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also added my comments to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants