You can subscribe to this list here.
2007 |
Jan
|
Feb
(65) |
Mar
(276) |
Apr
(544) |
May
(638) |
Jun
(225) |
Jul
(204) |
Aug
(294) |
Sep
(532) |
Oct
(506) |
Nov
(324) |
Dec
(359) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(208) |
Feb
(225) |
Mar
(248) |
Apr
(388) |
May
(222) |
Jun
(47) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ze...> - 2008-04-18 17:59:20
|
Author: jstevens Date: 2008-04-18 13:59:22 -0400 (Fri, 18 Apr 2008) New Revision: 9037 Modified: trunk/Products/ZenModel/DataRoot.py Log: added getProductName() for UpdateCheck Modified: trunk/Products/ZenModel/DataRoot.py =================================================================== --- trunk/Products/ZenModel/DataRoot.py 2008-04-18 17:58:04 UTC (rev 9036) +++ trunk/Products/ZenModel/DataRoot.py 2008-04-18 17:59:22 UTC (rev 9037) @@ -690,4 +690,14 @@ return self.callZenScreen(REQUEST) + def getProductName(self): + """ + Return a string that represents the Zenoss product that is installed. + Currently this is something like 'core' or 'enterprise'. This is + used in the version check code to retrieve the available version + for the correct product. + """ + return getattr(self, 'productName', 'core') + + InitializeClass(DataRoot) |
From: <sv...@ze...> - 2008-04-18 17:58:13
|
Author: jstevens Date: 2008-04-18 13:58:04 -0400 (Fri, 18 Apr 2008) New Revision: 9036 Modified: trunk/Products/ZenEvents/UpdateCheck.py Log: UpdateCheck now sends product name Modified: trunk/Products/ZenEvents/UpdateCheck.py =================================================================== --- trunk/Products/ZenEvents/UpdateCheck.py 2008-04-18 16:29:26 UTC (rev 9035) +++ trunk/Products/ZenEvents/UpdateCheck.py 2008-04-18 17:58:04 UTC (rev 9036) @@ -37,9 +37,19 @@ class UpdateCheck: - def getUpdate(self, dmd, manual): + def getUpdate(self, dmd, manual, product=None): + """ + Send a GET request to dev.zenoss.org giving some parameters about this + Zenoss installation and getting back the version number for the + most recent product release. The product can be passed in the product + parameter, but if product is None then the code will attempt to + figure out which product is currently running and use that. + """ + if not product: + product = dmd.getProductName() available = None args = {} + args['pr'] = product if dmd.uuid is None: import commands dmd.uuid = commands.getoutput('uuidgen') @@ -74,7 +84,7 @@ args['nl'] = dmd.Locations.countChildren() query = urllib.urlencode(args.items()) - for line in urllib.urlopen(URL + '?' + query): + for line in urllib.urlopen(URL + '?' + query): # skip blank lines and http gunk if line.strip() and line[0] not in '<' + string.whitespace: try: |
From: <sv...@ze...> - 2008-04-18 16:29:36
|
Author: marc Date: 2008-04-18 12:29:26 -0400 (Fri, 18 Apr 2008) New Revision: 9035 Modified: trunk/Products/ZenModel/skins/zenmodel/ipServiceClassStatus.pt trunk/Products/ZenModel/skins/zenmodel/osProcessClassStatus.pt trunk/Products/ZenModel/skins/zenmodel/serviceClassStatus.pt trunk/Products/ZenReports/reports/Device_Reports/All_Monitored_Components.rpt trunk/Products/ZenReports/reports/Performance_Reports/Filesystem_Util_Report.rpt Log: * Fixed bad link to deviceOsDetail, should be on a device rather than an os object * fixes #2983 Modified: trunk/Products/ZenModel/skins/zenmodel/ipServiceClassStatus.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/ipServiceClassStatus.pt 2008-04-18 15:08:25 UTC (rev 9034) +++ trunk/Products/ZenModel/skins/zenmodel/ipServiceClassStatus.pt 2008-04-18 16:29:26 UTC (rev 9035) @@ -84,7 +84,7 @@ </tr> <tr tal:repeat="srv batch"> <td class="tablevalues" - tal:content="structure python:srv.getDeviceLink('os/deviceOsDetail')"/> + tal:content="structure python:srv.getDeviceLink('deviceOsDetail')"/> <td class="tablevalues"> <a tal:attributes="href srv/getPrimaryUrlPath" tal:content="srv/id">tcp-00514</a> Modified: trunk/Products/ZenModel/skins/zenmodel/osProcessClassStatus.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/osProcessClassStatus.pt 2008-04-18 15:08:25 UTC (rev 9034) +++ trunk/Products/ZenModel/skins/zenmodel/osProcessClassStatus.pt 2008-04-18 16:29:26 UTC (rev 9035) @@ -79,7 +79,7 @@ </tr> <tr tal:repeat="proccl batch"> <td class="tablevalues" - tal:content="structure python:proccl.getDeviceLink('os/deviceOsDetail')"/> + tal:content="structure python:proccl.getDeviceLink('deviceOsDetail')"/> <td class="tablevalues"> <a tal:attributes="href proccl/getPrimaryUrlPath" tal:content="proccl/name">tcp-00514</a> Modified: trunk/Products/ZenModel/skins/zenmodel/serviceClassStatus.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/serviceClassStatus.pt 2008-04-18 15:08:25 UTC (rev 9034) +++ trunk/Products/ZenModel/skins/zenmodel/serviceClassStatus.pt 2008-04-18 16:29:26 UTC (rev 9035) @@ -79,7 +79,7 @@ <tr tal:define="odd repeat/srv/odd" tal:attributes="class python:test(odd, 'odd', 'even')"> <td class="tablevalues" - tal:content="structure python:srv.getDeviceLink('os/deviceOsDetail')"/> + tal:content="structure python:srv.getDeviceLink('deviceOsDetail')"/> <td class="tablevalues"> <a tal:attributes="href srv/getPrimaryUrlPath" tal:content="srv/id">tcp-00514</a> Modified: trunk/Products/ZenReports/reports/Device_Reports/All_Monitored_Components.rpt =================================================================== --- trunk/Products/ZenReports/reports/Device_Reports/All_Monitored_Components.rpt 2008-04-18 15:08:25 UTC (rev 9034) +++ trunk/Products/ZenReports/reports/Device_Reports/All_Monitored_Components.rpt 2008-04-18 16:29:26 UTC (rev 9035) @@ -34,7 +34,7 @@ </tr> <tr tal:repeat="comp batch"> <td class="tablevalues" - tal:content="structure python:comp.getDeviceLink('os/deviceOsDetail')"/> + tal:content="structure python:comp.getDeviceLink('deviceOsDetail')"/> <td class="tablevalues"> <a class="tablevalues" tal:attributes="href comp/getPrimaryUrlPath" tal:content="comp/name">smtp</a> Modified: trunk/Products/ZenReports/reports/Performance_Reports/Filesystem_Util_Report.rpt =================================================================== --- trunk/Products/ZenReports/reports/Performance_Reports/Filesystem_Util_Report.rpt 2008-04-18 15:08:25 UTC (rev 9034) +++ trunk/Products/ZenReports/reports/Performance_Reports/Filesystem_Util_Report.rpt 2008-04-18 16:29:26 UTC (rev 9035) @@ -40,7 +40,7 @@ <tal:block tal:repeat="obj batch"> <tr> <td class="tablevalues" - tal:content="structure python:obj.filesystem.getDeviceLink('os/deviceOsDetail')"/> +tal:content="structure python:obj.filesystem.getDeviceLink('deviceOsDetail')"/> <td class="tablevalues"> <a class=tablevalues tal:content="obj/filesystem/mount" tal:attributes="href obj/filesystem/getPrimaryUrlPath"/> |
From: <sv...@ze...> - 2008-04-18 15:08:21
|
Author: cluther Date: 2008-04-18 11:08:25 -0400 (Fri, 18 Apr 2008) New Revision: 9034 Modified: trunk/Products/DataCollector/ApplyDataMap.py Log: * Refs #2938: Skip offending software products until a proper fix can be reached. Modified: trunk/Products/DataCollector/ApplyDataMap.py =================================================================== --- trunk/Products/DataCollector/ApplyDataMap.py 2008-04-18 15:03:32 UTC (rev 9033) +++ trunk/Products/DataCollector/ApplyDataMap.py 2008-04-18 15:08:25 UTC (rev 9034) @@ -228,6 +228,8 @@ except UnicodeEncodeError: decoding = obj.zCollectorDecoding value = value.decode(decoding) + except UnicodeDecodeError: + continue if attname[0] == '_': continue att = getattr(aq_base(obj), attname, zenmarker) if att == zenmarker: |
From: <sv...@ze...> - 2008-04-18 15:03:32
|
Author: rak Date: 2008-04-18 11:03:32 -0400 (Fri, 18 Apr 2008) New Revision: 9033 Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/HeartbeatCall.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/MultiValueAttributeCall.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/OperationCall.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/SingleValueAttributeCall.java trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/Utility.java Log: Fixes #2982: ZenJMX does not work with zenhub older than and including 2.1.3 Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/HeartbeatCall.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/HeartbeatCall.java 2008-04-18 14:52:54 UTC (rev 9032) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/HeartbeatCall.java 2008-04-18 15:03:32 UTC (rev 9033) @@ -19,8 +19,7 @@ import com.zenoss.xmlrpc.XmlRpcClient; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.apache.log4j.Logger; import static com.zenoss.zenpacks.zenjmx.OptionsFactory.*; @@ -43,7 +42,7 @@ private String _component; // logger - private static final Log _logger = LogFactory.getLog(HeartbeatCall.class); + private static final Logger _logger = Logger.getLogger(HeartbeatCall.class); /** Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/MultiValueAttributeCall.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/MultiValueAttributeCall.java 2008-04-18 14:52:54 UTC (rev 9032) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/MultiValueAttributeCall.java 2008-04-18 15:03:32 UTC (rev 9033) @@ -115,7 +115,10 @@ */ public static MultiValueAttributeCall fromValue(Map config) { String url = Utility.getUrl(config); - boolean auth = "True".equals(config.get(AUTHENTICATE)); + boolean auth = false; + if (config.containsKey(AUTHENTICATE)) { + auth = ((Boolean)config.get(AUTHENTICATE)).booleanValue(); + } // ugly form of downcasting... but XML-RPC doesn't give us a List<String> List<String> keys = Utility.downcast((Object[]) config.get(DATA_POINT)); Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/OperationCall.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/OperationCall.java 2008-04-18 14:52:54 UTC (rev 9032) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/OperationCall.java 2008-04-18 15:03:32 UTC (rev 9033) @@ -238,7 +238,10 @@ */ public static OperationCall fromValue(Map config) { String url = Utility.getUrl(config); - boolean auth = "True".equals(config.get(AUTHENTICATE)); + boolean auth = false; + if (config.containsKey(AUTHENTICATE)) { + auth = ((Boolean)config.get(AUTHENTICATE)).booleanValue(); + } String types = (String) config.get(OPERATION_PARAM_TYPES); String[] paramTypes = types.split(DELIMITER); Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/SingleValueAttributeCall.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/SingleValueAttributeCall.java 2008-04-18 14:52:54 UTC (rev 9032) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/SingleValueAttributeCall.java 2008-04-18 15:03:32 UTC (rev 9033) @@ -111,8 +111,11 @@ */ public static SingleValueAttributeCall fromValue(Map config) { String url = Utility.getUrl(config); - boolean auth = "True".equals(config.get(AUTHENTICATE)); - + boolean auth = false; + if (config.containsKey(AUTHENTICATE)) { + auth = ((Boolean)config.get(AUTHENTICATE)).booleanValue(); + } + List<String> types = Utility.downcast((Object[]) config.get(TYPES)); String type = ""; if (types.size() > 0) { Modified: trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/Utility.java =================================================================== --- trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/Utility.java 2008-04-18 14:52:54 UTC (rev 9032) +++ trunk/zenpacks/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/call/Utility.java 2008-04-18 15:03:32 UTC (rev 9033) @@ -52,10 +52,17 @@ */ public static String getUrl(Map config) { String port = get(config, "jmxPort", "zJmxManagementPort"); + String hostAddr = null; + if (config.containsKey("manageIp")) + hostAddr = (String)config.get("manageIp"); + // Support pre-2.1.3+ hub xml-rpc responses. If manageIp is not present + // in configuration, fallback to device, which will have a better chance + // of working than null. + else hostAddr = (String)config.get("device"); + String url = - "service:jmx:rmi:///jndi/rmi://" + - config.get("manageIp") + ":" + port + "/jmxrmi"; + "service:jmx:rmi:///jndi/rmi://" + hostAddr + ":" + port + "/jmxrmi"; return url; } |
From: <sv...@ze...> - 2008-04-18 14:53:02
|
Author: marc Date: 2008-04-18 10:52:54 -0400 (Fri, 18 Apr 2008) New Revision: 9032 Removed: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/dist/ Log: Removed bin files, fixes #2980 Deleted: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.pyc Deleted: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.pyc Deleted: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.pyc Deleted: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.pyc Deleted: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.pyc |
Author: marc Date: 2008-04-18 10:49:50 -0400 (Fri, 18 Apr 2008) New Revision: 9031 Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/INSTALL.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/README.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/PKG-INFO trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/SOURCES.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/dependency_links.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/entry_points.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/namespace_packages.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/not-zip-safe trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/top_level.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/daemons/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/lib/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/lib/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/migrate/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/migrate/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/modeler/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/modeler/plugins/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/objects/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/objects/objects.xml trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/reports/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/editNtpMonitorDataSource.pt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/placeholder.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.pyc trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/bdist.macosx-10.3-fat/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/objects/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/objects/objects.xml trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/editNtpMonitorDataSource.pt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/placeholder.txt trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/__init__.py trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/dist/ trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/dist/ZenPacks.zenoss.NtpMonitor-2.0.0-py2.4.egg trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py Log: Initial revision of NtpMonitor; refs #2980 Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/INSTALL.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/README.txt Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/README.txt ___________________________________________________________________ Name: svn:executable + * Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/__init__.pyc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/__init__.pyc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/NtpMonitorDataSource.pyc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/datasources/__init__.pyc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/lib/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/migrate/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/objects/objects.xml Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/editNtpMonitorDataSource.pt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/placeholder.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.pyc Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks/zenoss/__init__.pyc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/PKG-INFO Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/SOURCES.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/dependency_links.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/entry_points.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/namespace_packages.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/not-zip-safe Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/ZenPacks.zenoss.NtpMonitor.egg-info/top_level.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/objects/objects.xml Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/editNtpMonitorDataSource.pt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/NtpMonitor/skins/ZenPacks.zenoss.NtpMonitor/placeholder.txt Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/build/lib/ZenPacks/zenoss/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/dist/ZenPacks.zenoss.NtpMonitor-2.0.0-py2.4.egg Property changes on: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/dist/ZenPacks.zenoss.NtpMonitor-2.0.0-py2.4.egg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/zenpacks/ZenPacks.zenoss.NtpMonitor/setup.py |
Author: jstevens Date: 2008-04-17 15:01:37 -0400 (Thu, 17 Apr 2008) New Revision: 9030 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py Log: refs #2978 Modified: trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.ApacheMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -16,7 +16,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.ApacheMonitor' VERSION = '2.0.0' -AUTHOR = 'Zenoss Team' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.ApacheMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.DellMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -16,7 +16,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.DellMonitor' VERSION = '2.0.0' -AUTHOR = 'Zenoss Team' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.DellMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.DnsMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -16,7 +16,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.DnsMonitor' VERSION = '2.0.0' -AUTHOR = 'Zenoss Team' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.DnsMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.HPMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -16,7 +16,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.HPMonitor' VERSION = '2.0.0' -AUTHOR = 'Zenoss Team' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.HPMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.HttpMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -15,8 +15,8 @@ # These variables are overwritten by Zenoss when the ZenPack is exported # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.HttpMonitor' -VERSION = '2.2.0' -AUTHOR = 'Zenoss Team' +VERSION = '2.0.0' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.HttpMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -3,7 +3,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.IRCDMonitor' VERSION = '1.0' -AUTHOR = '' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.IRCDMonitor'] Modified: trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py 2008-04-17 17:02:20 UTC (rev 9029) +++ trunk/zenpacks/ZenPacks.zenoss.MySqlMonitor/setup.py 2008-04-17 19:01:37 UTC (rev 9030) @@ -16,7 +16,7 @@ # or saved. Do not modify them directly here. NAME = 'ZenPacks.zenoss.MySqlMonitor' VERSION = '2.0.0' -AUTHOR = 'Zenoss Team' +AUTHOR = 'Zenoss' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss'] PACKAGES = ['ZenPacks', 'ZenPacks.zenoss', 'ZenPacks.zenoss.MySqlMonitor'] |
From: <sv...@ze...> - 2008-04-17 17:02:15
|
Author: jstevens Date: 2008-04-17 13:02:20 -0400 (Thu, 17 Apr 2008) New Revision: 9029 Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz Log: * new zenpacksupport Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz =================================================================== (Binary files differ) |
From: <sv...@ze...> - 2008-04-17 16:59:53
|
Author: chris Date: 2008-04-17 12:59:59 -0400 (Thu, 17 Apr 2008) New Revision: 9028 Modified: trunk/zenpacksupport/setup.py Log: * checkin for jason Modified: trunk/zenpacksupport/setup.py =================================================================== --- trunk/zenpacksupport/setup.py 2008-04-17 16:58:21 UTC (rev 9027) +++ trunk/zenpacksupport/setup.py 2008-04-17 16:59:59 UTC (rev 9028) @@ -11,8 +11,7 @@ # ########################################################################### -import Globals -from setuptools import setup, find_packages +from setuptools import setup # This has the list of zenpack_info setup keywords import zenpacksupport @@ -26,7 +25,6 @@ license = 'GPLv2', py_modules=['zenpacksupport'], - #packages = find_packages(), entry_points = { 'distutils.setup_keywords': @@ -36,4 +34,4 @@ 'zenpack_info = zenpacksupport:WriteZenPackInfo', ], }, -) \ No newline at end of file +) |
From: <sv...@ze...> - 2008-04-17 16:58:22
|
Author: cluther Date: 2008-04-17 12:58:21 -0400 (Thu, 17 Apr 2008) New Revision: 9027 Modified: trunk/Products/ZenEvents/SyslogProcessing.py Log: * Fixes #2977: Parse empty UNIX syslog messages properly. Modified: trunk/Products/ZenEvents/SyslogProcessing.py =================================================================== --- trunk/Products/ZenEvents/SyslogProcessing.py 2008-04-17 14:46:41 UTC (rev 9026) +++ trunk/Products/ZenEvents/SyslogProcessing.py 2008-04-17 16:58:21 UTC (rev 9027) @@ -45,7 +45,7 @@ r"device_id=\S+\s+\[\S+\](?P<eventClassKey>\S+\d+):\s+(?P<summary>.*)\s+\((?P<originalTime>\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)\)", # unix syslog with pid -r"(?P<component>\S+)\[(?P<pid>\d+)\]: (?P<summary>.*)", +r"(?P<component>\S+)\[(?P<pid>\d+)\]:\s*(?P<summary>.*)", # unix syslog without pid r"(?P<component>\S+): (?P<summary>.*)", |
From: <sv...@ze...> - 2008-04-17 14:46:39
|
Author: jstevens Date: 2008-04-17 10:46:41 -0400 (Thu, 17 Apr 2008) New Revision: 9026 Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz Log: * Updating zenpacksupport Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz =================================================================== (Binary files differ) |
From: <sv...@ze...> - 2008-04-17 14:45:00
|
Author: jstevens Date: 2008-04-17 10:44:57 -0400 (Thu, 17 Apr 2008) New Revision: 9025 Modified: trunk/zenpacksupport/zenpacksupport.py Log: * Adding in the prevZenPackName setup argument Modified: trunk/zenpacksupport/zenpacksupport.py =================================================================== --- trunk/zenpacksupport/zenpacksupport.py 2008-04-17 13:15:50 UTC (rev 9024) +++ trunk/zenpacksupport/zenpacksupport.py 2008-04-17 14:44:57 UTC (rev 9025) @@ -17,6 +17,7 @@ # This is the list of metadata fields specific to zenpacks metaDataKeywords = [ 'compatZenossVers', # The spec for the required version of Zenoss + 'prevZenPackName', # Previous name of this zenpack ] |
From: <sv...@ze...> - 2008-04-17 13:23:48
|
Author: edahl Date: 2008-04-17 09:15:50 -0400 (Thu, 17 Apr 2008) New Revision: 9024 Added: trunk/Products/ZenModel/migrate/runcommandspermission.py Log: * Doh! for got to add the file for the run permissions thing Added: trunk/Products/ZenModel/migrate/runcommandspermission.py |
Author: mray Date: 2008-04-16 19:05:03 -0400 (Wed, 16 Apr 2008) New Revision: 9023 Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/daemons/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/datasources/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/datasources/IRCDMonitorDataSource.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/datasources/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/lib/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/lib/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/libexec/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/libexec/check_ircd.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/migrate/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/migrate/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/modeler/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/modeler/plugins/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/objects/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/reports/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/skins/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/skins/ZenPacks.zenoss.IRCDMonitor/ trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/skins/ZenPacks.zenoss.IRCDMonitor/editIRCDMonitorDataSource.pt trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/__init__.py trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py Log: Fix for #2973. IRC monitoring is finally here. Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/datasources/IRCDMonitorDataSource.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/datasources/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/lib/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/libexec/check_ircd.py Property changes on: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/libexec/check_ircd.py ___________________________________________________________________ Name: svn:executable + * Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/migrate/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/IRCDMonitor/skins/ZenPacks.zenoss.IRCDMonitor/editIRCDMonitorDataSource.pt Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/ZenPacks/zenoss/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.IRCDMonitor/setup.py |
From: <sv...@ze...> - 2008-04-16 22:44:09
|
Author: edahl Date: 2008-04-16 18:43:27 -0400 (Wed, 16 Apr 2008) New Revision: 9022 Modified: trunk/Products/ZenModel/Commandable.py trunk/Products/ZenModel/ZenossSecurity.py trunk/Products/ZenModel/ZentinelPortal.py trunk/Products/ZenModel/migrate/__init__.py trunk/Products/ZenModel/skins/zenmodel/userCommandsMacros.pt Log: * fixes #559 - run commands menu didn't check proper permissions. Modified: trunk/Products/ZenModel/Commandable.py =================================================================== --- trunk/Products/ZenModel/Commandable.py 2008-04-16 21:54:01 UTC (rev 9021) +++ trunk/Products/ZenModel/Commandable.py 2008-04-16 22:43:27 UTC (rev 9022) @@ -93,7 +93,7 @@ return self.redirectToUserCommands(REQUEST) - security.declareProtected(ZEN_CHANGE_DEVICE, 'manage_doUserCommand') + security.declareProtected(ZEN_RUN_COMMANDS, 'manage_doUserCommand') def manage_doUserCommand(self, commandId=None, REQUEST=None): ''' Execute a UserCommand. If REQUEST then wrap output in proper zenoss html page. Modified: trunk/Products/ZenModel/ZenossSecurity.py =================================================================== --- trunk/Products/ZenModel/ZenossSecurity.py 2008-04-16 21:54:01 UTC (rev 9021) +++ trunk/Products/ZenModel/ZenossSecurity.py 2008-04-16 22:43:27 UTC (rev 9022) @@ -54,6 +54,8 @@ ZEN_ZPROPERTIES_VIEW='zProperties View' ZEN_EDIT_LOCAL_TEMPLATES='Edit Local Templates' +ZEN_RUN_COMMANDS = 'Run Commands' + # Administrate ZEN_DEFINE_COMMANDS_EDIT='Define Commands Edit' ZEN_DEFINE_COMMANDS_VIEW='Define Commands View' Modified: trunk/Products/ZenModel/ZentinelPortal.py =================================================================== --- trunk/Products/ZenModel/ZentinelPortal.py 2008-04-16 21:54:01 UTC (rev 9021) +++ trunk/Products/ZenModel/ZentinelPortal.py 2008-04-16 22:43:27 UTC (rev 9022) @@ -253,6 +253,7 @@ mp(ZEN_ZPROPERTIES_VIEW, [ZEN_MANAGER_ROLE, MANAGER_ROLE, ZEN_USER_ROLE], 1) mp(ZEN_EDIT_LOCAL_TEMPLATES, [ZEN_MANAGER_ROLE, MANAGER_ROLE], 1) + mp(ZEN_RUN_COMMANDS, [ZEN_USER_ROLE, ZEN_MANAGER_ROLE, MANAGER_ROLE], 1) mp(ZEN_DEFINE_COMMANDS_EDIT, [ZEN_MANAGER_ROLE, MANAGER_ROLE], 1) mp(ZEN_DEFINE_COMMANDS_VIEW, [ZEN_MANAGER_ROLE, MANAGER_ROLE, ZEN_USER_ROLE], 1) Modified: trunk/Products/ZenModel/migrate/__init__.py =================================================================== --- trunk/Products/ZenModel/migrate/__init__.py 2008-04-16 21:54:01 UTC (rev 9021) +++ trunk/Products/ZenModel/migrate/__init__.py 2008-04-16 22:43:27 UTC (rev 9022) @@ -142,4 +142,4 @@ import discovernetworkmenuitem import fixManufacturersLocation import addeventmenuitem - +import runcommandspermission Modified: trunk/Products/ZenModel/skins/zenmodel/userCommandsMacros.pt =================================================================== --- trunk/Products/ZenModel/skins/zenmodel/userCommandsMacros.pt 2008-04-16 21:54:01 UTC (rev 9021) +++ trunk/Products/ZenModel/skins/zenmodel/userCommandsMacros.pt 2008-04-16 22:43:27 UTC (rev 9022) @@ -90,8 +90,9 @@ <tal:block metal:define-macro="runCommandMenu" - tal:condition="python: here.meta_type in - ['DeviceClass','Device','Location','DeviceGroup','System','Software']"> + tal:condition="python: here.has_permission('Run Commands', here) and + here.meta_type in ['DeviceClass','Device','Location', + 'DeviceGroup','System','Software']"> <li tal:define="commandIds here/getUserCommandIds"> <form name="command_proxy" method="post" tal:define="mypath here/getPrimaryUrlPath" |
From: <sv...@ze...> - 2008-04-16 21:53:55
|
Author: noel Date: 2008-04-16 17:54:01 -0400 (Wed, 16 Apr 2008) New Revision: 9021 Modified: trunk/Products/ZenEvents/skins/zenevents/editEventViews.pt Log: *adds the rainbow Modified: trunk/Products/ZenEvents/skins/zenevents/editEventViews.pt =================================================================== --- trunk/Products/ZenEvents/skins/zenevents/editEventViews.pt 2008-04-16 21:42:17 UTC (rev 9020) +++ trunk/Products/ZenEvents/skins/zenevents/editEventViews.pt 2008-04-16 21:54:01 UTC (rev 9021) @@ -51,8 +51,37 @@ here)" tal:content="view/getId"/> <td class="tablevalues" tal:content="view/type"/> - <td class="tablevalues"> - <table class=" zentable" border=0 cellpadding=0 cellspacing=1 + <td class="tablevalues" width="300"> +<tal:block metal:define-macro="horizontal"> +<tal:block tal:define=" + zem python:view.ZenEventManager; + colors python:'red orange yellow blue grey green'.split(); + summaries python:view.getEventSummary(); + totals python:[x[2] for x in summaries]; + ackstatus python:[x[2]-x[1] for x in summaries]; + "> + <div class="horizontal-rainbow" + onclick="location.href=YAHOO.zenoss.templateFreeURL+'/viewEvents'"> + <tal:block tal:repeat="evnum python:totals[:-1]"> + <div tal:define="color python:colors[repeat['evnum'].index]" + tal:attributes="class string:evpill-${color}" + style="float:left"> + <span tal:content="evnum">0</span> + <div tal:condition="python:ackstatus[repeat['evnum'].index]<=0"> + </div> + </div> + </tal:block> + <div class="evpill-green" style="float:left"> + <div tal:condition="python:filter(lambda x:x, + map(int, totals[:-1]))"> + </div> + </div> + </div> +</tal:block> +</tal:block> + + <!-- + <table class=" zentable" border=0 cellpadding=0 cellspacing=1 metal:define-macro="eventrainbow" tal:on-error="structure string: <span class='errorvalues'>Events unavailable</span>"> @@ -64,7 +93,7 @@ </td> </tr> </table> - +--> </td> </tr> </tal:block> |
From: <sv...@ze...> - 2008-04-16 21:42:09
|
Author: ian Date: 2008-04-16 17:42:17 -0400 (Wed, 16 Apr 2008) New Revision: 9020 Modified: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py Log: * Refs #2972: Added ZenPackPersistence Modified: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py =================================================================== --- trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py 2008-04-16 20:33:17 UTC (rev 9019) +++ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py 2008-04-16 21:42:17 UTC (rev 9020) @@ -11,14 +11,15 @@ # ########################################################################### +from AccessControl import ClassSecurityInfo, Permissions import Products.ZenModel.RRDDataSource as RRDDataSource -from AccessControl import ClassSecurityInfo, Permissions +from Products.ZenModel.ZenPackPersistence import ZenPackPersistence from Products.ZenUtils.ZenTales import talesCompile, getEngine - -class DigMonitorDataSource(RRDDataSource.RRDDataSource): +class DigMonitorDataSource(ZenPackPersistence, RRDDataSource.RRDDataSource): + ZENPACKID = 'ZenPacks.zenoss.DigMonitor' DIG_MONITOR = 'DigMonitor' sourcetypes = (DIG_MONITOR,) |
From: <sv...@ze...> - 2008-04-16 20:33:12
|
Author: edahl Date: 2008-04-16 16:33:17 -0400 (Wed, 16 Apr 2008) New Revision: 9019 Modified: trunk/Products/ZenModel/Device.py Log: * take out duplicate import Modified: trunk/Products/ZenModel/Device.py =================================================================== --- trunk/Products/ZenModel/Device.py 2008-04-16 20:16:09 UTC (rev 9018) +++ trunk/Products/ZenModel/Device.py 2008-04-16 20:33:17 UTC (rev 9019) @@ -37,7 +37,6 @@ from DateTime import DateTime from ZODB.POSException import POSError -from ZenossSecurity import * #from Products.SnmpCollector.SnmpCollector import findSnmpCommunity from Products.DataCollector.ApplyDataMap import ApplyDataMap @@ -1971,6 +1970,6 @@ adm = ApplyDataMap() return adm._applyDataMap(self, relmap) - - + + InitializeClass(Device) |
Author: cgibbons Date: 2008-04-16 16:16:09 -0400 (Wed, 16 Apr 2008) New Revision: 9018 Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/INSTALL.txt trunk/zenpacks/ZenPacks.zenoss.DigMonitor/README.txt trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/daemons/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/lib/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/lib/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/migrate/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/migrate/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/modeler/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/modeler/plugins/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/objects/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/objects/objects.xml trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/reports/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/skins/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/skins/ZenPacks.zenoss.DigMonitor/ trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/skins/ZenPacks.zenoss.DigMonitor/editDigMonitorDataSource.pt trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/__init__.py trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py Log: * Fixes #2972 : new ZenPack for monitoring DNS response time with the Nagios check_dig command Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/INSTALL.txt Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/README.txt Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/DigMonitorDataSource.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/datasources/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/lib/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/migrate/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/objects/objects.xml Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/DigMonitor/skins/ZenPacks.zenoss.DigMonitor/editDigMonitorDataSource.pt Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/ZenPacks/zenoss/__init__.py Added: trunk/zenpacks/ZenPacks.zenoss.DigMonitor/setup.py |
From: <sv...@ze...> - 2008-04-16 18:14:50
|
Author: jstevens Date: 2008-04-16 14:14:57 -0400 (Wed, 16 Apr 2008) New Revision: 9017 Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz Log: * fixing wrong dir name in zenpacksupport Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz =================================================================== (Binary files differ) |
From: <sv...@ze...> - 2008-04-16 18:05:51
|
Author: jstevens Date: 2008-04-16 14:05:58 -0400 (Wed, 16 Apr 2008) New Revision: 9016 Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz Log: latest version of zenpacksupport egg Modified: trunk/inst/externallibs/zenpacksupport-1.0.tar.gz =================================================================== (Binary files differ) |
From: <sv...@ze...> - 2008-04-16 16:40:52
|
Author: abray Date: 2008-04-16 11:50:19 -0400 (Wed, 16 Apr 2008) New Revision: 9014 Added: trunk/zendocs/DevGuide/devguide/XDataCollection.xml trunk/zendocs/DevGuide/devguide/extenddata-collector.xml trunk/zendocs/DevGuide/devguide/extenddata-creating.xml trunk/zendocs/DevGuide/devguide/extenddata-perf.xml trunk/zendocs/DevGuide/devguide/extenddata-thresh.xml trunk/zendocs/DevGuide/devguide/extenddata-zenhub.xml trunk/zendocs/DevGuide/devguide/zendmd.xml Modified: trunk/zendocs/DevGuide/devguide/ZenossDevelopersGuide.xml trunk/zendocs/DevGuide/devguide/codeleveldocs.xml trunk/zendocs/DevGuide/devguide/codingguidelines.xml trunk/zendocs/DevGuide/devguide/ui.xml Log: additions to the Devguide Added: trunk/zendocs/DevGuide/devguide/XDataCollection.xml Modified: trunk/zendocs/DevGuide/devguide/ZenossDevelopersGuide.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/ZenossDevelopersGuide.xml 2008-04-16 12:47:27 UTC (rev 9013) +++ trunk/zendocs/DevGuide/devguide/ZenossDevelopersGuide.xml 2008-04-16 15:50:19 UTC (rev 9014) @@ -10,13 +10,15 @@ <xi:include href="introduction.xml" xpointer="introduction" /> + <xi:include href="codeleveldocs.xml" xpointer="codedocs" /> + <xi:include href="codingguidelines.xml" xpointer="codingguidelines" /> <xi:include href="techniques.xml" xpointer="techniques" /> <xi:include href="device_management.xml" xpointer="device_management" /> - <xi:include href="codeleveldocs.xml" xpointer="codedocs" /> + <xi:include href="zendmd.xml" xpointer="zendmd" /> <xi:include href="zenpacks.xml" xpointer="zenpacks" /> Modified: trunk/zendocs/DevGuide/devguide/codeleveldocs.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/codeleveldocs.xml 2008-04-16 12:47:27 UTC (rev 9013) +++ trunk/zendocs/DevGuide/devguide/codeleveldocs.xml 2008-04-16 15:50:19 UTC (rev 9014) @@ -11,8 +11,8 @@ <section> <title>Where it is Available</title> - <para>Where can you ge the actual documentation for all of the function in - the code?</para> + <para>Where can you get the actual documentation for all of the function + in the code?</para> <para>There are a few places:</para> Modified: trunk/zendocs/DevGuide/devguide/codingguidelines.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/codingguidelines.xml 2008-04-16 12:47:27 UTC (rev 9013) +++ trunk/zendocs/DevGuide/devguide/codingguidelines.xml 2008-04-16 15:50:19 UTC (rev 9014) @@ -12,49 +12,16 @@ <section> <title>Style Guidelines</title> - <para>These guidelines are mostly targeted at Python files. HTML files, + <para>These following guidelines are targeted at Python files. HTML files, zpt files, shell scripts, etc should adhere to these as much as is - reasonable and conventional in those languages.</para> + reasonable and conventional in those languages. Currently, we follow + Guido's "Style Guide for Python Code" which is detailed in PEP 8 (Python + Enhancement Proposals) </para> - <itemizedlist> - <listitem> - <para><emphasis role="bold">Indentation</emphasis> - Each level of - indentation in Python files is 4 spaces. Tab characters are strictly - verboten, their use will bring shame and ridicule upon the - perpetrator.</para> + <para>http://www.python.org/dev/peps/pep-0008/</para> - <para></para> - </listitem> - - <listitem> - <para><emphasis role="bold">File Header</emphasis> - Most files should - contain a standard Zenoss header at or near the top which contains - copyright and licensing notices. This header may be different - depending on whether the file is part of Core, Enterprise or a - ZenPack. Headers are not currently used for most html, zpt and dtml - files.</para> - - <para></para> - </listitem> - - <listitem> - <para><emphasis role="bold">Vertical Spacing</emphasis> - Every - method, function and class definition should be preceded by two blank - lines. Small functions defined within another function or method are - excepted from this.</para> - - <para></para> - </listitem> - - <listitem> - <para><emphasis role="bold">Identifiers</emphasis> - Most identifier - names should usually be CamelCase. Constants are - ALL_CAPS_WITH_UNDERSCORES as needed. ClassNames and FunctionNames - begin with a capital. methodNames and variableNames begin lower case. - Choose significant names as identifiers without creating ridiculously - long names for us all to type repeatedly.</para> - </listitem> - </itemizedlist> + <para>Any style conventions that stray from PEP-8 should be annotated in + this document. </para> </section> <section> @@ -113,27 +80,60 @@ <para>Docstrings begin on the line immediately following the function definition and are indented one level from the definition. The first and last lines of the docstring are three double quotes and a newline. One - blank line separates the description from the doctest section. The code + blank line separates the description from the epydoc section. Another + blank line separates the epydoc section from the doctest section. The code for the function begins on the line immediately following the docstring. Example:</para> <para><programlisting>def TruncateStrings(longStrings, maxLength): - """ - Foo truncates all the strings in a list to a maximum length. longStrings is any - iterable object which returns zero or more strings. maxLength is the length to - which each element from longStrings should be truncated. TruncateStrings returns a - new list with the elements from longStrings in the same order but possibly - truncated. + """ + Foo truncates all the strings in a list to a maximum length. longStrings is any + iterable object which returns zero or more strings. maxLength is the length to + which each element from longStrings should be truncated. - >>> from Products.SomeModule import TruncateStrings - >>> TruncateStrings(['abcd', 'efg', 'hi', ''], 3) - ['abc', 'efg', 'hi', ''] - >>> TruncateStrings([], 5) - [] - """ - return [s[:maxLength] for s in longStrings]</programlisting>The easiest - way to create the doctest portion is from within zendmd. Except for the + @param longStrings: an iterable object which returns zero or more strings + @param maxLength: the length to which each element from longStrings should be truncated + @type maxLength: int + @return: Elements from longStrings in the same order but possibly truncated + @rtype: list + @todo: Add more epydoc attributes! + + >>> from Products.SomeModule import TruncateStrings + >>> TruncateStrings(['abcd', 'efg', 'hi', ''], 3) + ['abc', 'efg', 'hi', ''] + >>> TruncateStrings([], 5) + [] + """ + return [s[:maxLength] for s in longStrings]</programlisting>The easiest way + to create the doctest portion is from within zendmd. Except for the indentation, the docstring should exactly match commands and output from a zendmd session.</para> + + <para>Use the available epydoc fields where they are applicable. Some of + the useful common field are:</para> + + <para>@param <param name>: Describe the parameter</para> + + <para>@type <param name>: Data type of the parameter</para> + + <para>@return: Describe the return value</para> + + <para>@rtype: Data type of the return value</para> + + <para>@permission: Zope permission that the method requires</para> + + <para>@todo: Todo for this method</para> + + <para></para> + + <para>The full list of available fields are listed here:</para> + + <para>http://epydoc.sourceforge.net/manual-fields.html</para> + + <para>NOTE: Within the description section of the docstring, you may use + the string "DEPRECATED" on its on line to denote the method as + deprecated.</para> + + <para></para> </section> </chapter> \ No newline at end of file Added: trunk/zendocs/DevGuide/devguide/extenddata-collector.xml Added: trunk/zendocs/DevGuide/devguide/extenddata-creating.xml Added: trunk/zendocs/DevGuide/devguide/extenddata-perf.xml Added: trunk/zendocs/DevGuide/devguide/extenddata-thresh.xml Added: trunk/zendocs/DevGuide/devguide/extenddata-zenhub.xml Modified: trunk/zendocs/DevGuide/devguide/ui.xml =================================================================== --- trunk/zendocs/DevGuide/devguide/ui.xml 2008-04-16 12:47:27 UTC (rev 9013) +++ trunk/zendocs/DevGuide/devguide/ui.xml 2008-04-16 15:50:19 UTC (rev 9014) @@ -16,6 +16,204 @@ <section> <title>Writing a ZPT in Zenoss</title> + <para>ZOPE 2 TEMPLATING EXPLAINED AS BEST AS CAN BE HOPED</para> + + <para>Templates live in layers which, due to Zope magic, are available + anywhere in the object tree. As is the case with most templating + languages, Zope templates are context-agnostic, meaning that they may be + used as views on any object. When the name of a template is called against + a particular context, the skins tool (/zport/portal_skins in Zenoss) will + supply the appropriate template object, determined by the priority of the + layers -- given two templates with the same name, that in the higher + priority layer will prevail. This allows Zope products to override the + templates of other products to provide different functionality. It can + also result in total confusion as to the source of a template, as this + process is in no way transparent.</para> + + <para>Templates may be created in the ZODB, or they may live on the + filesystem; the latter is preferable for all but the most ad hoc + situations. Typically, a Zope product that provides templates will + register a 'skins' directory, which will include one or more layers. When + the product is initialized, the layers it provides will be added to the + skins tool under whatever skin is specified. Zenoss has a single skin, so + only the order of the layers determines template inheritance.</para> + + <para>The Zenoss UI comprises several layers, mostly for the purposes of + organization. The ZenModel and ZenEvents products each have a layer (named + 'zenmodel' and 'zenevents,' respectively), the ZenUtils product has one + (inexplicably located at ZenUtils/js), and the ZenWidgets product has two + ('zentablemanager' and 'zenui'). zenmodel and zenevents generally contain + templates applicable to classes provided by their respective products. The + zenui layer contains most of the dialog templates, nearly all of the CSS, + Javascript and image files (including the YUI library) and other templates + that don't necessarily belong to a single product. The zentablemanager + layer provides resources related to ZenTableManager. The ZenUtils/js layer + provides the MochiKit library and a few Javascript utilities. Both the + zentablemanager layer and the ZenUtils/js layer are legacies and shouldn't + be modified. All new templates should go in one of the other three, and + all static browser resources should go in zenui.</para> + + <para>Zope page templates are a combination of METAL, TAL and TALES, each + of which is summarized more succinctly than one familiar with them might + expect here: </para> + + <para> http://www.owlfish.com/software/simpleTAL/tal-guide.html </para> + + <para>In short: METAL allows templates to define macros (which are + essentially subtemplates that may be called by other templates) and slots + (which may be filled by other templates). For example, one wishing to have + a title on all pages might create the following base.pt:</para> + + <para><programlisting> <html metal:define-macro="base_template"> + <head> + <title> + Zenoss: + <tal:block metal:define-slot="subtitle"> + Default Subtitle + </tal:block> + </title> + </head> + <body> + <tal:block metal:define-slot="content"> + Default Content + </tal:block> + </body> + </html></programlisting>Then on a template that might be used to + view an object, one could: </para> + + <para><programlisting> <tal:block metal:use-macro="here/base/macros/base_template"> + <tal:block metal:fill-slot="subtitle"> + My Subtitle + </tal:block> + <tal:block metal:fill-slot="content"> + My Content + </tal:block> + </tal:block></programlisting>This allows for relatively complex + abstraction. </para> + + <para>Zenoss has a base template providing several basic page types that + include global CSS and javascript resources, the basic page structure, and + optionally the tab pane. This template is located at + ZenModel/skins/zenmodel/templates.pt. Typically, when creating a new + template, find another like it and copy the templates.pt macro reference + used there.</para> + + <para>TAL comprises a set of attributes for page elements allowing for + iteration loops, dynamic attribute mutation, and other dynamic content. + The above resource will summarize these more fully. </para> + + <para>TALES allows access to the template's namespace. Some useful + properties available on all templates:</para> + + <para> here: the context object </para> + + <para> container: the folder containing the context object </para> + + <para> template: the template object </para> + + <para> root: the portal object (zport) </para> + + <para> user: the current authenticated user object </para> + + <para> request: the current HttpRequest object </para> + + <para> portal_url: the base url of the portal + ('http://localhost:8080/zport') </para> + + <para>TALES accepts paths (e.g. here/id) which it resolves into object + properties. It will attempt to resolve the final path element as a key + index, a key name, an attribute, or a callable. For example, if 'mydict' + is a dictionary on the context, 'here/mydict/mykey' will return + mydict[mykey]. If 'getSomething' is a method on the context, + 'here/getSomething' will return the result of that method. However, if + here.getSomething() returns a dictionary, one cannot do + 'here/getSomething/mykey'. </para> + + <para>The path resolution is fairly limited -- for example, one cannot + pass arguments to methods. In case something more complex is needed, one + can use 'python:' followed by arbitrary Python code. For example, + 'python:here.mydict[mykey]' will return the same thing as + 'here/mydict/mykey', while 'python:here.getSomething(template.id)' is not + possible using a path. The previous paragraph's impossible + 'here/getSomething/mykey' can be resolved this way: + 'python:here.getSomething()[mykey]'.</para> + + <para>Finally, if one wishes to generate a string, one may prepend the + argument with 'string:'. Everything after that will be treated as a + string, unless contained within ${}, in which case it will be evaluated as + a TALES path. For example: <span tal:content='string:The name of this + template is ${template/id}'/></para> + + <para>A few final points:</para> + + <itemizedlist> + <listitem> + <para>ZPT ignores everything inside a <script> tag, although it + does not ignore TAL defined on the tag itself. This can make dynamic + Javascript problematic. One way around this, however, is like + this:</para> + + <para><programlisting> <script tal:content="string: + var templateId = '${template/id}'; + "></script></programlisting>This is obviously unwieldy, + especially in the case of several levels of nested quotes, but it at + least allows Javascript access to the template's namespace.</para> + </listitem> + + <listitem> + <para>Slots on macros are /not/ inherited unless specifically defined. + For example, if one has a template base.pt:</para> + + <para><programlisting> <tal:block metal:define-macro="base"> + My Base Template + <span metal:define-slot="content">Default Content</span> + </tal:block></programlisting> from which one wishes to create a + more specific base template, plaintext.pt:</para> + + <para><programlisting> <tal:block metal:define-macro="plaintext"> + <style>body{font-family:Courier,monospace}</style> + <tal:block metal:use-macro="here/base/macros/base"/> + </tal:block></programlisting> templates calling + here/plaintext/macros/plaintext will not be able to fill + here/base/macros/base's 'content' slot. One must chain the slots, + defining a plaintext content slot inside the fill of base's content + slot:</para> + + <para><programlisting> <tal:block metal:define-macro="plaintext"> + <style>body{font-family:Courier,monospace}</style> + <tal:block metal:use-macro="here/base/macros/base"> + + <tal:block metal:fill-slot="content"> + <tal:block metal:define-slot="content"> + </tal:block> + </tal:block> + + </tal:block> + </tal:block></programlisting></para> + </listitem> + + <listitem> + <para>Thanks to Zope's magical acquisition, templates can be treated + as methods on objects. If an object may be viewed at + /zport/dmd/object/mytemplate, then calling:</para> + + <para><programlisting> object.mytemplate() +</programlisting>in a Python file will return the HTML that template + generates. In this case, however, there's no request object, so + templates that ask for one will throw an error. This is both a + blessing and a curse; many man-hours have been wasted searching for + methods that do not exist.</para> + + <para></para> + </listitem> + + <listitem> + <para>Generally, unless a specific tag is required, use + <tal:block> for purely logical structures, as it will produce no + side effects (whereas using <div> could easily do so).</para> + </listitem> + </itemizedlist> + <para></para> </section> Added: trunk/zendocs/DevGuide/devguide/zendmd.xml |
From: <sv...@ze...> - 2008-04-16 16:38:57
|
Author: ian Date: 2008-04-16 11:53:22 -0400 (Wed, 16 Apr 2008) New Revision: 9015 Added: trunk/Products/ZenModel/migrate/addeventmenuitem.py Modified: trunk/Products/ZenModel/migrate/__init__.py Log: * Fixes #2971: Adds menu item to event console Modified: trunk/Products/ZenModel/migrate/__init__.py =================================================================== --- trunk/Products/ZenModel/migrate/__init__.py 2008-04-16 15:50:19 UTC (rev 9014) +++ trunk/Products/ZenModel/migrate/__init__.py 2008-04-16 15:53:22 UTC (rev 9015) @@ -141,3 +141,5 @@ import custschemamenuitemrestriction import discovernetworkmenuitem import fixManufacturersLocation +import addeventmenuitem + Added: trunk/Products/ZenModel/migrate/addeventmenuitem.py |
From: <sv...@ze...> - 2008-04-16 13:02:25
|
Author: ecn Date: 2008-04-16 08:47:27 -0400 (Wed, 16 Apr 2008) New Revision: 9013 Modified: trunk/Products/DataCollector/tests/ Log: * ignore .pyc files Property changes on: trunk/Products/DataCollector/tests ___________________________________________________________________ Name: svn:ignore + *.pyc |