import React from "react"; import PropTypes from "prop-types"; import { observer, useLocalStore } from "mobx-react"; import { AlertStore } from "Stores/AlertStore"; import { TooltipWrapper } from "Components/TooltipWrapper"; import { LabelWithPercent } from "Components/Labels/LabelWithPercent"; import { ToggleIcon } from "Components/ToggleIcon"; const TableRows = observer(({ alertStore, nameStats }) => nameStats.map((nameStats) => ( {nameStats.hits} {nameStats.name} {nameStats.values.slice(0, 9).map((valueStats, i) => ( f.raw === valueStats.raw) .length > 0 } /> ))} {nameStats.values.length > 9 ? (
+{nameStats.values.length - 9} more
) : null} )) ); const LabelsTable = observer( ({ alertStore, showAllLabels, toggleAllLabels }) => ( nameStats.hits >= alertStore.info.totalAlerts )} > {alertStore.data.counters.filter( (nameStats) => nameStats.hits < alertStore.info.totalAlerts ).length > 0 ? ( ) : null} {showAllLabels ? ( nameStats.hits < alertStore.info.totalAlerts )} > ) : null}
) ); const NothingToShow = () => (

No labels to display

); const OverviewModalContent = observer(({ alertStore, onHide }) => { const allLabels = useLocalStore(() => ({ show: false, toggle() { this.show = !this.show; }, })); return (
Overview
{alertStore.data.counters.length === 0 ? ( ) : ( )}
); }); OverviewModalContent.propTypes = { alertStore: PropTypes.instanceOf(AlertStore).isRequired, onHide: PropTypes.func.isRequired, }; export { OverviewModalContent };