Trees | Indices | Help |
|
---|
|
1 ########################################################################### 2 # 3 # This program is part of Zenoss Core, an open source monitoring platform. 4 # Copyright (C) 2007, Zenoss Inc. 5 # 6 # This program is free software; you can redistribute it and/or modify it 7 # under the terms of the GNU General Public License version 2 as published by 8 # the Free Software Foundation. 9 # 10 # For complete information please visit: http://www.zenoss.com/oss/ 11 # 12 ########################################################################### 13 14 __doc__='''DeviceReportClass 15 16 DeviceReportClass contain DeviceReports. 17 ''' 18 19 from AccessControl import ClassSecurityInfo 20 from Globals import DTMLFile 21 from ReportClass import ReportClass 22 from Globals import InitializeClass 23 from Products.ZenWidgets import messaging 24 2527 ''' Construct a new DeviceReportclass 28 ''' 29 frc = DeviceReportClass(id, title) 30 context._setObject(id, frc) 31 if REQUEST is not None: 32 messaging.IMessageSender(context).sendToBrowser( 33 'Organizer Created', 34 'Device report organizer %s was created.' % id 35 ) 36 return REQUEST['RESPONSE'].redirect( 37 context.absolute_url() + '/manage_main')38 39 addDeviceReportClass = DTMLFile('dtml/addDeviceReportClass',globals()) 40 4143 44 portal_type = meta_type = "DeviceReportClass" 45 46 security = ClassSecurityInfo() 47 52 53 54 security.declareProtected('Manage DMD', 'manage_addDeviceReport')66 67 68 InitializeClass(DeviceReportClass) 6956 """Add an MultiGraph report to this object. 57 """ 58 from Products.ZenModel.DeviceReport import DeviceReport 59 fr = DeviceReport(id) 60 self._setObject(id, fr) 61 fr = self._getOb(id) 62 if REQUEST: 63 url = '%s/%s/editDeviceReport' % (self.getPrimaryUrlPath(), id) 64 return REQUEST['RESPONSE'].redirect(url) 65 return fr
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu May 7 11:46:45 2009 | http://epydoc.sourceforge.net |