@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
18 lines (17 loc) • 911 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useAdaptable } from '../AdaptableContext';
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
import { AdaptableObjectCompactList } from '../Components/AdaptableObjectList/AdaptableObjectCompactList';
import { useSelector } from 'react-redux';
export const ActiveAlertsPanel = () => {
const adaptable = useAdaptable();
const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
const alerts = useSelector((state) => state.Internal.AdaptableAlerts);
alerts.forEach((alert) => {
const liveAlertDef = adaptable.api.alertApi.getAlertDefinitionById(alert.alertDefinition.Uuid);
if (liveAlertDef) {
alert.IsSuspended = liveAlertDef.IsSuspended;
}
});
return _jsx(AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
};