Strapi Component Elasticgrid - kwantu/platformconfiguration GitHub Wiki
1. Elastic Grids
1.1 What are Elastic Grids?
An Elastic Grids component renders a grid from Betterdata. This component builds a query in elastic based on the users inputs to the fields. The component will then run that query in elastic to get the data required to populate the grid. The grid selects the fields it needs based on the uiView
required. The uiView
comes from the data model and corresponds to the uiLayout id
(Click here to see more on uiLayouts).
1.2 Setup in Betterdata
The benefit of the elastic grid is that we no longer need to create a report to pull the data from. This means the setup is simpler. However, this component is limited by the data model. Any aggregations must be done before being inputted into elastic and not by the dashboard.
1.2.1 Properties
There is only one type of elastic grid and so the properties are always the same.
Grid Example 1
Field | Description | Required? |
---|---|---|
Node ID | Unique Identifier for the node (randomly generated) | Yes |
Box title | Title for the box the chart will be inside, this title only shows when you hover over the box with a mouse | Yes |
Widget | All dashboard nodes require you to pick a widget. For this case select Elastic Chart | Yes |
SDO | This is where you select your data object that will be used as the data source | Yes |
UiView | This is where you select the UiView of the data model you want to use as reference for the columns of your grid. | yes |
Clickable field | This is where you select which field from the data model you want to be clickable. This will render all values of this field with an underline and can now be clicked. When clicked this will take the user to 3 different areas depending on where you specify in the What to open section. |
No |
Context filter | This defines the context of the data. Currently this only works for Strapi. The case for this is where you want the chart to be filtered on a specific field. For example: filtering on a specific District. | No |
What to open | This specifies what level of your app is opened when a clickable field is clicked. The options are: Profile, Sub Profile and Process. |
No |
Run across communities | If the community this dashboard is on has child communities and you would like to pull data from all communities then tick this | No |
filter | Here select which fields correspond to which filters you have defined | No |
1.2.2 Gaps in Elastic Grid
- Does the context filter work in BetterData?
- Can we have a chart that is hard-coded to be pre-filtered. Similar to how the context filter works in strapi. For this we cannot use the filter option as we only want the filter to effect the specific chart and no other dashboard widgets.