import React from 'react'; import { Icon, PageTitle, Button, Link, Toggler } from 'UI'; import MetricsSearch from '../MetricsSearch'; import Select from 'Shared/Select'; import { useStore } from 'App/mstore'; import { observer, useObserver } from 'mobx-react-lite'; import { DROPDOWN_OPTIONS } from 'App/constants/card'; function MetricViewHeader() { const { metricStore } = useStore(); const filter = metricStore.filter; return (
Create custom Cards to capture key interactions and track KPIs.
metricStore.updateKey('filter', { ...filter, showMine: !filter.showMine }) } /> metricStore.updateKey('sort', { by: value.value })} plain={true} /> metricStore.updateKey('filter', { ...filter, dashboard: value }) } />
); } export default observer(MetricViewHeader); function DashboardDropdown({ onChange, plain = false }: { plain?: boolean; onChange: any }) { const { dashboardStore, metricStore } = useStore(); const dashboardOptions = dashboardStore.dashboards.map((i: any) => ({ key: i.id, label: i.name, value: i.dashboardId, })); return (