Package Products :: Package ZenEvents :: Module EventManagerBase |
[hide private]
[frames] | no frames]

# Module EventManagerBase

source code

Classes | [hide private]
| EventManagerBase Data connector to backend of the event management system.

Functions | [hide private]
evtprep(evts) Prepares data from `Products.ZenEvents.EventManagerBase.getEventSummary` for rendering in the eventrainbow template macro. | source code

Variables | [hide private]
| __doc__ = `"""EventManagerB`...``
| log = `logging.getLogger("zen.Events")`
| __pychecker__ = `"maxargs=16"`

Function Details | [hide private]

### evtprep(evts) | source code
Prepares data from `Products.ZenEvents.EventManagerBase.getEventSummary` for rendering in the eventrainbow template macro. Each cell of the old-style event rainbow needs a CSS class specified in order to render its color, fill and border style. evtprep determines the proper class and returns it, along with a string representation of the number of live and acknowledged events.
    >>> from Products.ZenEvents.EventManagerBase import evtprep
    >>> evtprep(['zenevents_5_noack noack', 2, 2])
    {'cssclass': 'zenevents_5_noack noack empty thin', 'data': '2/2'}
    >>> evtprep(['zenevents_5_noack noack', 1, 2])
    {'cssclass': 'zenevents_5_noack noack', 'data': '1/2'}
Parameters: `evts` (tuple) - A tuple of the form (Severity string, Number Acknowledged int, Number Live int) Returns: A dictionary of the form {'cssclass': Class string, 'data': Event count representation string}

Variables Details | [hide private]

  ### __doc__ Value:
      """EventManagerBase
      Data connector to backend of the event management system.
      """