Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
How to Redirect from Dashboard to Login Page
-
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
-
There was a bug in the dashboards module where the
/dashboards
link doesn't redirect to/dashboards/home
See here - http://infiniteautomation.com/forum/topic/2456/custom-dashboards-don-t-work-after-upgrade-to-3-2-1/7If 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?
Thanks,
Jerry -
Ok, I found ma-username and ma-password. And I created a non-admin user and gave access to the necessary points. That worked.
-
OK so
/dashboards
is 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/user-dashboards/LiveChartsDashboard/
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). -
@JHuckins said in How to Redirect from Dashboard to Login Page:
ma-username
Ah ok, sounds like you aren't using the adminTemplate. Glad you got it to work.
-
That's good info, though. I will take a look at adminTemplate and see if that is a better solution.