Revision 523d56fd
Added by Lior Keren about 1 year ago
webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/index.js | ||
---|---|---|
TrashIcon,
|
||
CloneIcon,
|
||
UndoIcon,
|
||
FileInvoiceIcon,
|
||
BuildIcon,
|
||
TerminalIcon,
|
||
} from '@patternfly/react-icons';
|
||
... | ... | |
hostName,
|
||
computeId,
|
||
isBuild,
|
||
hasReports,
|
||
permissions: {
|
||
destroy_hosts: canDestroy,
|
||
create_hosts: canCreate,
|
||
... | ... | |
>
|
||
{__('Facts')}
|
||
</DropdownItem>,
|
||
<DropdownItem
|
||
ouiaId="report-dropdown-item"
|
||
isDisabled={!hasReports}
|
||
onClick={() =>
|
||
visit(foremanUrl(`/hosts/${hostFriendlyId}/config_reports`))
|
||
}
|
||
key="report"
|
||
component="button"
|
||
icon={<FileInvoiceIcon />}
|
||
>
|
||
{__('Reports')}
|
||
</DropdownItem>,
|
||
<DropdownSeparator key="sp-2" ouiaId="dropdown-separator-2" />,
|
||
<DropdownItem
|
||
ouiaId="pre-version-dropdown-item"
|
||
... | ... | |
hostName: PropTypes.string,
|
||
computeId: PropTypes.number,
|
||
permissions: PropTypes.object,
|
||
hasReports: PropTypes.bool,
|
||
isBuild: PropTypes.bool,
|
||
};
|
||
ActionsBar.defaultProps = {
|
||
... | ... | |
edit_hosts: false,
|
||
build_hosts: false,
|
||
},
|
||
hasReports: false,
|
||
isBuild: false,
|
||
};
|
||
|
Also available in: Unified diff
Fixes #36067 - Drop reports link from the kebab menu in new host details page