I have posted on the devinfo list but thought I'd add something here.
I have been messing with mojolicious. There has been a lot of chat about trying to build a new server manager with it, but that would need an entire framework designed and built and is well beyond me.
So I was curious about it and my aim was to try and produce a simple panel which could integrate with the existing server manager to allow me to easily change my ipsec stuff as it has lots of config items and is tricky on the CLI and easy to make typos for important settings.
I have no idea whether I can successfully do this. However, I can see the potential of Mojo.
I have opened a git repo here if anyone is interested in playing - either make a PR or mail me your username and I can add you as a collaborator:
https://github.com/reetp/mojotestsEssentially create an ibay, make sure it allows executable content, drop the file into the cgi-bin dir and make sure the perms are set as follows:
chown root:www *.cgi;chmod 0750 *.cgi;chmod u+s *.cgi
(I am not 100% sure if that is tight enough, but it will at least run!)
Install mojo:
yum install perl-Mojolicious --enablerepo=fws
You can clone the file into the cgi-bin dir like this:
git clone https://github.com/reetp/mojotests .
The code has a hard coded link to a css file which you may want to modify.
It has a dropdown that you can select and then submit which returns you back to the original page. I am not sure yet how to capture the selected items..... I'll figure that today I hope
Something that the documentation didn't easily explain here
http://mojolicious.org/perldoc/Mojolicious/Plugin/TagHelper was how to get the form to actually react.
I realised you had to wrap the template tags with <form> tags which it doesn't mention !
I had this code form the docs:
<%= select_field 'networks' => [ @{ stash('stuff') }], id=> 'dropdown' %>
But it actually needed wrapping like this:
<form name="networks" action="./readtest1.cgi/agent" method="POST">
<%= select_field 'networks' => [ @{ stash('stuff') }], id=> 'dropdown' %>
<input type="submit" value="Submit">
</form>
That applies to all the helper tags....
Once I had figured that we were off to the races.
Please have a play and let me know how you get on !