In this article, we will learn how to use a dashboard to create Actions for your devices. This is very useful if you want to let your customers set up alert notifications.
By following all the steps here, you will have a dashboard ta can create any action and also will learn:
Let’s start this tutorial by installing the analysis in our account.
Get the analysis template by clicking in this link: http://admin.tago.io/template/5f53222c643d0e001b97e81b
The only thing we need to do here is to set up the Environment variable.
In this step we will set up the dashboard in our account and understand how it works.
Get the dashboard template by clicking in this link: Dashboard Template
By the first look at the dashboard, we can notice it has one tab for List and another for Help.
We can also notice that we can’t select any device here for our dashboard. So this is what we need to handle first.
The placeholder already tells you what to do: You need to go to your devices page, click to your devices, and then add a tag with key can_create and value actions. That is needed because we are using a Blueprint Dashboard, and the devices used for the widgets are dynamically changed by the Device dropdown. You can see/change the setup by editing the dashboard.
So, go to one of your devices and add the tag key and tag value as follow:
Now if we go back to the dashboard, we will be able to select the device we added the tag. To add more devices to the list, just add the same tag to other devices.
As you’re a developer, you can click to edit the dashboard to notice another hidden tab, that we use to hide the input form widget.
I’m assuming you already have the TagoRUN enabled in your account. If you don’t, just click in the Run button in your sidebar, and it will generate a URL to login in your TagoRUN, like that: https://5bbcb03b667d7a002e56664b.run.tago.io
To log in through the TagoRUN, you need to have users in your account. Your developer’s username and password will not work here.
In your developer’s account, you must click in the Users button in your sidebar, and you can create new users.
Now click the button Access at your sidebar. Here you can create a policy, that will determine what the user has access to.
For a very simple example, you can copy the following policy for this tutorial:
Now you have all set up and can start using the dashboard to create alerts!
You can personalize this example to your application based on your needs. You can remove fields that you don’t plan to use, or create a new widget with less freedom on what the user can set up. It’s your choice!