Guest Login, Permissions and Kiosk Dashboards
-
We can look at making the auto login work via URL parameters or something like that in the future, at this time the incognito mode will not work.
If you create a menu link for your page with a state name that does not start with 'dashboard' then you will not get the menu or top bar when you go to its URL. You could create two menu links for each page, one which is displayed in the menu which starts with 'dashboard' and one which is hidden from the menu that doesn't start with 'dashboard'.
The second issue I believe is probably due to a bug that was in an earlier version of the dashboards module. Can you post the following markup in your play area and check what the user permission is? I suspect it is empty. If it is empty, change it to
user
and press save. The edit permission should beedit-menus
.<ma-json-store xid="custom-user-menu" item="myItem" value="myValue"></ma-json-store> <div layout="column"> <md-input-container class="md-block"> <label>Edit permission</label> <input ng-model="myItem.editPermission"> </md-input-container> <md-input-container class="md-block"> <label>Read permission</label> <input ng-model="myItem.readPermission"> </md-input-container> </div> <md-button class="md-raised md-primary md-hue-3" ng-click="myItem.$save()"><md-icon>save</md-icon> Save</md-button> <md-button class="md-raised md-warn" ng-click="myItem.$delete()" disabled><md-icon>delete</md-icon> Delete</md-button> <md-button class="md-raised" ng-click="myItem.$get()"><md-icon>undo</md-icon> Revert</md-button> <div style="margin-top:10px"> <pre><code>{{myItem | json}}</code></pre> </div>
-
Hey Jared,
Regarding the first point:
I created a page with a link as you described:
When I use the sidebar to open the page, it works as you described, without a menu.
However, when I use the link directly from a new page, by entering the same url, it doesn't open at all. Also, please note it was opened from the same window, just a new tab, so there shouldn't be any login issues. I get the spinning gear icon show up, and then a blank page.
I also noticed, that the View Page link from the page editor also doesn't open the page with the new URL.
Regarding your second point, the permissions were as follows:
Edit permission: edit-menus
Read permission: userDo I need to give "user" permissions to the "guest" user somewhere?
-
I can't see anything wrong with your configuration, are there any errors in the browsers console? The view page link will open the first menu link it finds that links to the custom page, so it is probably finding the link that doesn't work.
Yes, make sure your user "guest" has the "user" permission on the users page (/users.shtm).
-
I checked Chrome with Developer Mode and I don't see anything at all in the Console.
The same issue happens with Firefox as well, if that matters at all.
I have confirmed again that neither the "View Page" link works, nor opening it directly from the weblink:
http://ip-address/dashboards/boilersOverviewKiosk.
Those same exact links do open from the side bar though.
edit: I forgot to mention that your permissions suggestions have resolved my issues on that front.
-
@mihairosu
I've tracked down the bug, can you please test the fix. Replace your app.js file with this one -
https://raw.githubusercontent.com/infiniteautomation/ma-dashboards/0906b657b8eded627e3ca77af69daaa223f26a76/Custom Dashboards/web/mdAdmin/app.jsOur schedule does not allow us to release a bug fix to the store right now, sorry.
-
Hey Jared,
The fix you made won't allow me to open the dashboards module. It seems to be stuck at the gear loading icon. I restored the original apps.js and now it loads ok again.
-
What version of the dashboards module do you have installed? The fix is for 3.2.2, ensure you are on this then apply the fix.
-
3.2.2
-
Can you open the developer console and tell me if there are errors in the console? What page are you trying to go to?
I have double checked the fix and can't find a problem with it.
-
I restarted the mango instance after copying over your new file, do you think I need to restart the whole computer? Could that have something to do with it?
Also there were no errors when I checked it last. I can try it again at some point today.
-
Just to be clear, I am editing the file in the following location?
/opt/mango/web/modules/dashboards/web/mdAdmin
-
Yes that's the right file, you should not have to restart your computer or even Mango. As long as you clear or disable your cache (on the network tab of Chrome's developer console for example) the new file will be loaded when you refresh the page.
Joel mentioned that we might have access to your server so we might be able to log in and take a look at what is happening. Perhaps give us a call.
-
Ah, you know what, I don't think I cleared my cache. That might have done it. Give me a little bit and I'll get to it again.
-
Jared, sorry for giving misleading information last time. Your fix worked.
Thank you.
-
Great, good to hear
-
@mihairosu did you ever find a solution to displaying a dashboard page on a raspberry pi via launching it in kiosk mode? I've noticed that the pi requires chrome to launch in incognito mode to clear the cache (so the session restore functionality is disabled), but as @JoelHaggar said, auto login requires the browser to store login info.
-
@henryblu Yep, we are using FullPageOS and a link to the screen. You will have to manually login once with the pi, and it appears to remember it anyway.
I was never able to get any sort of automatic login to work, or no-login required kiosk screens to work. If that's not already existing, I really hope they have it on their radar still. I know there were instructions for how to do some of this, but it didn't work for me.
Software like PRTG, or Grafana make it really easy to do it. I wish Mango's was just as easy or easier.
-
Automatic login is a function that has been available for quite some time. What specifically are you having issues with.
You simply go to Administration > Auto Login and enter the user credentials and yes it will be stored in the browser cache. Does this not work with the version of Chrome you are running on the Pi?
-
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.
-
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
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.