diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/GraphManager.tsx b/frontend/src/container/GridCardLayout/GridCard/FullView/GraphManager.tsx index b139af7e0e..956c915496 100644 --- a/frontend/src/container/GridCardLayout/GridCard/FullView/GraphManager.tsx +++ b/frontend/src/container/GridCardLayout/GridCard/FullView/GraphManager.tsx @@ -4,6 +4,7 @@ import { Button, Input } from 'antd'; import { CheckboxChangeEvent } from 'antd/es/checkbox'; import { ResizeTable } from 'components/ResizeTable'; import { useNotifications } from 'hooks/useNotifications'; +import { useDashboard } from 'providers/Dashboard/Dashboard'; import { memo, useCallback, useState } from 'react'; import { getGraphManagerTableColumns } from './TableRender/GraphManagerColumns'; @@ -29,6 +30,7 @@ function GraphManager({ ); const { notifications } = useNotifications(); + const { isDashboardLocked } = useDashboard(); const checkBoxOnChangeHandler = useCallback( (e: CheckboxChangeEvent, index: number): void => { @@ -66,6 +68,7 @@ function GraphManager({ graphVisibilityState: graphsVisibilityStates, labelClickedHandler, yAxisUnit, + isGraphDisabled: isDashboardLocked, }); const filterHandler = useCallback( diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx b/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx index 922510eaea..280edac867 100644 --- a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx +++ b/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx @@ -9,6 +9,7 @@ function CustomCheckBox({ index, graphVisibilityState = [], checkBoxOnChangeHandler, + disabled = false, }: CheckBoxProps): JSX.Element { const onChangeHandler = (e: CheckboxChangeEvent): void => { checkBoxOnChangeHandler(e, index); @@ -28,7 +29,11 @@ function CustomCheckBox({ }, }} > - + ); } diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/GetLabel.tsx b/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/GetLabel.tsx index 1cafd49bf5..8e516be9a7 100644 --- a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/GetLabel.tsx +++ b/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/GetLabel.tsx @@ -5,12 +5,14 @@ import Label from './Label'; export const getLabel = ( labelClickedHandler: (labelIndex: number) => void, + disabled?: boolean, ): ColumnType => ({ render: (label: string, record): JSX.Element => (