webpack/components/extensions/HostDetails/hostDetailsHelpers.js in katello-4.9.2 vs webpack/components/extensions/HostDetails/hostDetailsHelpers.js in katello-4.10.0.rc1
- old
+ new
@@ -1,23 +1,5 @@
-import { propsToCamelCase } from 'foremanReact/common/helpers';
-
-export const REMOTE_EXECUTION = 'remoteExecution';
-export const KATELLO_AGENT = 'katelloAgent';
-
-export const defaultRemoteActionMethod = ({ hostDetails }) => {
- const {
- content_facet_attributes: contentFacetAttributes,
- } = hostDetails;
- const contentFacet = propsToCamelCase(contentFacetAttributes ?? {});
- const katelloAgentAvailable = (contentFacet.katelloAgentInstalled &&
- contentFacet.katelloAgentEnabled);
- if (contentFacet.remoteExecutionByDefault || !katelloAgentAvailable) {
- return REMOTE_EXECUTION;
- }
- return KATELLO_AGENT;
-};
-
export const hostIsNotRegistered = ({ hostDetails }) => {
const {
subscription_facet_attributes: subscriptionFacetAttributes,
} = hostDetails;
return !subscriptionFacetAttributes?.uuid;
@@ -40,7 +22,5 @@
return requiredPermissions.every(permission => permittedActions.includes(permission));
};
export const missingRequiredPermissions = (requiredPermissions = [], userPermissions) =>
!hasRequiredPermissions(requiredPermissions, userPermissions);
-
-export default defaultRemoteActionMethod;