diff --git a/frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell/InputCellViewMode.tsx b/frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell/InputCellViewMode.tsx index 0fd2bad12..f948f374e 100644 --- a/frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell/InputCellViewMode.tsx +++ b/frontend/src/components/Brokers/Broker/Configs/TableComponents/InputCell/InputCellViewMode.tsx @@ -1,9 +1,10 @@ import React, { type FC } from 'react'; -import { Button } from 'components/common/Button/Button'; import EditIcon from 'components/common/Icons/EditIcon'; import type { ConfigUnit } from 'components/Brokers/Broker/Configs/lib/types'; -import Tooltip from 'components/common/Tooltip/Tooltip'; import { getConfigDisplayValue } from 'components/Brokers/Broker/Configs/lib/utils'; +import { ActionButton } from 'components/common/ActionComponent'; +import { Action, ResourceType } from 'generated-sources'; +import { getDefaultActionMessage } from 'components/common/ActionComponent/ActionComponent'; import * as S from './styled'; @@ -35,22 +36,22 @@ const InputCellViewMode: FC = ({ {displayValue} - - Edit - + + permission={{ + resource: ResourceType.CLUSTERCONFIG, + action: Action.EDIT, + }} + > + Edit + ); }; diff --git a/frontend/src/components/common/ActionComponent/ActionButton/ActionCanButton/ActionCanButton.tsx b/frontend/src/components/common/ActionComponent/ActionButton/ActionCanButton/ActionCanButton.tsx index fadb1e20c..5ddc09830 100644 --- a/frontend/src/components/common/ActionComponent/ActionButton/ActionCanButton/ActionCanButton.tsx +++ b/frontend/src/components/common/ActionComponent/ActionButton/ActionCanButton/ActionCanButton.tsx @@ -21,7 +21,7 @@ const ActionButton: React.FC = ({ const isDisabled = !canDoAction; const { x, y, refs, strategy, open } = useActionTooltip( - isDisabled, + isDisabled || disabled, placement );