Dynamic Dashboard Background

@Gary Howell

Hello,

I think the dashboard background is stored with the dashboard definition. Are there any plans to make the dashboard dynamic depending on a bucket variable?

I would like to be able to display an image of the sensor installation as a background to that’s sensors data in blueprint.

The only thing I can think of at present is to have an dynamic/conditional image widget on the dashboard itself.

Thanks
Gary

@Guilherme Costa

Hi Gary,

You have an option to change the dashboard configuration via API. Follow the doc:

You can create a form to change the dashboard’s background, create an image upload input and run an analysis once is submitted, follow an example of call through API tool:

curl --request PUT \
  --url https://api.tago.io/dashboard/61c232e1c64b8f0010b58629 \
  --header 'Content-Type: application/json' \
  --header 'account-token: PLACE-YOUR-ACC-TOKEN-HERE' \
  --data '{
        "background": {
			"img": "api.tago.io/file/5fb2802122dcd70027228991/ricardo-gomez-angel-5YM26lUicfU-unsplash.jpg",
			"type": "image",
			"media": "api.tago.io/file/5fb2802122dcd70027228991/ricardo-gomez-angel-5YM26lUicfU-unsplash.jpg",
			"opacity": "76"
		}
}'

Now you just need to implement it through the analysis, you can use the SDK doc which will guide you through.

Let me know if that meet your need.

@Gary Howell

Hi @guilhermeco

Thanks for this - yes, I have used this dashboard editing technique before, but this is a global background setting for all users.

What I need is to change the background for a particular session/user depending one which device they select from the blueprint dropdown.

I wonder is there is any support for session_id - something that @eger wrote about with regard to validation fields on forms - How does “Wait for validation to unlock” work in an input form - #10 by eger

@Fabiano Eger

hi, @tago,

The session_id just works with validation of the Input Form Widget.