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

Fixes #36683 - Add help icons to rpm filters #10698

Merged
merged 1 commit into from
Sep 13, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ import { useSelector, shallowEqual } from 'react-redux';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import {
Modal, ModalVariant,
Modal, ModalVariant, Popover, Button,
} from '@patternfly/react-core';
import {
HelpIcon,
} from '@patternfly/react-icons';
import { TableVariant, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table';
import { urlBuilder } from 'foremanReact/common/urlHelpers';
import TableWrapper from '../../../../../components/Table/TableWrapper';
import { getRPMPackages } from '../../ContentViewDetailActions';
import { selectRPMPackages, selectRPMPackagesStatus } from '../../ContentViewDetailSelectors';
import './matchContentModal.scss';


const columnHeaders = [
__('RPM name'),
__('Summary'),
];

const emptyContentTitle = __('No matching RPM found.');
const emptyContentBody = __("Given criteria doesn't match any RPMs. Try changing your rule.");
const emptySearchTitle = __('Your search returned no matching RPMs.');
const emptyContentTitle = __('No matching non-modular RPM found.');
const emptyContentBody = __("Given criteria doesn't match any non-modular RPMs. Try changing your rule.");
const emptySearchTitle = __('Your search returned no matching non-modular RPMs.');
const emptySearchBody = __('Try changing your search criteria.');

const CVRpmMatchContentModal = ({ filterId, onClose, filterRuleId }) => {
Expand All @@ -41,6 +45,16 @@ const CVRpmMatchContentModal = ({ filterId, onClose, filterRuleId }) => {
isOpen
onClose={onClose}
appendTo={document.body}
help={
<Popover
headerContent={__('Help')}
bodyContent={__("Matching RPMs based on your created filter rule. Remember, RPM filters don't apply to modular RPMs.")}
>
<Button variant="plain" aria-label="Help" ouiaId="matching-content-modal-help">
<HelpIcon />
</Button>
</Popover>
}
>
<TableWrapper
{...{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pf-c-empty-state {
margin-top: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import {
Modal, ModalVariant, Form, FormGroup, TextInput,
ActionGroup, Button, FormSelect, FormSelectOption,
ActionGroup, Button, FormSelect, FormSelectOption, Popover,
} from '@patternfly/react-core';
import {
HelpIcon,
} from '@patternfly/react-icons';
import { addCVFilterRule, editCVFilterRule, getCVFilterRules } from '../../../ContentViewDetailActions';
import {
selectCreateFilterRuleStatus,
Expand Down Expand Up @@ -135,6 +138,17 @@ const AddEditPackageRuleModal = ({
isOpen
onClose={onClose}
appendTo={document.body}
help={
<Popover
headerContent={__('Help')}
bodyContent={__('Use filter rules to include or restrict certain content. ' +
"When selecting RPMs, be aware that RPM filters don't apply to modular RPMs.")}
>
<Button variant="plain" aria-label="Help" ouiaId="rpm-filter-rule-modal-help">
<HelpIcon />
</Button>
</Popover>
}
>
<Form onSubmit={(e) => {
e.preventDefault();
Expand Down
Loading