Custom Reports |
You must add information such as menu id, report name, report id, url, template and so on to your report as a menu item.
To define your custom report, perform the following:
For example: C:\VoceraAnalytics\visualizationserver\conf\custom-menu.json.
[{ "menuId" : "OutgoingCalls", "name" : "Outgoing Calls", "reportId" : "outgoing_calls", "url" : "/outgoing_calls", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "This is the sample report which summarizes Outgoing Calls.", "params" : { "templateFileName" : "outgoingcalls.rp.tpl" }, "items" : [] } ]
The following table lists the menu item and its description:
Property | Description |
---|---|
menuId | An unique identifier for the menu. |
name | Name of the report that will be displayed under menu. |
reportId | An unique identifier for the report. |
url | An unique relative URL that would be displayed on the address bar of the browser. |
templateUrl | The templateUrl for reports is report/report.tpl.html. Refer the section for information on how to create a report template file. |
parent | Name of the parent menu. |
params > template_file_name | The name of the report template file created under conf\Report Template in Visualization Server. |
description | A short description of the report. |
, { "menuId" : " BadgeFirmware ", "name" : "Badge Firmware", "reportId" : "badge_firmware", "url" : "/badge_firmware", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "Displays the total number of badges for each facility and department.", "params" : { "templateFileName" : " badgefirmware.rp.tpl" }, "items" : [] } , { "menuId" : "GroupActivity", "name" : " Group Activity", "reportId" : "group_activity", "url" : "/group_activity", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "Shows the total calls, text messages, voice messages, and VMI alerts made to a Group entry.", "params" : { "templateFileName" : "GroupActivity.rp.tpl" }, "items" : [] }
After adding all the three custom reports, the code in custom-menu.json file appears as follows:
[{ "menuId" : "OutgoingCalls", "name" : "Outgoing Calls", "reportId" : "outgoing_calls", "url" : "/outgoing_calls", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "This is the sample report which summarizes Outgoing Calls.", "params" : { "templateFileName" : "outgoingcalls.rp.tpl" }, "items" : [] } , { "menuId" : " BadgeFirmware ", "name" : "Badge Firmware", "reportId" : "badge_firmware", "url" : "/badge_firmware", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "Displays the total number of badges for each facility and department.", "params" : { "templateFileName" : " badgefirmware.rp.tpl" }, "items" : [] } , { "menuId" : "GroupActivity", "name" : " Group Activity", "reportId" : "group_activity", "url" : "/group_activity", "templateUrl":"report/report.tpl.html", "parent":"custom", "description" : "Shows the total calls, text messages, voice messages, and VMI alerts made to a Group entry.", "params" : { "templateFileName" : "GroupActivity.rp.tpl" }, "items" : [] } ]
For further insights, check out the related topics below: