Changeset 3090 in products for quintagroup.analytics
- Timestamp:
- Mar 31, 2011 11:07:51 AM (13 years ago)
- Location:
- quintagroup.analytics/branches/update_mt/quintagroup/analytics/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.analytics/branches/update_mt/quintagroup/analytics/browser/configure.zcml
r3088 r3090 66 66 /> 67 67 68 <browser:page 69 name="size_stats_path" 70 for="*" 71 permission="zope2.ViewManagementScreens" 72 attribute="getSizeInfoByPath" 73 class=".views.SizeByPath" 74 /> 75 68 76 <browser:resource 69 77 name="stats_style.css" -
quintagroup.analytics/branches/update_mt/quintagroup/analytics/browser/views.py
r3089 r3090 560 560 return self.cat(path=path, Language="all") 561 561 562 def getValidPath(self): 563 portal = self.purl.getPortalObject() 564 return "/%s%s" % (portal.getId(), self.basepath) 565 566 def getSizeInfoByPath(self): 567 """API for chart builder""" 568 path = self.getValidPath() 569 return [{'size': getSize(b), 570 'type': b.portal_type, 571 'path': b.getPath()} \ 572 for b in self._brainsByPath(path)] 573 562 574 def _walk(self, obj, path): 563 575 result = {} … … 595 607 return [] 596 608 597 portal = self.purl.getPortalObject()598 path = "/%s%s" % (portal.getId(), self.basepath)599 600 609 infos = [] 610 path = self.getValidPath() 601 611 for size, brain in self._walk(self.context, path): 602 612 if self.DEBUG or size > 1:
Note: See TracChangeset
for help on using the changeset viewer.