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