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__="""GraphReportClass 12 13 GraphReportClass contain GraphReports. 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.Utils import getDisplayType 23 from Products.ZenUtils.deprecated import deprecated 24 from Products.ZenModel.GraphReport import GraphReport28 """ Construct a new GraphReportclass 29 """ 30 rc = GraphReportClass(id, title) 31 context._setObject(rc.id, rc) 32 if REQUEST is not None: 33 audit('UI.ReportClass.Add', rc.id, title=title, organizer=context) 34 messaging.IMessageSender(context).sendToBrowser( 35 'Report Organizer Created', 36 'Report organizer %s was created.' % id 37 ) 38 REQUEST['RESPONSE'].redirect(context.absolute_url() + '/manage_main')39 40 addGraphReportClass = DTMLFile('dtml/addGraphReportClass',globals())43 44 portal_type = meta_type = "GraphReportClass" 45 46 security = ClassSecurityInfo() 47 52 53 54 security.declareProtected('Manage DMD', 'manage_addGraphReport')66 67 68 InitializeClass(GraphReportClass) 6956 """Add a graph report to this object. 57 """ 58 fr = GraphReport(id) 59 self._setObject(id, fr) 60 fr = self._getOb(id) 61 if REQUEST: 62 audit('UI.Report.Add', fr.id, reportType=getDisplayType(fr)) 63 url = '%s/%s/editGraphReport' % (self.getPrimaryUrlPath(),id) 64 return REQUEST['RESPONSE'].redirect(url) 65 return fr
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1.1812 on Mon Jul 30 17:11:39 2012 | http://epydoc.sourceforge.net |