Page 1 of 3
Password Protect settings pages
Posted: Sat 23 May 2015 10:29 pm
by dan_mcclurg
Hi there,
Don't mind if this is pushed to the side for the mean time whilst MX is still in beta, however could I request a password protect function for settings on the web interface, the main reason for this is that I would quite like the MX dashboard as my main weather website, however I don't wish for the settings pages to be accessed by anyone except me.
Hope that all makes sense.
Thanks
Re: Password Protect settings pages
Posted: Sat 23 May 2015 11:50 pm
by water01
Don't think that is a good idea because it would mean opening a port through your firewall in order to allow access to your server, and once they are there I am sure there all sorts of ways they could bounce into your shared file system and cause mayhem.
Best to stick with the web interface that Steve supplies for that reason.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 7:30 am
by Palmyweather
I had been thinking of asking a similar question about password protecting the settings tab. Cumulus MX has potential to be used across a local network and could be accessed by many people, some of whom you would not want to have access to the settings screen.
EG: Mum, Dad and the kids could all check out the weather data from all their different PC and mobile devices but you may only want family weather enthusiast to be able to change the settings. This example could even expand out to a business.
Just my thoughts
Matt
EDIT: Then again having thought some more about it, the settings menu could simply be removed from the dashboard through the HTML Code. Then the Admin simply needs to remember the URL to enter.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 8:10 am
by mcrossley
Palmyweather wrote:
EDIT: Then again having thought some more about it, the settings menu could simply be removed from the dashboard through the HTML Code. Then the Admin simply needs to remember the URL to enter.
That may be OK for your intranet, but still not a solution for the internet. The settings page will be well known and you would still have to open up your firewall. Best to not expose the system interface to the web at all, reproduce it as a web site if you like the format. I known people are already either doing that or working on it.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 8:42 am
by steve
I looked into doing password protection for the settings pages, but it is not easy, if possible at all. It is not just a case of removing or protecting the html pages, and the web server built into MX is very basic and does not support .htaccess or similar.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 10:24 am
by dan_mcclurg
Hi, thanks for all the replies, that's completely understandable what everyone has said.
Steve, is it possible to convert the MX pages into ones processed by cumulus with webtags ETC, but still maintain the look of the MX dashboard?
Re: Password Protect settings pages
Posted: Sun 24 May 2015 10:38 am
by steve
You could do that, but it would be much better to keep the pages as they are, and change the associated javascript to load the data from a URL on your web site instead of directly from Cumulus. This is presumably what the people Mark referred to are doing. At some point I could look at making the interface a properly supported alternative to the basic standard web pages. I can understand why people would want to have the data pages from the interface as a web site.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 11:18 am
by dan_mcclurg
Hi Steve, thanks for the reply, how exactly would I go about doing that? im reasonably techie but have little knowledge of JS.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 11:22 am
by mcrossley
You could also lock down the interface pages/ports to specific client IP adresses (or subnets) using the local host firewall. Mainly useful if you have an intranet you want to restrict, but you could use that method to enable remote admin access for yourself - you could also use the router firewall - maybe add your work proxy server address(s) so you can keep an eye on it from work

(assuming your work proxy also allows the ports through).
Re: Password Protect settings pages
Posted: Sun 24 May 2015 11:29 am
by dan_mcclurg
hi mark, that would work however I access the MX interface from a range of devices that normally use DHCP so specific IP's wouldn't be feasible, I think I will probably go down the route of updating the JS, I just need to find out what bits, im not great with JS;)
Re: Password Protect settings pages
Posted: Sun 24 May 2015 11:49 am
by steve
All of the UI pages are fed by JSON, generated by MX on the fly. At the moment, with the exception of the graphs and gauges, there is no way to get MX to put that data into a file automatically so that you could upload it to a web site, so you would have to devise a way to do that. I do intend to provide documentation of the API at some point (and extend it) but for now you would have to look at the javascript and the traffic between it and MX, so that you can see what format the JSON needs to have. For example, the temperature data for the 'Today/yesterday' page looks like this:
Code: Select all
{
"data": [
[
"High Temperature",
"11.5 °C",
"11:20",
"12.3 °C",
"13:31"
],
[
"Low Temperature",
"9.8 °C",
"10:03",
"7.3 °C",
"05:33"
],
[
"Temperature Range",
"1.7 °C",
" ",
"5.0 °C",
" "
],
[
"High Apparent Temperature",
"4.3 °C",
"11:20",
"9.2 °C",
"13:32"
],
[
"Low Apparent Temperature",
"2.2 °C",
"10:04",
"0.2 °C",
"05:20"
],
[
"High Dew Point",
"8.5 °C",
"11:20",
"7.7 °C",
"14:17"
],
[
"Low Dew Point",
"6.9 °C",
"10:03",
"4.3 °C",
"04:42"
],
[
"Low Wind Chill",
"6.0 °C",
"10:04",
"3.2 °C",
"05:33"
],
[
"High Heat Index",
"11.5 °C",
"11:20",
"12.3 °C",
"13:31"
]
]
}
All of the actual data in there has a web tag, so you could create a template using the above, substituting web tags for the values, and then get MX to process and upload that file to your web site. You then replace the URL in the todayyest.js file to load that instead. The dashboard and 'now' pages have the added complication that they use websockets, so you would probably want to change that to use Ajax instead.
There's quite a bit of work involved in all of this, it would be much easier if MX had support for it built in. You may find it easier to do as you originally asked, and just put web tags in the pages! You would have to restructure some of the HTML because some of it is automatically created/modified by the javascript.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 12:02 pm
by dan_mcclurg
thanks for all the replies, I have started editing the HTML to use webtags. I will post the results once they are done if that's okay steve?
Re: Password Protect settings pages
Posted: Sun 24 May 2015 12:04 pm
by steve
Yes, that's fine, I'm sure people will find it useful. I may have a look at doing a version using JSON with proper support from MX - it will be an interesting diversion.
Re: Password Protect settings pages
Posted: Sun 24 May 2015 12:26 pm
by dan_mcclurg
Steve I cant seem to get MX to process the dashboard index file. no obvious errors anywhere, it just wont process
Re: Password Protect settings pages
Posted: Sun 24 May 2015 12:27 pm
by dan_mcclurg
never mind, all sorted, I had forgotten to set the file as a HTM as opposed to HTML. all working