This ZenPack introduces a new widget framework for creating portlets and sharing dashboards. Users may define any number of portlets and dashboards, which may be shared globally or with specific groups.
<gallery widths="250px" heights="127px"> default_dashboard.png separate_dashboard.png add_portlet.png edit_dashboard.png </gallery>
By default, a dashboard has three levels of visibility:
- Owner
- Group
- Global
- UserSettings - private dashboards
- GroupSettings - group dashboards
- UserSettingsManager - global dashboards
Note: Dashboard names must be unique in each relationship context. You can not promote a private dashboard named "Test" to global if a global dashboard named "Test" already exists.
The following, default portlets are defined by this ZenPack:
- Site Window - Displays an iframe on the dashboard
- Device Chart (5.x only) - Displays a chart with devices from a specific device class and graph point
- Device Issues - Shows devices which currently have events
- Production State - Shows which devices are in specified production states
- Network Map - D3-forced layout view of the network map
- Open Events Chart - Shows open events grouped by severity
- Google Maps - Enables selecting a location, at which the event severities at that location are displayed
- And more...
- There are no owner-level permissions associated with dashboard objects. Any user may edit a dashboard if they have "Change Device" permission.
- Users with "Add DMD Objects" permission may add a dashboard.
- User with "Delete Objects" permission may remove a dashboard.
- Permissions are checked both on the client and server.
- If the Audit ZenPack is installed, all operations on dashboards are audited.
Portlets are written in Javascript using ExtJS. A portlet consist of one ExtJs class that descends from "Zenoss.Dashboard.view.Portlet". The following example shows a portlet definition.
<syntaxhighlight lang="javascript"> /** * A simple portlet that lets users define custom HTML to be displayed * on the application dashboard. This will execute any javascript that is * written. **/ //1. The portlet must be in the Zenoss.Dashboard.portlets namespace, in which everything is assumed to be a portlet. Ext.define('Zenoss.Dashboard.portlets.HTMLPortlet', { extend: 'Zenoss.Dashboard.view.Portlet', //2. An alias (required) is used to instantiate the portlet when the dashboard is rendered alias: 'widget.htmlportlet', height: 100, //3. The default title displays on the dropdown of available Portlets title: 'HTML Portlet', //4. All default config properties of portlets should be defined on the class content: "<h1>Blank HTMLPortlet</h1>", initComponent: function(){ Ext.apply(this, { html: this.content }); this.callParent(arguments); }, //5. getConfig is called when serializing portlets. It returns the options that are saved on the portlet. // height and refresh rate are included from the parent class getConfig: function() { return { html: this.content }; }, //6. applyConfig is where you apply the configuration to the portlet. This can include updating stores and content. applyConfig: function(config) { if (config.html && config.html != this.content) { this.content = config.html; this.update(config.html, true); } this.callParent([config]); }, //7. Template method for what happens when a portlet refresh is requested. onRefresh: function() { }, //8. Any custom configuration fields for your portlet are defined here. The caller expects an array in return. getCustomConfigFields: function() { var fields = [{ <pre>]; return fields; } }); </syntaxhighlight>The following issues have been identified in the most recent release of this ZenPack.
1. When the visibility of a dashboard is changed, the dashboard name is not checked for uniqueness in the new context.
- 1.0.6
- Added Event Line Chart Portlet
- Ability to fullscreen a portlet
- 1.0.5
- Added searching and devices to the Watch List Portlet
- 1.0.4
- Now includes the Impact portlet
- 1.0.3
- Users without a global role could not access the dashboard
- 1.0.2
- The refresh interval wasn't being updated properly
- 1.0.1
- Now works on IE10 and IE11
- 1.0.0
- Initial Release