• Recent
    • Tags
    • Popular
    • Register
    • Login

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    How to Redirect from Dashboard to Login Page

    Dashboard Designer & Custom AngularJS Pages
    2
    7
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JHuckins
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        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/7

        If you upgrade to v3.2.2 your issue should be resolved.

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • J
          JHuckins
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • J
            JHuckins
            last edited by

            Ok, I found ma-username and ma-password. And I created a non-admin user and gave access to the necessary points. That worked.

            Jared WiltshireJ 1 Reply Last reply Reply Quote 0
            • Jared WiltshireJ
              Jared Wiltshire
              last edited by

              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).

              Developer at Radix IoT

              1 Reply Last reply Reply Quote 0
              • Jared WiltshireJ
                Jared Wiltshire @JHuckins
                last edited by

                @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.

                Developer at Radix IoT

                1 Reply Last reply Reply Quote 0
                • J
                  JHuckins
                  last edited by

                  That's good info, though. I will take a look at adminTemplate and see if that is a better solution.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post