import { isEmpty, map } from "lodash"; import React, { useState, useEffect } from "react"; import PropTypes from "prop-types"; import cx from "classnames"; import Button from "antd/lib/button"; import Checkbox from "antd/lib/checkbox"; import routeWithUserSession from "@/components/ApplicationArea/routeWithUserSession"; import DynamicComponent from "@/components/DynamicComponent"; import DashboardGrid from "@/components/dashboards/DashboardGrid"; import Parameters from "@/components/Parameters"; import Filters from "@/components/Filters"; import { Dashboard } from "@/services/dashboard"; import recordEvent from "@/services/recordEvent"; import resizeObserver from "@/services/resizeObserver"; import routes from "@/services/routes"; import location from "@/services/location"; import url from "@/services/url"; import useImmutableCallback from "@/lib/hooks/useImmutableCallback"; import useDashboard from "./hooks/useDashboard"; import DashboardHeader from "./components/DashboardHeader"; import "./DashboardPage.less"; function DashboardSettings({ dashboardConfiguration }) { const { dashboard, updateDashboard } = dashboardConfiguration; return (
updateDashboard({ dashboard_filters_enabled: target.checked })} data-test="DashboardFiltersCheckbox" > Use Dashboard Level Filters
); } DashboardSettings.propTypes = { dashboardConfiguration: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types }; function AddWidgetContainer({ dashboardConfiguration, className, ...props }) { const { showAddTextboxDialog, showAddWidgetDialog } = dashboardConfiguration; return (