Bespoke Dashboard Reporting - Eonic/ProteanCMS GitHub Wiki
If the site does not have an admin/adminmenu.xml
file, create it with the following content:
<AdminMenu>
<MenuItem name="Admin Home" cmd="AdmHome" display="true">
<Module name="Trade Applications For Approval" template="SingleMetric" jsonURL="/ewapi/Cms.Admin/QueryValue?query=TradeApplications" url="/?ewCmd=ListUsers&parid=2902"/>
</MenuItem>
</AdminMenu>
-
Dashboard Box Name:
The string "Trade Applications For Approval" is the name of the box that will appear on the dashboard. -
Configuration Setting:
The term "TradeApplications" refers to a setting inprotean.cms.config
that contains the name of a stored procedure. For security reasons, we do not pass the name of the stored procedure directly. -
Stored Procedure Functionality:
The stored procedure should return a single value. Below is an example stored procedure that returns the number of users in a group with an ID of 2902:
CREATE PROCEDURE spTradeApplications
AS
BEGIN
SET NOCOUNT ON;
SELECT COUNT(nDirParentId) FROM tblDirectoryRelation WHERE nDirParentId = 2902
END
GO
The URL in the MenuItem
provides a direct shortcut to the relevant page within the CMS:
-
URL Format:
/?ewCmd=ListUsers&parid=2902
This URL points to the user listing page associated with the group ID.