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__='''MultiGraphReportClass 15 16 MultiGraphReportClass contain MultiGraphReports. 17 ''' 18 19 from AccessControl import ClassSecurityInfo 20 from Globals import DTMLFile 21 from ReportClass import ReportClass 22 from Products.ZenRelations.RelSchema import * 23 from Globals import InitializeClass 24 from Products.ZenWidgets import messaging 25 2628 ''' Construct a new MultiGraphreportclass 29 ''' 30 frc = MultiGraphReportClass(id, title) 31 context._setObject(id, frc) 32 if REQUEST is not None: 33 messaging.IMessageSender(self).sendToBrowser( 34 'Organizer Created', 35 'Report organizer %s was created.' % id 36 ) 37 REQUEST['RESPONSE'].redirect(context.absolute_url() + '/manage_main')38 39 addMultiGraphReportClass = DTMLFile('dtml/addMultiGraphReportClass',globals()) 4042 43 portal_type = meta_type = "MultiGraphReportClass" 44 45 # Remove this relationship after version 2.1 46 _relations = ReportClass._relations + ( 47 ('graphDefs', 48 ToManyCont(ToOne, 'Products.ZenModel.GraphDefinition', 'reportClass')), 49 ) 50 51 security = ClassSecurityInfo() 5270 71 72 InitializeClass(MultiGraphReportClass) 7354 ''' Return the class to instantiate for new report classes 55 ''' 56 return MultiGraphReportClass57 58 59 security.declareProtected('Manage DMD', 'manage_addMultiGraphReport')61 """Add an MultiGraph report to this object. 62 """ 63 from Products.ZenModel.MultiGraphReport import MultiGraphReport 64 fr = MultiGraphReport(id) 65 self._setObject(id, fr) 66 if REQUEST: 67 url = '%s/%s/editMultiGraphReport' % (self.getPrimaryUrlPath(), id) 68 return REQUEST['RESPONSE'].redirect(url) 69 return self._getOb(id)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu May 7 11:46:29 2009 | http://epydoc.sourceforge.net |