Datasource selector on Nginx Ingress Controller dashboard issue

Hi,
I am trying to create custom Nginx Ingress Controller dashboard having per Datasource selector/drop down menu. Unfortunately if I change datasource to another it is not updating dashboard graphs because datasource is hardcoded since its installation.
This is my code (based on others work):
https://pastebin.com/ZiDQ6Grf

Any idea what is missing here?