Trees | Indices | Help |
|
---|
|
1 ############################################################################## 2 # 3 # Copyright (C) Zenoss, Inc. 2007, all rights reserved. 4 # 5 # This content is made available according to terms specified in 6 # License.zenoss under the directory where your Zenoss product is installed. 7 # 8 ############################################################################## 9 10 11 __doc__='''DeviceReportClass 12 13 DeviceReportClass contain DeviceReports. 14 ''' 15 16 from AccessControl import ClassSecurityInfo 17 from Globals import DTMLFile 18 from ReportClass import ReportClass 19 from Globals import InitializeClass 20 from Products.ZenWidgets import messaging 21 from Products.ZenMessaging.audit import audit 22 from Products.ZenUtils.deprecated import deprecated 23 from Products.ZenUtils.Utils import getDisplayType27 """ 28 Construct a new DeviceReportclass 29 """ 30 frc = DeviceReportClass(id, title) 31 context._setObject(id, frc) 32 if REQUEST is not None: 33 audit('UI.ReportClass.Add', frc.id, title=title, organizer=context) 34 messaging.IMessageSender(context).sendToBrowser( 35 'Organizer Created', 36 'Device report organizer %s was created.' % id 37 ) 38 return REQUEST['RESPONSE'].redirect( 39 context.absolute_url() + '/manage_main')40 41 addDeviceReportClass = DTMLFile('dtml/addDeviceReportClass',globals())45 46 portal_type = meta_type = "DeviceReportClass" 47 48 security = ClassSecurityInfo() 49 54 55 56 security.declareProtected('Manage DMD', 'manage_addDeviceReport') 57 @deprecated70 71 72 InitializeClass(DeviceReportClass) 7359 """Add a report to this object. 60 """ 61 from Products.ZenModel.DeviceReport import DeviceReport 62 fr = DeviceReport(id) 63 self._setObject(id, fr) 64 fr = self._getOb(id) 65 if REQUEST: 66 audit('UI.Report.Add', fr.id, reportType=getDisplayType(fr)) 67 url = '%s/%s/editDeviceReport' % (self.getPrimaryUrlPath(), id) 68 return REQUEST['RESPONSE'].redirect(url) 69 return fr
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:17 2012 | http://epydoc.sourceforge.net |