This application plugin for Grafana has been created specifically to act as a front-end to our digital twins platform. It allows you to manage your digital twins in a user-friendly way, with the advantage of doing it in the same tool where you can also view the state of your digital twins. Acting as a front-end, the only functionality of this plugin is to make calls to different APIs. The component on which the interface is based is our Extended Api for Eclipse Ditto tool, which basically acts as a top layer of Eclipse Ditto by adding some functionality and validation. Although this component is not very reusable for other projects due to its dependency on our platform, if the API calls are modified it could be useful as an interface for other projects or simply as an aid for the creation of a similar Grafana app plugin.
This plugin is like any other Grafana plugin, so you can also follow the instructions on their page. It is also explained step-by-step below.
-
Download the code or clone it.
git clone https://github.com/ertis-research/digital-twins-plugin-for-grafana.git
-
Move the code to the folder you have assigned in Grafana for plugins. This folder is indicated in the Grafana configuration file, where you can also change its path if you see it convenient.
-
The plugin is currently unsigned, so it is necessary to activate Grafana's development mode to use it. To do this, the app_mode variable in the Grafana configuration file must be changed to development and then Grafana must be restarted.
-
Access the root folder of the code in a terminal.
-
Run the following command to install the dependencies.
yarn install
-
Run the following command to build the plugin.
yarn dev
-
For Grafana to detect the plugin for the first time it usually needs to be restarted.
At this point the plugin should already be installed. If we go into Grafana and enter configuration > plugins
, it will be in the list.
To activate it, go to its info page (click on it) and click on enable.
With this, we will have our plugin installed and activated, pending configuration and use.