This is a tool where users can administrate the datasets corresponding to each dataquery. It lists all queries created in the content studio with information about last time the dataset was updated, and the result of last time the dataset was tried to be updated. "Fetch new dataset" and "delete dataset", are functionality currently available. When new data is fetched, a event log entry will be created in a repo in enonic xp.
The dashboard code is located under /src/main/resources/admin/tools/dashboard
and containes:
- controller: dashboard.es6,
- view: dashboard.html,
- config: dashboard.xml,
- icon: dashboard.svg,
The controller get everything the dashboard needs to list the queries, mainly:
- Assets: css, images and most importantly the dashboard react app
- Dataqueries: Dataquery content from content studio mixed with info from Event Log
The dashboard react app are responsible for listing dataqueries, and the actions when
buttons for get new dataset
and delete dataset
is pushed.
The react app uses a service that is located under /src/main/resources/servies/dashboard
. The buttons
do either a get
or a delete
request to the service, and show the result at each dataquery.
The react app takes some parameters.