Skip to content

Commit

Permalink
update content
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jul 13, 2022
1 parent 7e43091 commit d10a495
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Props = {
children: JSX.Element;
};
isOpen?: boolean;
isExternallyManaged?: boolean;
isManaged?: boolean;
onChange?: (isOpen: boolean) => void;
} & (
| {
Expand Down Expand Up @@ -54,12 +54,12 @@ export const ContextMenuActions = React.memo<Props>(({ button, onChange, isOpen,
}, [isOpenState, onChange, isOpen]);

const actionButton = button ? (
<EuiButton {...button.props} onClick={handleToggleMenu} isDisabled={props.isExternallyManaged}>
<EuiButton {...button.props} onClick={handleToggleMenu} isDisabled={props.isManaged}>
{button.children}
</EuiButton>
) : (
<EuiButtonIcon
isDisabled={props.isExternallyManaged}
isDisabled={props.isManaged}
iconType="boxesHorizontal"
onClick={handleToggleMenu}
aria-label={i18n.translate('xpack.fleet.genericActionsMenuText', {
Expand All @@ -74,7 +74,7 @@ export const ContextMenuActions = React.memo<Props>(({ button, onChange, isOpen,
anchorPosition="downRight"
panelPaddingSize="none"
button={
props.isExternallyManaged ? (
props.isManaged ? (
<EuiToolTip
title={i18n.translate('xpack.fleet.externallyManagedLabel', {
defaultMessage: 'This is externally managed integration policy.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{
const refreshAgentPolicy = useAgentPolicyRefresh();
const [isActionsMenuOpen, setIsActionsMenuOpen] = useState(defaultIsOpen);

const isExternallyManaged = Boolean(packagePolicy.is_managed);
const isManaged = Boolean(packagePolicy.is_managed);

const onEnrollmentFlyoutClose = useMemo(() => {
return () => setIsEnrollmentFlyoutOpen(false);
Expand Down Expand Up @@ -150,7 +150,7 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{
</EuiPortal>
)}
<ContextMenuActions
isExternallyManaged={isExternallyManaged}
isManaged={isManaged}
isOpen={isActionsMenuOpen}
items={menuItems}
onChange={(open) => setIsActionsMenuOpen(open)}
Expand Down

0 comments on commit d10a495

Please sign in to comment.