message_templates
MessageTemplate
MessageTemplate ()
Refactored templates using modular components.
MessageTemplate.template_f1
MessageTemplate.template_f1 (df:pandas.core.frame.DataFrame, view:str, view_group:str, message_text:str, channel_id:str, view_config:Dict[str,Any], send_to_slack_func:Callable=None, log_alert_history_func:Callable=None)
*Slack Message Format 1: Single message with row sections and details on the right.
Args: df: DataFrame with alert data view: View name view_group: Group name for the view message_text: Main message text channel_id: Slack channel ID view_config: Configuration for the view send_to_slack_func: Function to send messages to Slack log_alert_history_func: Function to log alert history
Returns: Tuple of (success_flag, error_details)*
MessageTemplate.template_f2
MessageTemplate.template_f2 (df:pandas.core.frame.DataFrame, view:str, view_group:str, message_text:str, channel_id:str, view_config:Dict[str,Any]=None, send_to_slack_func:Callable=None, log_alert_history_func:Callable=None)
*Slack Message Format 2: Individual interactive messages for each row.
Args: df: DataFrame with alert data view: View name view_group: Group name for the view message_text: Main message text channel_id: Slack channel ID view_config: Configuration for the view send_to_slack_func: Function to send messages to Slack log_alert_history_func: Function to log alert history
Returns: Tuple of (success_flag, error_details)*