Dashlets Page-Wise Configuration Design Brainstorm
Title | Dashlet Page Wise Configuration. |
Problem Statement | Ability to inject dashlets widgets into any page via configuration.
|
Solution is divided into 3 phases :-
Create Configuration for the Dashlets <CREATION>
Linking the page id to the Dashlets Configuration <LINKING>
Rendering the Dashlets <RENDERING>
Proposed Solutions
CREATION PHASE
This phase deals in creation of the dashlets configuration.
Use the Report Service API’s to store the configuration just like we’re doing for the Admin Reports.
In order to prevent these dashlets widget to show in admin Dashboard list page we’ll make use of two cols -
report_type: 'dashlet'
type: ‘private'
Following are the PROS of using the report service API’s for storing dashlets configuration.
Parameterization support ($slug, $board, $state and $channel).
Tags Support
Life Cycle support - Draft, Live and Retired
Can also be clubbed with Summaries API’s.
Authorized Roles field to target specific role to access the Dashboard.
Link to Documentation - http://docs.sunbird.org/latest/apis/reports/
Sample Create API payload
{ "request": { "report": { "title": "title of the report", "description": "Description of the report", "authorizedroles": [ "ORG_ADMIN"