Using components inside the dashboards
We have not really covered the concept of a dashboard if we do not show any Key Performance Indicators (KPIs), charts, tables, and so on. CDF provides many components we can use to create the dashboard. To use them, we just need to extend the code we used previously. You saw that we need to include the modules we will need. Each component is a module that has its own dependencies that will be loaded automatically when we include the component.
The previous example shows the code that should be placed inside the XCDF file. This code creates a dashboard with a simple text component that returns a simple Hello World!
message.
If you look at the code, you will find that we are including the dashboard module and also the component module. You will see that we are already using the Bootstrap framework. For this case, we are also including cdf/components/TextComponent
, the module that makes it possible to use a text component, one of the simplest components...