Learn how to add in the Timelines extension to your application by configuring its entity, user interface and security diagrams on the platform.
As we previously outlined in our Timelines Extension Overview, the Timelines extension enables users to access a log of information relating to any number of entities.
For example, you may wish to keep track of a history of bookings which are created, updated, or deleted by users of your application. The Timelines extension will allow us to not only view a list of chronologically logged actions across an entire collection of bookings, but also a filtered down look at any changes made to a single booking item.
How to model the Timelines extension.
Configuring your Entity Diagram.
- To get started using the Timelines extension in your application, simply create a new entity or select an existing one in the entity diagram on the platform.
For this example, we will consider the following Booking entity.
- With the entity selected, click on the ‘Extension’ button in the entity’s panel, and choose the ‘Timelines’ option.
- If done correctly, the Timelines extension should be listed alongside the existing attributes in your entity.
Once we have activated the Timelines extension in our entity diagram, the next step is to configure the user interface to display the timeline where we wish it to appear in our application.
Configuring your User Interface Diagram.
- In the user interface diagram on the platform, click the ‘+’ button next to the ‘Pages’ header in the left-hand panel, or select an existing page to display our timeline on.
- With the page selected (highlighted in green), fine the ‘Timeline Tile’ listed in the left-hand panel and add it to your page.
- Once you have added the Timeline tile, it should appear in your selected page on the user interface diagram as shown below, and you can proceed by giving it a name.
- Finally, you need to select the entity you wish to display a timeline for. In this case, we will select the Booking entity to which we added the Timeline extension previously in our entity diagram.
Now we have set up our timeline to appear in our application, the final step is to configure our security model to control our users’ permissions to access this.
Configuring your Security Diagram.
In the security diagram, you will want to ensure the different users of your application are granted the correct permissions.
In the model shown below, we can allow any Admin users to Create, Read, Update and Delete any data under the Booking entity that we have activated the Timelines extension. Additionally, any Admin users will have permission to ‘Read’ or view the page Home where we included our timeline previously.
Once you are happy with your entity, user interface and security configurations, go ahead and click on the ‘Build app’ button in the top right-hand corner. It’s now time to watch the bots work their magic!