2025-09-07 11:50:35 +05:30
|
|
|
/* eslint-disable sonarjs/cognitive-complexity */
|
2023-11-15 15:33:45 +05:30
|
|
|
import './WidgetFullView.styles.scss';
|
|
|
|
|
|
2024-09-20 16:36:35 +05:30
|
|
|
import {
|
|
|
|
|
LoadingOutlined,
|
|
|
|
|
SearchOutlined,
|
|
|
|
|
SyncOutlined,
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import { Button, Input, Spin } from 'antd';
|
2024-02-20 16:21:07 +05:30
|
|
|
import cx from 'classnames';
|
2023-08-02 20:41:09 +05:30
|
|
|
import { ToggleGraphProps } from 'components/Graph/types';
|
2025-09-07 11:50:35 +05:30
|
|
|
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
|
|
|
|
|
import { QueryBuilderV2 } from 'components/QueryBuilderV2/QueryBuilderV2';
|
2021-09-23 15:43:43 +05:30
|
|
|
import Spinner from 'components/Spinner';
|
|
|
|
|
import TimePreference from 'components/TimePreferenceDropDown';
|
2025-09-07 11:50:35 +05:30
|
|
|
import WarningPopover from 'components/WarningPopover/WarningPopover';
|
2025-07-31 12:16:55 +05:30
|
|
|
import { ENTITY_VERSION_V5 } from 'constants/app';
|
2024-04-02 16:40:41 +05:30
|
|
|
import { QueryParams } from 'constants/query';
|
2024-02-20 16:21:07 +05:30
|
|
|
import { PANEL_TYPES } from 'constants/queryBuilder';
|
2025-09-07 11:50:35 +05:30
|
|
|
import useDrilldown from 'container/GridCardLayout/GridCard/FullView/useDrilldown';
|
2025-07-31 12:16:55 +05:30
|
|
|
import { populateMultipleResults } from 'container/NewWidget/LeftContainer/WidgetGraph/util';
|
2021-09-23 15:43:43 +05:30
|
|
|
import {
|
|
|
|
|
timeItems,
|
|
|
|
|
timePreferance,
|
|
|
|
|
} from 'container/NewWidget/RightContainer/timeItems';
|
2024-04-02 16:40:41 +05:30
|
|
|
import PanelWrapper from 'container/PanelWrapper/PanelWrapper';
|
2025-09-07 11:50:35 +05:30
|
|
|
import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActions/RightToolbarActions';
|
2023-07-18 08:55:01 +05:30
|
|
|
import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';
|
2025-09-07 11:50:35 +05:30
|
|
|
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
|
2023-08-02 20:41:09 +05:30
|
|
|
import { useChartMutable } from 'hooks/useChartMutable';
|
2025-09-07 11:50:35 +05:30
|
|
|
import useComponentPermission from 'hooks/useComponentPermission';
|
2025-02-14 08:24:49 +04:30
|
|
|
import { useSafeNavigate } from 'hooks/useSafeNavigate';
|
2024-04-02 16:40:41 +05:30
|
|
|
import useUrlQuery from 'hooks/useUrlQuery';
|
2023-07-18 08:55:01 +05:30
|
|
|
import { getDashboardVariables } from 'lib/dashbaordVariables/getDashboardVariables';
|
2024-04-02 16:40:41 +05:30
|
|
|
import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';
|
|
|
|
|
import GetMinMax from 'lib/getMinMax';
|
2025-09-07 11:50:35 +05:30
|
|
|
import { isEmpty } from 'lodash-es';
|
|
|
|
|
import { useAppContext } from 'providers/App/App';
|
2023-10-08 23:21:17 +05:30
|
|
|
import { useDashboard } from 'providers/Dashboard/Dashboard';
|
2025-09-07 11:50:35 +05:30
|
|
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
2024-04-02 16:40:41 +05:30
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
|
import { UpdateTimeInterval } from 'store/actions';
|
2021-09-23 15:43:43 +05:30
|
|
|
import { AppState } from 'store/reducers';
|
2025-09-07 11:50:35 +05:30
|
|
|
import { Warning } from 'types/api';
|
2022-01-26 21:46:59 +05:30
|
|
|
import { GlobalReducer } from 'types/reducer/globalTime';
|
2024-04-02 16:40:41 +05:30
|
|
|
import { getGraphType } from 'utils/getGraphType';
|
2024-02-28 14:56:50 +05:30
|
|
|
import { getSortedSeriesData } from 'utils/getSortedSeriesData';
|
2021-09-23 15:43:43 +05:30
|
|
|
|
2024-03-08 14:11:38 +05:30
|
|
|
import { getLocalStorageGraphVisibilityState } from '../utils';
|
2023-08-02 20:41:09 +05:30
|
|
|
import { PANEL_TYPES_VS_FULL_VIEW_TABLE } from './contants';
|
2025-09-07 11:50:35 +05:30
|
|
|
import PanelTypeSelector from './PanelTypeSelector';
|
2023-08-02 20:41:09 +05:30
|
|
|
import { GraphContainer, TimeContainer } from './styles';
|
|
|
|
|
import { FullViewProps } from './types';
|
2021-09-23 15:43:43 +05:30
|
|
|
|
2022-03-22 12:10:31 +05:30
|
|
|
function FullView({
|
2021-10-20 09:24:55 +05:30
|
|
|
widget,
|
|
|
|
|
fullViewOptions = true,
|
2024-03-04 10:15:43 +05:30
|
|
|
version,
|
2024-01-22 16:36:03 +05:30
|
|
|
originalName,
|
2024-05-24 15:54:36 +05:30
|
|
|
tableProcessedDataRef,
|
2023-07-18 08:55:01 +05:30
|
|
|
isDependedDataLoaded = false,
|
2023-08-02 20:41:09 +05:30
|
|
|
onToggleModelHandler,
|
2025-03-20 11:29:31 +05:30
|
|
|
onClickHandler,
|
2025-03-30 03:10:43 +05:30
|
|
|
customOnDragSelect,
|
2025-03-20 11:29:31 +05:30
|
|
|
setCurrentGraphRef,
|
2025-09-07 11:50:35 +05:30
|
|
|
enableDrillDown = false,
|
2022-03-22 12:10:31 +05:30
|
|
|
}: FullViewProps): JSX.Element {
|
2025-02-14 08:24:49 +04:30
|
|
|
const { safeNavigate } = useSafeNavigate();
|
2023-07-18 08:55:01 +05:30
|
|
|
const { selectedTime: globalSelectedTime } = useSelector<
|
2022-01-26 21:46:59 +05:30
|
|
|
AppState,
|
|
|
|
|
GlobalReducer
|
|
|
|
|
>((state) => state.globalTime);
|
2024-04-02 16:40:41 +05:30
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
const urlQuery = useUrlQuery();
|
|
|
|
|
const location = useLocation();
|
2021-09-23 15:43:43 +05:30
|
|
|
|
2023-11-15 15:33:45 +05:30
|
|
|
const fullViewRef = useRef<HTMLDivElement>(null);
|
2025-09-07 11:50:35 +05:30
|
|
|
const { handleRunQuery } = useQueryBuilder();
|
2023-11-15 15:33:45 +05:30
|
|
|
|
2025-03-20 11:29:31 +05:30
|
|
|
useEffect(() => {
|
|
|
|
|
setCurrentGraphRef(fullViewRef);
|
|
|
|
|
}, [setCurrentGraphRef]);
|
|
|
|
|
|
2023-11-29 00:02:51 +05:30
|
|
|
const { selectedDashboard, isDashboardLocked } = useDashboard();
|
2025-09-07 11:50:35 +05:30
|
|
|
const { user } = useAppContext();
|
|
|
|
|
|
|
|
|
|
const [editWidget] = useComponentPermission(['edit_widget'], user.role);
|
2023-10-08 23:21:17 +05:30
|
|
|
|
2021-09-23 15:43:43 +05:30
|
|
|
const getSelectedTime = useCallback(
|
|
|
|
|
() =>
|
|
|
|
|
timeItems.find((e) => e.enum === (widget?.timePreferance || 'GLOBAL_TIME')),
|
|
|
|
|
[widget],
|
|
|
|
|
);
|
|
|
|
|
|
2023-11-15 15:33:45 +05:30
|
|
|
const fullViewChartRef = useRef<ToggleGraphProps>();
|
2023-08-02 20:41:09 +05:30
|
|
|
|
2021-09-23 15:43:43 +05:30
|
|
|
const [selectedTime, setSelectedTime] = useState<timePreferance>({
|
|
|
|
|
name: getSelectedTime()?.name || '',
|
|
|
|
|
enum: widget?.timePreferance || 'GLOBAL_TIME',
|
|
|
|
|
});
|
|
|
|
|
|
2024-06-12 17:38:05 +05:30
|
|
|
const updatedQuery = widget?.query;
|
2023-07-18 08:55:01 +05:30
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
// Panel type derived from URL with fallback to widget setting
|
|
|
|
|
const selectedPanelType = useMemo(() => {
|
|
|
|
|
const urlPanelType = urlQuery.get(QueryParams.graphType) as PANEL_TYPES;
|
|
|
|
|
if (urlPanelType && Object.values(PANEL_TYPES).includes(urlPanelType)) {
|
|
|
|
|
return urlPanelType;
|
|
|
|
|
}
|
|
|
|
|
return widget?.panelTypes || PANEL_TYPES.TIME_SERIES;
|
|
|
|
|
}, [urlQuery, widget?.panelTypes]);
|
|
|
|
|
|
2024-04-02 16:40:41 +05:30
|
|
|
const [requestData, setRequestData] = useState<GetQueryResultsProps>(() => {
|
2025-09-07 11:50:35 +05:30
|
|
|
if (selectedPanelType !== PANEL_TYPES.LIST) {
|
2024-04-02 16:40:41 +05:30
|
|
|
return {
|
|
|
|
|
selectedTime: selectedTime.enum,
|
2025-09-07 11:50:35 +05:30
|
|
|
graphType: getGraphType(selectedPanelType),
|
2024-04-02 16:40:41 +05:30
|
|
|
query: updatedQuery,
|
|
|
|
|
globalSelectedInterval: globalSelectedTime,
|
|
|
|
|
variables: getDashboardVariables(selectedDashboard?.data.variables),
|
2024-06-27 22:04:14 +05:30
|
|
|
fillGaps: widget.fillSpans,
|
2025-09-07 11:50:35 +05:30
|
|
|
formatForWeb: selectedPanelType === PANEL_TYPES.TABLE,
|
|
|
|
|
originalGraphType: selectedPanelType,
|
2024-04-02 16:40:41 +05:30
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
updatedQuery.builder.queryData[0].pageSize = 10;
|
|
|
|
|
return {
|
2023-07-18 08:55:01 +05:30
|
|
|
query: updatedQuery,
|
2024-04-02 16:40:41 +05:30
|
|
|
graphType: PANEL_TYPES.LIST,
|
2024-04-09 11:05:49 +05:30
|
|
|
selectedTime: widget?.timePreferance || 'GLOBAL_TIME',
|
2023-07-18 08:55:01 +05:30
|
|
|
globalSelectedInterval: globalSelectedTime,
|
2025-03-19 11:58:20 +05:30
|
|
|
variables: getDashboardVariables(selectedDashboard?.data.variables),
|
2024-04-02 16:40:41 +05:30
|
|
|
tableParams: {
|
|
|
|
|
pagination: {
|
|
|
|
|
offset: 0,
|
|
|
|
|
limit: updatedQuery.builder.queryData[0].limit || 0,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
const {
|
|
|
|
|
drilldownQuery,
|
|
|
|
|
dashboardEditView,
|
|
|
|
|
handleResetQuery,
|
|
|
|
|
showResetQuery,
|
|
|
|
|
} = useDrilldown({
|
|
|
|
|
enableDrillDown,
|
|
|
|
|
widget,
|
|
|
|
|
setRequestData,
|
|
|
|
|
selectedDashboard,
|
|
|
|
|
selectedPanelType,
|
|
|
|
|
});
|
|
|
|
|
|
2024-04-02 16:40:41 +05:30
|
|
|
useEffect(() => {
|
|
|
|
|
setRequestData((prev) => ({
|
|
|
|
|
...prev,
|
|
|
|
|
selectedTime: selectedTime.enum,
|
|
|
|
|
}));
|
|
|
|
|
}, [selectedTime]);
|
|
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
// Update requestData when panel type changes
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setRequestData((prev) => {
|
|
|
|
|
if (selectedPanelType !== PANEL_TYPES.LIST) {
|
|
|
|
|
return {
|
|
|
|
|
...prev,
|
|
|
|
|
graphType: getGraphType(selectedPanelType),
|
|
|
|
|
formatForWeb: selectedPanelType === PANEL_TYPES.TABLE,
|
|
|
|
|
originalGraphType: selectedPanelType,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
// For LIST panels, ensure proper configuration
|
|
|
|
|
return {
|
|
|
|
|
...prev,
|
|
|
|
|
graphType: PANEL_TYPES.LIST,
|
|
|
|
|
formatForWeb: false,
|
|
|
|
|
originalGraphType: selectedPanelType,
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}, [selectedPanelType]);
|
|
|
|
|
|
2024-04-02 16:40:41 +05:30
|
|
|
const response = useGetQueryRange(
|
|
|
|
|
requestData,
|
2025-07-31 12:16:55 +05:30
|
|
|
// selectedDashboard?.data?.version || version || DEFAULT_ENTITY_VERSION,
|
|
|
|
|
ENTITY_VERSION_V5,
|
2023-07-18 08:55:01 +05:30
|
|
|
{
|
2025-09-07 11:50:35 +05:30
|
|
|
queryKey: [widget?.query, selectedPanelType, requestData, version],
|
2024-04-02 16:40:41 +05:30
|
|
|
enabled: !isDependedDataLoaded,
|
|
|
|
|
keepPreviousData: true,
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const onDragSelect = useCallback(
|
|
|
|
|
(start: number, end: number): void => {
|
|
|
|
|
const startTimestamp = Math.trunc(start);
|
|
|
|
|
const endTimestamp = Math.trunc(end);
|
|
|
|
|
|
|
|
|
|
if (startTimestamp !== endTimestamp) {
|
|
|
|
|
dispatch(UpdateTimeInterval('custom', [startTimestamp, endTimestamp]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { maxTime, minTime } = GetMinMax('custom', [
|
|
|
|
|
startTimestamp,
|
|
|
|
|
endTimestamp,
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
urlQuery.set(QueryParams.startTime, minTime.toString());
|
|
|
|
|
urlQuery.set(QueryParams.endTime, maxTime.toString());
|
|
|
|
|
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
|
2025-02-14 08:24:49 +04:30
|
|
|
safeNavigate(generatedUrl);
|
2023-07-18 08:55:01 +05:30
|
|
|
},
|
2025-02-14 08:24:49 +04:30
|
|
|
[dispatch, location.pathname, safeNavigate, urlQuery],
|
2022-05-19 23:08:27 +05:30
|
|
|
);
|
|
|
|
|
|
2024-03-08 14:11:38 +05:30
|
|
|
const [graphsVisibilityStates, setGraphsVisibilityStates] = useState<
|
|
|
|
|
boolean[]
|
2024-09-18 18:02:17 +05:30
|
|
|
>(Array(response.data?.payload?.data?.result?.length).fill(true));
|
2024-03-08 14:11:38 +05:30
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const {
|
|
|
|
|
graphVisibilityStates: localStoredVisibilityState,
|
|
|
|
|
} = getLocalStorageGraphVisibilityState({
|
|
|
|
|
apiResponse: response.data?.payload.data.result || [],
|
|
|
|
|
name: originalName,
|
|
|
|
|
});
|
|
|
|
|
setGraphsVisibilityStates(localStoredVisibilityState);
|
|
|
|
|
}, [originalName, response.data?.payload.data.result]);
|
|
|
|
|
|
2023-10-08 23:21:17 +05:30
|
|
|
const canModifyChart = useChartMutable({
|
2025-09-07 11:50:35 +05:30
|
|
|
panelType: selectedPanelType,
|
2023-10-08 23:21:17 +05:30
|
|
|
panelTypeAndGraphManagerVisibility: PANEL_TYPES_VS_FULL_VIEW_TABLE,
|
|
|
|
|
});
|
|
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
if (response.data && selectedPanelType === PANEL_TYPES.BAR) {
|
2024-02-28 14:56:50 +05:30
|
|
|
const sortedSeriesData = getSortedSeriesData(
|
|
|
|
|
response.data?.payload.data.result,
|
|
|
|
|
);
|
|
|
|
|
response.data.payload.data.result = sortedSeriesData;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
if (response.data && selectedPanelType === PANEL_TYPES.PIE) {
|
2025-07-31 12:16:55 +05:30
|
|
|
const transformedData = populateMultipleResults(response?.data);
|
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
response.data = transformedData;
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-15 15:33:45 +05:30
|
|
|
useEffect(() => {
|
|
|
|
|
graphsVisibilityStates?.forEach((e, i) => {
|
|
|
|
|
fullViewChartRef?.current?.toggleGraph(i, e);
|
|
|
|
|
});
|
2024-03-08 14:11:38 +05:30
|
|
|
}, [graphsVisibilityStates]);
|
2023-08-02 20:41:09 +05:30
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
const isListView = selectedPanelType === PANEL_TYPES.LIST;
|
2024-02-20 16:21:07 +05:30
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
const isTablePanel = selectedPanelType === PANEL_TYPES.TABLE;
|
2024-09-20 16:36:35 +05:30
|
|
|
|
|
|
|
|
const [searchTerm, setSearchTerm] = useState<string>('');
|
|
|
|
|
|
2025-09-07 11:50:35 +05:30
|
|
|
if (response.isLoading && selectedPanelType !== PANEL_TYPES.LIST) {
|
2022-05-19 23:08:27 +05:30
|
|
|
return <Spinner height="100%" size="large" tip="Loading..." />;
|
2021-10-20 09:24:55 +05:30
|
|
|
}
|
|
|
|
|
|
2021-09-23 15:43:43 +05:30
|
|
|
return (
|
2023-11-15 15:33:45 +05:30
|
|
|
<div className="full-view-container">
|
2025-09-07 11:50:35 +05:30
|
|
|
<OverlayScrollbar>
|
|
|
|
|
<>
|
|
|
|
|
<div className="full-view-header-container">
|
|
|
|
|
{fullViewOptions && (
|
|
|
|
|
<TimeContainer $panelType={selectedPanelType}>
|
|
|
|
|
{enableDrillDown && (
|
|
|
|
|
<div className="drildown-options-container">
|
|
|
|
|
{showResetQuery && (
|
|
|
|
|
<Button type="link" onClick={handleResetQuery}>
|
|
|
|
|
Reset Query
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
{editWidget && (
|
|
|
|
|
<Button
|
|
|
|
|
className="switch-edit-btn"
|
|
|
|
|
disabled={response.isFetching || response.isLoading}
|
|
|
|
|
onClick={(): void => {
|
|
|
|
|
if (dashboardEditView) {
|
|
|
|
|
safeNavigate(dashboardEditView);
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Switch to Edit Mode
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
<PanelTypeSelector
|
|
|
|
|
selectedPanelType={selectedPanelType}
|
|
|
|
|
disabled={response.isFetching || response.isLoading}
|
|
|
|
|
query={drilldownQuery}
|
|
|
|
|
widgetId={widget?.id || ''}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
{!isEmpty(response.data?.warning) && (
|
|
|
|
|
<WarningPopover warningData={response.data?.warning as Warning} />
|
|
|
|
|
)}
|
|
|
|
|
<div className="time-container">
|
|
|
|
|
{response.isFetching && (
|
|
|
|
|
<Spin spinning indicator={<LoadingOutlined spin />} />
|
|
|
|
|
)}
|
|
|
|
|
<TimePreference
|
|
|
|
|
selectedTime={selectedTime}
|
|
|
|
|
setSelectedTime={setSelectedTime}
|
|
|
|
|
/>
|
|
|
|
|
<Button
|
|
|
|
|
style={{
|
|
|
|
|
marginLeft: '4px',
|
|
|
|
|
}}
|
|
|
|
|
onClick={(): void => {
|
|
|
|
|
response.refetch();
|
|
|
|
|
}}
|
|
|
|
|
type="primary"
|
|
|
|
|
icon={<SyncOutlined />}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</TimeContainer>
|
2024-04-02 16:40:41 +05:30
|
|
|
)}
|
2025-09-07 11:50:35 +05:30
|
|
|
{enableDrillDown && (
|
|
|
|
|
<>
|
|
|
|
|
<QueryBuilderV2
|
|
|
|
|
panelType={selectedPanelType}
|
|
|
|
|
version={selectedDashboard?.data?.version || 'v3'}
|
|
|
|
|
isListViewPanel={selectedPanelType === PANEL_TYPES.LIST}
|
|
|
|
|
// filterConfigs={filterConfigs}
|
|
|
|
|
// queryComponents={queryComponents}
|
|
|
|
|
/>
|
|
|
|
|
<RightToolbarActions
|
|
|
|
|
onStageRunQuery={(): void => {
|
|
|
|
|
handleRunQuery();
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
className={cx('graph-container', {
|
|
|
|
|
disabled: isDashboardLocked,
|
|
|
|
|
'height-widget':
|
|
|
|
|
widget?.mergeAllActiveQueries || widget?.stackedBarChart,
|
|
|
|
|
'full-view-graph-container': isListView,
|
|
|
|
|
})}
|
|
|
|
|
ref={fullViewRef}
|
|
|
|
|
>
|
|
|
|
|
<GraphContainer
|
2023-11-15 15:33:45 +05:30
|
|
|
style={{
|
2025-09-07 11:50:35 +05:30
|
|
|
height: isListView ? '100%' : '90%',
|
2024-09-20 16:36:35 +05:30
|
|
|
}}
|
2025-09-07 11:50:35 +05:30
|
|
|
isGraphLegendToggleAvailable={canModifyChart}
|
|
|
|
|
>
|
|
|
|
|
{isTablePanel && (
|
|
|
|
|
<Input
|
|
|
|
|
addonBefore={<SearchOutlined size={14} />}
|
|
|
|
|
className="global-search"
|
|
|
|
|
placeholder="Search..."
|
|
|
|
|
allowClear
|
|
|
|
|
key={widget.id}
|
|
|
|
|
onChange={(e): void => {
|
|
|
|
|
setSearchTerm(e.target.value || '');
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<PanelWrapper
|
|
|
|
|
queryResponse={response}
|
|
|
|
|
widget={widget}
|
|
|
|
|
setRequestData={setRequestData}
|
|
|
|
|
isFullViewMode
|
|
|
|
|
onToggleModelHandler={onToggleModelHandler}
|
|
|
|
|
setGraphVisibility={setGraphsVisibilityStates}
|
|
|
|
|
graphVisibility={graphsVisibilityStates}
|
|
|
|
|
onDragSelect={customOnDragSelect ?? onDragSelect}
|
|
|
|
|
tableProcessedDataRef={tableProcessedDataRef}
|
|
|
|
|
searchTerm={searchTerm}
|
|
|
|
|
onClickHandler={onClickHandler}
|
|
|
|
|
enableDrillDown={enableDrillDown}
|
|
|
|
|
selectedGraph={selectedPanelType}
|
|
|
|
|
/>
|
|
|
|
|
</GraphContainer>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
</OverlayScrollbar>
|
2023-11-15 15:33:45 +05:30
|
|
|
</div>
|
2021-09-23 15:43:43 +05:30
|
|
|
);
|
2022-03-22 12:10:31 +05:30
|
|
|
}
|
2021-09-23 15:43:43 +05:30
|
|
|
|
2022-03-24 12:06:57 +05:30
|
|
|
FullView.defaultProps = {
|
|
|
|
|
fullViewOptions: undefined,
|
|
|
|
|
onClickHandler: undefined,
|
|
|
|
|
yAxisUnit: undefined,
|
2023-01-17 13:30:34 +02:00
|
|
|
onDragSelect: undefined,
|
2023-07-18 08:55:01 +05:30
|
|
|
isDependedDataLoaded: undefined,
|
2022-03-24 12:06:57 +05:30
|
|
|
};
|
|
|
|
|
|
2023-08-02 20:41:09 +05:30
|
|
|
FullView.displayName = 'FullView';
|
|
|
|
|
|
2021-11-16 21:13:20 +05:30
|
|
|
export default FullView;
|