1
2
3
4
5
6
7
8
9
10
11
12
13
14 from Globals import InitializeClass
15 from AccessControl import ClassSecurityInfo
16
17 from Event import Event
18
20 """
21 Event that lives in the zope context has zope security mechanisms and
22 url back to event manager
23 """
24 security = ClassSecurityInfo()
25 security.setDefaultAccess("allow")
26
27 - def __init__(self, manager, fields, data, eventPermission=True):
33
35 """build an href to call the detail of this event"""
36 return "%s/viewEventFields?evid=%s" % (self._baseurl, self.evid)
37
39 """return the css class name to be used for this event.
40 """
41 __pychecker__='no-constCond'
42 value = self.severity < 0 and "unknown" or self.severity
43 acked = self.eventState > 0 and "acked" or "noack"
44 return "zenevents_%s_%s %s" % (value, acked, acked)
45
47 """return the id of our manager.
48 """
49 return self._zem
50
51 InitializeClass(ZEvent)
52