mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-13 22:11:32 +08:00

* feat: dashboard widget page is refactored * chore: key is updated * chore: delete widget is updated * chore: naming of the file is updated * feat: dashboard changes are updated and selected dashboard and dashboardId is added * chore: dashboard widget page is updated * feat: setlayout is updated * chore: selected dashboard is updated * chore: dashboard is updated * fix: feedback is updated * chore: comments are resolved * chore: empty widget id is updated * fix: variables is updated * chore: dashboard variable and name,description is now updated in hooks * chore: build is fixed * chore: loading experience is updated * chore: title is updated * fix: dashboard variables and other changes are updated * feat: dashboard reducer is removed * feat: widget header is updated * feat: widget header is updated * chore: dashboard is updated * chore: feedback is updated * fix: issues are fixed * chore: delete is updated * chore: warning message is updated * chore: warning message is updated * chore: widget graph component * feat: dashboard condition is updated * chore: getChartData is updated * chore: widget details page is updated * feat: tab sync is updated * chore: layout is updated * chore: labels is updated * chore: message is updated * chore: warining message is updated --------- Co-authored-by: Rajat Dabade <rajat@signoz.io> Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
23 lines
748 B
TypeScript
23 lines
748 B
TypeScript
import { PANEL_TYPES } from 'constants/queryBuilder';
|
|
import { PanelTypeAndGraphManagerVisibilityProps } from 'container/GridCardLayout/GridCard/FullView/types';
|
|
import { PanelTypeKeys } from 'types/common/queryBuilder';
|
|
|
|
export const useChartMutable = ({
|
|
panelType,
|
|
panelTypeAndGraphManagerVisibility,
|
|
}: UseChartMutableProps): boolean => {
|
|
const panelKeys: PanelTypeKeys[] = [].slice.call(Object.keys(PANEL_TYPES));
|
|
const graphType = panelKeys.find(
|
|
(key: PanelTypeKeys) => PANEL_TYPES[key] === panelType,
|
|
);
|
|
if (!graphType) {
|
|
return false;
|
|
}
|
|
return panelTypeAndGraphManagerVisibility[graphType];
|
|
};
|
|
|
|
interface UseChartMutableProps {
|
|
panelType: string;
|
|
panelTypeAndGraphManagerVisibility: PanelTypeAndGraphManagerVisibilityProps;
|
|
}
|