• 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

    Guest Login, Permissions and Kiosk Dashboards

    Dashboard Designer & Custom AngularJS Pages
    7
    45
    15.4k
    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.
    • M
      mihairosu
      last edited by

      Ah I think there is a misunderstanding. What we are really looking for is a public view with no credentials, or credentials passed by the url perhaps.

      We don't want to have to hook up keyboard/mouse or VNC into each kiosk screen to enable an auto login, which we first need to login as admin anyway to set up.

      1 Reply Last reply Reply Quote 0
      • H
        henryblu
        last edited by

        That's it @mihairosu . The reason I am after this solution is because enabling the cache for auto-login causes this pop-up every time the pi boots when the dashboard turns on in the morning, quite similar to this post - https://community.risevision.com/rise_vision_inc/topics/chrome-restore-pop-up-after-crash

        0_1500511194437_dec21bea-3a69-4633-8e3a-b21f81600b0e-image.png

        Most solutions suggest to launch chrome/chromium in incognito mode to clear the cache. There are a few other old techniques out there which I have tried to remove the pop-up but none seem to work besides going incognito.

        That's my motivation for wanting a webpage with either no login required or auto login stored in the URL.

        1 Reply Last reply Reply Quote 0
        • M
          mihairosu
          last edited by

          I never tried to use Risevision for this purpose.

          FullpageOS seems to work though, so give that a try if you'd like.

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

            I think what you are after is the auto login code that you can put into your dashboard. There is an example under: /ui/examples/templates/auto-login

            You basically program a username and password into your page so any time it loads the page does the login automatically. This is different than the auto login feature in the web app. Let me know if that helps.

            [edit - Jared] This will only work for a full custom dashboard, you cant use this if you are using Custom Pages / Dashboard Designer.

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by phildunlap

              I wonder how you're launching the browser. I would expect that if launching it from a shell with a specific URL it would not question your intentions, but I don't know.

              Edit: I tried it. No luck, still offered to restore.

              1 Reply Last reply Reply Quote 0
              • H
                henryblu
                last edited by

                Sorry I'm a little unsure about pasting the Auto login code into a dashboard page. Say for instance my username is test and the password is testtest. I would edit the auto-login code to look like this?

                <!DOCTYPE html>
                <!-- You need to include ma-app here so ma-username and ma-password are picked up -->
                <html lang="en" ma-app ma-username="test" ma-password="testtest">
                <head>
                    <meta charset="utf-8">
                    <meta http-equiv="x-ua-compatible" content="ie=edge">
                    <title>Angular Material Template</title>
                    <meta name="viewport" content="width=device-width, initial-scale=1">
                    
                    <link rel="stylesheet" href="/modules/mangoUI/web/vendor/angular/angular-csp.css"></link>
                    <link rel="stylesheet" href="/modules/mangoUI/web/vendor/angular-material/angular-material.css">
                    <link rel="stylesheet" href="/modules/mangoUI/web/vendor/material-design-icons/iconfont/material-icons.css">
                    <link rel="stylesheet" href="/modules/mangoUI/web/vendor/mdPickers/mdPickers.css">
                </head>
                
                <body layout="column">
                    <div ng-if="appLoading">
                        <span>App is loading..</span>
                    </div>
                
                    <div ng-cloak layout="column" flex>
                        <!-- Your content here -->
                    </div>
                
                    <script src="/modules/mangoUI/web/vendor/requirejs/require.js"></script>
                    <script src="/modules/mangoUI/web/loaderConfig.js"></script>
                	<script>require(['ngMango/bootstrap']);</script>
                </body>
                </html>
                

                Which part of the code do I then paste into a dashboard page? Thanks.

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

                  https://superuser.com/questions/719875/google-chrome-always-says-google-chrome-was-not-shut-down-properly
                  https://superuser.com/questions/237608/how-to-hide-chrome-warning-after-crash

                  TLDR
                  It looks like you can modify "%UserProfile%\AppData\Local\Google\Chrome\User Data\Default\Preferences" (Windows, probably something similar in ~/ on Linux. Edit: people in the second link have ~/.config/google-chrome/Default/Preferences) for "exit_type":"Crashed" --> "exit_type":"Normal"

                  I tried it, it works! Chrome writes the exit type to Crashed when it starts.

                  1 Reply Last reply Reply Quote 0
                  • H
                    henryblu
                    last edited by

                    Awesome - managed to make it work this time! Thank you, all is fine now.

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

                      @henryblu That code is not pasted into a dashboards page, it is basically the skeleton for a whole custom app. You can't use it with Custom Pages / Dashboard Designer.

                      I can definitely look into making it easier to setup auto-login from a centralized location. I can probably add it into the UI settings page as a matter of fact and also add URL parameter options.

                      Developer at Radix IoT

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        mihairosu @Jared Wiltshire
                        last edited by

                        @Jared-Wiltshire We would absolutely love to be able to do any of those things. Would really make our lives a little easier.

                        We can think of more places we'd like to use the dashboards but where we can't simply log in locally.

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

                          @mihairosu There will be more options in the next UI module release, I'll update this thread with more details when I do the release.

                          Developer at Radix IoT

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

                            @mihairosu @henryblu
                            I've added more options for logging in automatically to the latest UI module (v3.1.8).

                            There are now three options for supplying the auto-login credentials (in order of precedence)

                            1. Url parameters
                            2. Local storage/cookies (this used to be the only option)
                            3. From the UI settings which are stored in the REST API JSON store

                            Important warning
                            Never use admin credentials for auto-login, always use a view-only/restricted user. The password will be stored/and or transmitted in plain text. When using the UI settings, the credentials will be publicly accessible from the REST API!

                            Url parameters
                            You can supply auto-login credentials using the autoLoginUsername and autoLoginPassword url/query parameters.
                            e.g. https://mymangodomain.com/ui/home?autoLoginUsername=publicuser&autoLoginPassword=publicpassword

                            There is also a parameter which will store the credentials from the URL into the local storage/cookies - autoLoginStoreCredentials. This ensures that if the user navigates away and comes back to Mango the credentials are still available.
                            e.g. https://mymangodomain.com/ui/home?autoLoginUsername=publicuser&autoLoginPassword=publicpassword&autoLoginStoreCredentials

                            autoLoginDeleteCredentials can be used to delete these credentials in the event that you no longer want users to be auto-logged in.

                            Local storage/cookies
                            You can store the credentials in the browser's local storage/cookies via the "Auto-login (local)" page under "Administration", or via the url parameters as explained above. These credentials must be added on a per machine/browser basis.

                            UI settings / JSON store
                            You can store auto-login credentials for all clients on the "UI settings" page under "Administration". Any client/browser which connects to the Mango instance will use these credentials (provided they are not logged in via one of the previous methods).

                            Developer at Radix IoT

                            1 Reply Last reply Reply Quote 0
                            • M
                              mihairosu
                              last edited by

                              Jared,

                              Thank you so much for putting all this effort into these new features!!

                              It looks like they work with the new UI but not the old dashboard pages, which I believe Joel warned us about.

                              As soon as get the chance to transfer our pages over, I'll be able to fully test these. My initial tests show they work just fine however.

                              I'm pretty excited about these changes.

                              Thanks again.

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

                                @mihairosu You could create a dashboard in the new UI that simply redirects to the old page. When you hit the new UI page you will be logged in then redirect.
                                e.g. just put this in the markup

                                <meta HTTP-EQUIV="REFRESH" content="0; url=/legacy_page.htm">
                                

                                P.S. this isn't valid markup but it seems to work (it should go in the head). You could also just use a script tag and set window.location.

                                Developer at Radix IoT

                                1 Reply Last reply Reply Quote 0
                                • MattFoxM
                                  MattFox
                                  last edited by

                                  Hi @Jared, have been trying to implement the auto login feature for the last day or so. Getting slightly annoyed with the auto login local not compatible with the admin template single page app (only just read in one of your other posts in May that it's deprecated which doesn't help me much here now that I am now up to my neck in it.)
                                  Are you willing to provide some assistance here so I can work out how to implement the cookie type browser storage so that individual users can set an auto login if they wish to? Not so fond of the url type implementation.

                                  Do not follow where the path may lead; go instead where there is no path.
                                  And leave a trail - Muriel Strode

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

                                    @MattFox The latest adminTemplate should work with the autologin, what version are you using?

                                    You will need to enter the credentials at /ui/administration/auto-login-settings but after that the adminTemplate should log you in automatically.

                                    Developer at Radix IoT

                                    1 Reply Last reply Reply Quote 0
                                    • MattFoxM
                                      MattFox
                                      last edited by

                                      Morning Jared, apologies for the late reply, Friday through Sunday seemed to move as one giant blur...
                                      It's more the fact I'm trying to do multiple custom dashboards. These dashboards each possess their own login for separate users and display different data. There is no wish for them to be able to access the /ui backend as some of the dashboards coded are used for realtime data display on a tv for example.

                                      However, it would be nice to be able to implement the same code for this into the custom dashboards so that users can configure an auto-login should they wish to.

                                      Thanks again for your time

                                      Matt

                                      Do not follow where the path may lead; go instead where there is no path.
                                      And leave a trail - Muriel Strode

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

                                        @mattfox said in Guest Login, Permissions and Kiosk Dashboards:

                                        It's more the fact I'm trying to do multiple custom dashboards. These dashboards each possess their own login for separate users and display different data. There is no wish for them to be able to access the /ui backend as some of the dashboards coded are used for realtime data display on a tv for example.

                                        The fact that you need display different data for different users should not preclude you from using /ui. You can hide menu items for different users, set permissions on data points and set user's home pages.

                                        If you setup the main /ui app this way it will save you a lot of time maintaining separate custom applications.

                                        @mattfox said in Guest Login, Permissions and Kiosk Dashboards:

                                        However, it would be nice to be able to implement the same code for this into the custom dashboards so that users can configure an auto-login should they wish to.

                                        If you still want to make separate applications you can copy the autoLoginSettings component from the ui/components folder into your custom app. You will need to register it as part of the application in app.js. This component just displays a username/password form and saves the credentials to local storage/cookies.

                                        The actual auto-login code is in the User service and is called from the bottom of app.js. You can change the prefix that it is used to store/retrieve data from local storage if needed, let me know if you do.

                                        Developer at Radix IoT

                                        1 Reply Last reply Reply Quote 0
                                        • MattFoxM
                                          MattFox
                                          last edited by

                                          @jared-wiltshire said in Guest Login, Permissions and Kiosk Dashboards:

                                          The fact that you need display different data for different users should not preclude you from using /ui.

                                          I wish that were the case, but I am not using angular material based components to display data in these instances and thus have had to make my own point queries to pull the data through and parse it into a format to suit the interfaces I have made.
                                          I'll definitely take you up on that offer of changing the prefix. Chances are i'm going to need to do it at some point.

                                          Do not follow where the path may lead; go instead where there is no path.
                                          And leave a trail - Muriel Strode

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

                                            @mattfox said in Guest Login, Permissions and Kiosk Dashboards:

                                            @jared-wiltshire said in Guest Login, Permissions and Kiosk Dashboards:

                                            The fact that you need display different data for different users should not preclude you from using /ui.

                                            I wish that were the case, but I am not using angular material based components to display data in these instances and thus have had to make my own point queries to pull the data through and parse it into a format to suit the interfaces I have made.
                                            I'll definitely take you up on that offer of changing the prefix. Chances are i'm going to need to do it at some point.

                                            OK fair enough then.

                                            So if you look at ngMango/ngMangoServices.js you will see the config() block configures localStorageServiceProvider with a prefix. You just need to add that to the config block in your app.js, this will ensure the local storage for each of your apps will work independently.

                                            Developer at Radix IoT

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