Package ZenWidgets :: Package ZenossPortlets :: Module ZenossPortlets
[hide private]
[frames] | no frames]

Source Code for Module ZenWidgets.ZenossPortlets.ZenossPortlets

 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  import os 
15  from Products.ZenModel.ZenossSecurity import * 
16   
17 -def _portletpath(*args):
18 """ 19 Shortcut, since these all live in the same directory. Portlet needs a path 20 relative to $ZENHOME. 21 """ 22 return os.path.join('Products','ZenWidgets','ZenossPortlets', *args)
23 24 portlets = [ 25 { 26 'sourcepath': _portletpath('HeartbeatsPortlet.js'), 27 'id': 'HeartbeatsPortlet', 28 'title': 'Zenoss Issues', 29 'permission': ZEN_MANAGE_DMD 30 }, 31 { 32 'sourcepath': _portletpath('GoogleMapsPortlet.js'), 33 'id': 'GoogleMapsPortlet', 34 'title': 'Google Maps', 35 'permission': ZEN_VIEW 36 }, 37 { 38 'sourcepath': _portletpath('DeviceIssuesPortlet.js'), 39 'id': 'DeviceIssuesPortlet', 40 'title': 'Device Issues', 41 'permission': ZEN_COMMON 42 }, 43 { 44 'sourcepath': _portletpath('TopLevelOrgsPortlet.js'), 45 'id': 'TopLevelOrgsPortlet', 46 'title': 'Top Level Organizers', 47 'permission': ZEN_VIEW 48 }, 49 { 50 'sourcepath': _portletpath('WatchListPortlet.js'), 51 'id': 'WatchListPortlet', 52 'title': 'Watch List', 53 'permission': ZEN_COMMON 54 }, 55 { 56 'sourcepath': _portletpath('productionStatePortlet.js'), 57 'id': 'ProdStatePortlet', 58 'title': 'Production States', 59 'permission': ZEN_COMMON 60 }, 61 { 62 'sourcepath': _portletpath('userMessagesPortlet.js'), 63 'id': 'UserMsgsPortlet', 64 'title': 'Messages', 65 'permission': ZEN_COMMON 66 }, 67 ] 68
69 -def register_default_portlets(portletmanager):
70 for portlet in portlets: 71 portletmanager.register_portlet(**portlet)
72