I made a new dashboard with a graph. Everything works great if I first login to my Mango Automation account. But, if I clear my cookies, the page does not redirect to a login page. Instead the graph is just blank. I want to do the following: - go to my dashboard's URL - if no one is logged in, then redirect to login page - after successful login, go back to my dashboard. Thanks
How to Redirect from Dashboard to Login Page
There was a bug in the dashboards module where the
/dashboardslink doesn't redirect to
See here - http://infiniteautomation.com/forum/topic/2456/custom-dashboards-don-t-work-after-upgrade-to-3-2-1/7
If you upgrade to v3.2.2 your issue should be resolved.
I upgraded to 3.2.2, but still broke. I thought I'd add some details here. Perhaps I am doing something wrong or omitting a step. This is my first mango experience, after all.
For starters, I made a custom dashboard in /opt/mango/overrides/modules/dashboards/web/LiveChartsDashboard/index.html. Everything works great when I'm logged in. However, when I clear my cookies to remove my login, all the calls to /rest/v1/datapoints return error 403.
Is there some code I can insert in my index.html that checks for a logged-in user, and redirects to login if no one is logged in?
Ok, I found ma-username and ma-password. And I created a non-admin user and gave access to the necessary points. That worked.
/dashboardsis the link to the main Mango v3 dashboards pages (mdAdmin). In this interface you can create custom pages and add/remove menu items. If you only need a handful of simple pages I'd recommend starting here. If your dashboard is located at the location you said then the URL will be
If you need full custom dashboards then a good template to start with is the
adminTemplate. Is this what you used? Did you start with the version included with v3.2? It includes code in the app.js file which does the auto-login if you have configured it in mdAdmin (go to /dashboards/settings/auto-login-settings).
That's good info, though. I will take a look at adminTemplate and see if that is a better solution.