Just thought I’d share a little trick to view the emoncms apps publicly via a prettier url eg
rather than
https://server.com/emoncms/app/view/?name=MySolar&readkey=abcd1234abcd1234abcd1234abcd1234
this also means you are not sharing your “readkey” which is actually your readonly apikey and allows any users with access to any of your apps to repurpose that readkey and read any of your data or see any of your dash’s.
Simply create a new dashboard name it and give it an alias “MySolar” (or what ever else you wish to call it) and set it to public.
Then open that dash in edit mode and add a simple paragraph widget up into the top left corner and expand it to fill the page.
Add the following to the widget config
<object type="text/html" data="https://server.com/emoncms/app/view/?name=MySolar&readkey=abcd1234abcd1234abcd1234abcd1234&embed=1" width="100%" height="100%"></object>
replacing the url, readkey and app name as required.
you can also change the dash background to match the app background in the dash config eg the MySolar background is red:34 green:34 blue:34 in the color picker panel. Save the dash even if it says “not changed”
Now the app should be available via the short (public?) url.
I’m sure this will also work even if you don’t want public apps, but just want consistent urls, you will just need to use the apikey in the usual way.
My goal here was just to unify the url structure for one of my clients so they could access multiple dashboards and apps by just changing the name of the account or the name of the dash/app eg
https://server.com/user1/mysolar
https://server.com/user2/mysolar
https://server.com/user2/somedashboard
or for private pages
https://server.com/dashboard/view/mysolar?apikey=_user1readonlyapikey_
https://server.com/dashboard/view/mysolar?apikey=_user2readonlyapikey_
https://server.com/dashboard/view/somedashboard?apikey=_user2readonlyapikey_
it just makes it easier for the end user who doesn’t understand (or care about) the difference between an app or a dash, why the url needs to be different and how to recognize an app vs dash.
This isn’t intended to be secure, although this removes the need to have the apikey in the url for apps module just to identify the user, the readkey is still present if you “view source” the webpage. Nor have I tested extensively with other browsers, I’m using chrome.