BAPSicle/helpers/alert_manager.py

30 lines
586 B
Python
Raw Normal View History

2021-09-11 22:44:15 +00:00
from typing import List
from baps_types.alert import CRITICAL, Alert
class AlertManager():
_alerts: List[Alert]
def __init__(self):
self._alerts = [Alert(
{
"start_time": -1,
"id": "test",
"title": "Test Alert",
"description": "This is a test alert.",
"module": "Test",
"severity": CRITICAL
}
)]
@property
def alerts_current(self):
return self._alerts
@property
def alert_count_current(self):
return len(self._alerts)
@property
def alert_count_previous(self):
return len(self._alerts)