A dashboard is a container of resources that allows the programmer to compose a page using different panels described in different resources. The page is designed using bootstrap framework and for each resource we need to specify the row where we want to put it and how many columns we want the resource to take. We need to specify that using the row and width attributes.
A dashboard contains a json list of panels.
For each panel we need to specify:
- title: it is going to be shown in the interface
- resource: the identifier of the json resource in the system
- row: which row contains the specific panel
- width: how many columns we want the panel to extend
We do not need to provide parameter to this specific resource as the GET parameters are calculated recoursively from the contained resources. We expect the action that link this dashboard to provide all parameters required by all resources contained in it.
If you put a resource that defines a POST section, like a form or a search panel, that resource will work perfectly even inside the dashboard. As you can see there is a form titled “New article” in this dashboard, The user can fill the form and when he clicks the save button the trasnsaction, that is part of the post section, is executed, the article is inserted in the database and the dashboard is called again with a GET redirection.
You can use a dashboard in order to oraganize a page that is composed by more than a resource.
This dashboard script is taken from the CRUD tutorial. It is possible to download a copy of the complete example from the GitHub repository.