Discussion:
Server-Manager / Mojo
(too old to reply)
John Crisp
2018-01-24 13:31:48 UTC
Permalink
Well, I have had a reasonable play with stuff and can see some ways
forward but would like some input.

I have also had a look at the fundamentals of what Stefano was doing and
generally understand that.

Both Stefano and I went at the problem from different angles but we both
found one problem in common, and that is how data is queried and
returned to the calling application.

The roadblock I have hit, which Stefano also found, was a lack of a
generic API.

Yes, we have the underlying esmith libraries eg configDB, accountsDB,
networkDB but if you want to query them you need some perl to do so.

Ideally we should be able to query the server and get back either some
html or say JSON to be able to display the manager. More separation
between the visual front end and the server backend.

Having had a good look through it struck me that the answer was kind of
in front of me.

Currently we have this kind of approach:

Directories - I'll refer to them as functions and vendor_perl:

/etc/e-smith/web/functions (this should really be called 'templates IMHO)

/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel


So we get:

web browser <-> functions <-> vendor_perl

For example:

functions/useraccounts queries vendor_perl....useraccounts

Now useraccounts holds lots of nice little routines - create_user,
modify_user etc etc. Cool. Except.......

Rather than just being a set of functions, it also has a pile of
embedded FormMagick template stuff. So the routines are unusable as they
are.

It returns an answer, with some FormMagick back to the 'function' file,
which also has a load more FM stuff. There is no separation of code and
content.

However, as a way forward we have a much better example in the WBL contrib.

The vendor_perl file is pretty well JUST code, and the 'function' file
is pretty well JUST a FM template. It would probably be fairly easy to
remove the FM from the vendor_perl file and create a new Mojo based
'function' file.

Still with me ?

So what can we do ?

My suggestion would be to do the following:

1. Put all the current SM related files in one rpm - currently it is in
at least 2. It can then be removed if required without breaking anything.

2. A new directory structure for a new SM run from a new virtual host so
we can build and test

3. Copy the vendor_perl files into a new dir and strip the FM code from
them to make them pure code/function files. Some will be easier than
others but the core stuff has about 20 odd files to rework. With a
separate SM system we can run the two together if needs be (at least on
a test box)

4. Create some new 'function' files using Mojo - to be really clever we
can probably set some form of switch so they can output either html to
be rendered by say bootstrap/jquery as per my demo OR JSON that can be
read my any other type of system/frontend

Now, this is all very simplistic as I don't do complicated.

Here's another question. We can use either Mojolicious or Mojolicious::Lite

The difference as far as I can see is that Mojo full fat uses an entire
directory structure with separated code and templates whereas Mojo Lite
embeds the template in to the perl file.

You can check this for yourself like this:

Make a temp dir someplace. Then:

mojo generate lite_app LiteManager

mojo generate app FullManager


See the difference.

To date I have been using the Lite version. I'd suggest the full fat
version is better with separated templates.

If we are smart I think then you should be able to do something like

https://your.server/servermanager/useraccounts

(called from the SM panel) Displays useraccount page as normal


https://your.server/servermanager/useraccounts?get_user&username=joe

Returns a JSON encoded string of the information

Your API basically becomes all the functions that are in the vendor_perl
files. No knowledge of perl required at that point unless you want to
add a new API function.

If you want to shift platform them someone rewrites
events/actions/libraries but the API calls stay the same.

Now, I can do a bit of this, but anything related to security is way out
of my depth, be that configuring a virtual host, login panels etc

I might be able to rework some of the panels, but certainly not all - my
coding skills are nowhere near good enough.

I may try and hack the WBL files to see if what I am proposing actually
works, but I am pretty sure it would.

I'm quite happy to do some of the lifting on this, but will need some
help in the first instance.

If I am completely wrong or barking up the wrong tree then put me out of
my misery immediately. If the approach seems reasonable then is anyone
going to help or am I just wasting my time?


Tin Hat at the ready.....
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
brian read
2018-01-24 15:00:29 UTC
Permalink
as per our offlist conversations - I am definitely up to help - but like
you no real experience vis a vis security etc, however I have programmed
in many languages and can do "standard" Perl reasonably well (although I
do make all my programs look as though they have been programmed in
Pascal!).
Post by John Crisp
Well, I have had a reasonable play with stuff and can see some ways
forward but would like some input.
I have also had a look at the fundamentals of what Stefano was doing and
generally understand that.
Both Stefano and I went at the problem from different angles but we both
found one problem in common, and that is how data is queried and
returned to the calling application.
The roadblock I have hit, which Stefano also found, was a lack of a
generic API.
Yes, we have the underlying esmith libraries eg configDB, accountsDB,
networkDB but if you want to query them you need some perl to do so.
Ideally we should be able to query the server and get back either some
html or say JSON to be able to display the manager. More separation
between the visual front end and the server backend.
Having had a good look through it struck me that the answer was kind of
in front of me.
/etc/e-smith/web/functions (this should really be called 'templates IMHO)
/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel
web browser <-> functions <-> vendor_perl
functions/useraccounts queries vendor_perl....useraccounts
Now useraccounts holds lots of nice little routines - create_user,
modify_user etc etc. Cool. Except.......
Rather than just being a set of functions, it also has a pile of
embedded FormMagick template stuff. So the routines are unusable as they
are.
It returns an answer, with some FormMagick back to the 'function' file,
which also has a load more FM stuff. There is no separation of code and
content.
However, as a way forward we have a much better example in the WBL contrib.
The vendor_perl file is pretty well JUST code, and the 'function' file
is pretty well JUST a FM template. It would probably be fairly easy to
remove the FM from the vendor_perl file and create a new Mojo based
'function' file.
Still with me ?
So what can we do ?
1. Put all the current SM related files in one rpm - currently it is in
at least 2. It can then be removed if required without breaking anything.
2. A new directory structure for a new SM run from a new virtual host so
we can build and test
3. Copy the vendor_perl files into a new dir and strip the FM code from
them to make them pure code/function files. Some will be easier than
others but the core stuff has about 20 odd files to rework. With a
separate SM system we can run the two together if needs be (at least on
a test box)
4. Create some new 'function' files using Mojo - to be really clever we
can probably set some form of switch so they can output either html to
be rendered by say bootstrap/jquery as per my demo OR JSON that can be
read my any other type of system/frontend
Now, this is all very simplistic as I don't do complicated.
Here's another question. We can use either Mojolicious or Mojolicious::Lite
The difference as far as I can see is that Mojo full fat uses an entire
directory structure with separated code and templates whereas Mojo Lite
embeds the template in to the perl file.
mojo generate lite_app LiteManager
mojo generate app FullManager
See the difference.
To date I have been using the Lite version. I'd suggest the full fat
version is better with separated templates.
If we are smart I think then you should be able to do something like
https://your.server/servermanager/useraccounts
(called from the SM panel) Displays useraccount page as normal
https://your.server/servermanager/useraccounts?get_user&username=joe
Returns a JSON encoded string of the information
Your API basically becomes all the functions that are in the vendor_perl
files. No knowledge of perl required at that point unless you want to
add a new API function.
If you want to shift platform them someone rewrites
events/actions/libraries but the API calls stay the same.
Now, I can do a bit of this, but anything related to security is way out
of my depth, be that configuring a virtual host, login panels etc
I might be able to rework some of the panels, but certainly not all - my
coding skills are nowhere near good enough.
I may try and hack the WBL files to see if what I am proposing actually
works, but I am pretty sure it would.
I'm quite happy to do some of the lifting on this, but will need some
help in the first instance.
If I am completely wrong or barking up the wrong tree then put me out of
my misery immediately. If the approach seems reasonable then is anyone
going to help or am I just wasting my time?
Tin Hat at the ready.....
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-01-24 15:54:55 UTC
Permalink
Post by brian read
as per our offlist conversations - I am definitely up to help - but like
you no real experience vis a vis security etc, however I have programmed
in many languages and can do "standard" Perl reasonably well (although I
do make all my programs look as though they have been programmed in
Pascal!).
Thanks Brian :-)
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-24 19:24:36 UTC
Permalink
Post by John Crisp
I'm quite happy to do some of the lifting on this, but will need some
help in the first instance.
Tin Hat at the ready.....
You know me and my limited capabilities, although I am improving :-)

VMs at the ready..the first step is always the biggest..

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-01-24 19:36:23 UTC
Permalink
Post by Terry Fage
Post by John Crisp
I'm quite happy to do some of the lifting on this, but will need some
help in the first instance.
Tin Hat at the ready.....
You know me and my limited capabilities, although I am improving :-)
Mate you are a very patient star... !!
Post by Terry Fage
VMs at the ready..the first step is always the biggest..
Well I've done some investigation but am reluctant to spend any more time on it without some knowlegeable people telling me whether I am barking mad or not.

I've glossed over a lot (translations,security.....) but they are things that I know can be resolved.

It's more whether this is the right direction of travel.

I will try and do the WBL thing ASAP to see whether my theory works.

A bit of an issue is that as I am running it out of an ibay and it is a pain with perms/editing so a proper virtualhost & directory structure would help (you can only run a cgi file in cgi-bin and can't have any of the bootstrap/html stuff in the same directory)

Anyways, if there is interest, and it sounds the way to go, I'll do a bit more

Thanks for the support.

B. Rgds
JC
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-25 08:47:18 UTC
Permalink
So guys what is better to play with

The latest on our system:
yum --enablerepo=smedev,smetest install perl-Mojolicious

or the version on fws
yum install perl-Mojolicious --enablerepo=fws

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Jean-Philippe PIALASSE
2018-01-25 16:16:52 UTC
Permalink
Post by Terry Fage
So guys what is better to play with
yum --enablerepo=smedev,smetest install perl-Mojolicious
===================================================================================================================
 Paquet                            Architecture        
Version                         Dépôt                Taille
===================================================================================================================
Installation:
 perl-Mojolicious                  noarch              
6.44-3.el6.sme                  smedev               889 k
Installation pour dépendance:
 perl-IO-Socket-IP                 noarch              
0.37-1.el6.sme                  smedev                37 k
 perl-Net-DNS-Native               x86_64              
0.15-1.el6.sme                  smedev                27 k
 perl-Socket                       x86_64              
2.021-1.el6.sme                 smedev                48 k
 perl-Time-Local                   noarch              
1.2300-1.el6.sme                smedev                24 k
Post by Terry Fage
or the version on fws
yum install perl-Mojolicious --enablerepo=fws
 perl-Mojolicious                 noarch                
4.91-1.el6.fws                  fws                 856 k


I would rather suggest to get the latest version, so the first not the
latest ! Am I mixing people ?  :) GO for smedev, it is the newest
version 6.44-3
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive
John Crisp
2018-01-25 17:05:18 UTC
Permalink
Post by Terry Fage
So guys what is better to play with
I had started with Dans 4.91 but am happy to upgrade that
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public
John Crisp
2018-01-25 17:38:26 UTC
Permalink
Post by John Crisp
Post by Terry Fage
So guys what is better to play with
I had started with Dans 4.91 but am happy to upgrade that
Just updated my install and this works OK still as far as I can see

https://home.reetspetit.net/testbay/cgi-bin/template.cgi

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/pub
John Crisp
2018-01-25 20:11:05 UTC
Permalink
There are many, many improvements between Mojolicious 4.91 and latest of
7.61, but the basics are all still the same. Support for older versions of
perl get pretty shaky in the later versions however.
Ok - thanks Charlie.

I'd like your comments on the wider picture if you have a minute.

Happy to accept I may be barking mad.....
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-25 22:40:00 UTC
Permalink
Post by John Crisp
There are many, many improvements between Mojolicious 4.91 and latest of
7.61, but the basics are all still the same. Support for older versions of
perl get pretty shaky in the later versions however.
JPP, Charlie, thanks, I'll go with the smedev one
Post by John Crisp
Happy to accept I may be barking mad.....
Thats a given seeing your nationality :-) :-)

but, am happy to follow your madness :-) jeez we may actually get
something done here, I hope anyway.

Terry Fage on a most importatnt date, 26th January - Australia Day.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-25 22:55:35 UTC
Permalink
There are many, many improvements between Mojolicious 4.91 and latest of
7.61, but the basics are all still the same. Support for older versions of
perl get pretty shaky in the later versions however.
All - As far as the versions of perl in sme9 5.10

Mojo docs - Very clean, portable and object-oriented pure-Perl API with
no hidden magic and no requirements besides Perl 5.24.0 (versions as old
as 5.10.1 can be used too, but may require additional CPAN modules to be
installed)

Should we also be looking at updating perl, or is that a road to far?
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-26 06:04:12 UTC
Permalink
Post by Terry Fage
Should we also be looking at updating perl, or is that a road to far?
The latter, I think. :-)
Road to far was being a tad flippant, totally not feasable is probably a
better descriptor :-)
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Jean-Philippe PIALASSE
2018-02-04 18:55:16 UTC
Permalink
There are many, many improvements between Mojolicious 4.91 and latest of
7.61, but the basics are all still the same. Support for older versions of
perl get pretty shaky in the later versions however.
that said we should try to upgrade the smedev package from 6.44 to 7.62
... https://metacpan.org/release/Mojolicious

version 7.62 - 2018-02-01

JPP
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Michael Doerner | Technologywise
2018-01-30 00:59:39 UTC
Permalink
There have been several discussions in previous times (years) around
development of a new "server-manager". Some of these I did not
understand (and could not follow any urgency to make changes at that
time) but found that individuals were very passionate about their views
what needed to be done, what technology to use, what approach, etc.

The passion brought intense discussions and unfortunately disappointment
and frustration for some people at the time I believe.

I really appreciate that John is now trying a fresh initiative and feel
that I cannot sit on the sideline with a view of "I don't understand and
don't see a need for that" - and might look again as passive or not
supportive.

We (Technologywise) would like to try to help and to contribute with
this development. I have asked Richard from our team to subscribe to
this dev mailing list and to get an idea about the status around the
"Mojo" ideas, what some of you have tried so far. Whether we can
motivate Richard as a developer to learn Mojo and to spend time and to
contribute code (we as Technologywise would pay for Richard's time) or
whether we need to find another way - we will try to help with this.
With Richard's help I will try to set up a test environment for us as a
first step.

This is not a blank statement for a solution (which I don't have) but I
hope it motivates others on this list too.

Michael
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-01-30 01:38:56 UTC
Permalink
Maaaaaate :-)

You just made my day, week, month, maybe year.

Fingers now crossed hope this is a bit of a "throw some pertol on a
smoldering camp fire" and stand back, I hope :-)

OT: See we kicked your adopted tribes behinds at the Sydney 7s, men and
women :-)
Post by Michael Doerner | Technologywise
There have been several discussions in previous times (years) around
development of a new "server-manager". Some of these I did not
understand (and could not follow any urgency to make changes at that
time) but found that individuals were very passionate about their views
what needed to be done, what technology to use, what approach, etc.
The passion brought intense discussions and unfortunately disappointment
and frustration for some people at the time I believe.
I really appreciate that John is now trying a fresh initiative and feel
that I cannot sit on the sideline with a view of "I don't understand and
don't see a need for that" - and might look again as passive or not
supportive.
We (Technologywise) would like to try to help and to contribute with
this development. I have asked Richard from our team to subscribe to
this dev mailing list and to get an idea about the status around the
"Mojo" ideas, what some of you have tried so far. Whether we can
motivate Richard as a developer to learn Mojo and to spend time and to
contribute code (we as Technologywise would pay for Richard's time) or
whether we need to find another way - we will try to help with this.
With Richard's help I will try to set up a test environment for us as a
first step.
This is not a blank statement for a solution (which I don't have) but I
hope it motivates others on this list too.
Michael
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-01-30 09:24:10 UTC
Permalink
Post by Michael Doerner | Technologywise
We (Technologywise) would like to try to help and to contribute with
this development.
Thanks for the support Michael.

I really need to try and hack one of the core files to see if my idea flies.

Mojo isn't that hard... if I can do it....

Yup, hacking core stuff is much trickier but the first step is direction of travel.. ie is this the right approach.

I'm a bit tied up at the minute but will try and do something in the next few days to move it forward a bit.

I'm happy to help Richard as much as he wants. He can mail me anytime.

B. Rgds
John
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Stefano Zamboni
2018-01-30 09:32:30 UTC
Permalink
Post by John Crisp
Post by Michael Doerner | Technologywise
We (Technologywise) would like to try to help and to contribute with
this development.
Thanks for the support Michael.
Hi Michael, thank you.. and thank you to John to reopen this topic

BTW, I'd like to see and read some news/opinions/ideas from others before start moving in any direction

my 2c
S.

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-01-30 09:41:58 UTC
Permalink
Post by Stefano Zamboni
Hi Michael, thank you.. and thank you to John to reopen this topic
NP :-)
Post by Stefano Zamboni
BTW, I'd like to see and read some news/opinions/ideas from others before start moving in any direction
Same here.

I will try and do one panel to see if my thoughts actually work.

Give me a couple of days - it may be that I am barking completely up the
wrong tree.

If I'm right then I think we can build something, and make it extensible
to fulfil your concept as well.

B. Rgds
John
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Jim McLaren
2018-01-30 10:28:51 UTC
Permalink
Post by Stefano Zamboni
BTW, I'd like to see and read some news/opinions/ideas from others before start moving in any direction
I'm happy to try and break things if you want! :-) Time is limited and
coding skills zero, but I'll try and follow things if and when I can.

Cheers,
--
Jim McLaren
Cults Farm

Follow me on Twitter - Peasantmk2
Website: http://www.cultsfarm.co.uk
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-01-30 19:29:19 UTC
Permalink
Post by Stefano Zamboni
Post by Stefano Zamboni
BTW, I'd like to see and read some news/opinions/ideas from others
before start moving in any direction
I'm happy to try and break things if you want! :-) Time is limited and
coding skills zero, but I'll try and follow things if and when I can.
We'll need a pile of skills to make it fly including officialmcode wreckers :-)

Thanks Jim, and nice to hear from you.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Stefano Zamboni
2018-01-30 09:51:07 UTC
Permalink
Post by John Crisp
Same here.
I will try and do one panel to see if my thoughts actually work.
Give me a couple of days - it may be that I am barking completely up the
wrong tree.
If I'm right then I think we can build something, and make it extensible
to fulfil your concept as well.
well.. as we've seen before there are many ways to achieve the same result (a new server-manager) but the real issue here is not the way we'll choose but the lack of support by the devs, which seems not to be interested at all in this topic.

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Daniel Berteaud
2018-01-30 09:54:18 UTC
Permalink
Post by Stefano Zamboni
well.. as we've seen before there are many ways to achieve the same result (a new server-manager) but the real issue here is not the way we'll choose but the lack of support by the devs, which seems not to be interested at all in this topic.
Devs are just anyone willing to do the work. I'm just far too busy ATM
to step in.

++
--
Logo FWS

*Daniel Berteaud*

FIREWALL-SERVICES SAS.
Société de Services en Logiciels Libres
Tel : 05 56 64 15 32 <tel:0556641532>
Matrix: @dani:fws.fr
/www.firewall-services.com/
Jean-Philippe PIALASSE
2018-01-30 21:41:22 UTC
Permalink
Post by Stefano Zamboni
Post by John Crisp
Same here.
I will try and do one panel to see if my thoughts actually work.
Give me a couple of days - it may be that I am barking completely up the
wrong tree.
If I'm right then I think we can build something, and make it extensible
to fulfil your concept as well.
John,
Please keep going. As Daniel explained again, this is the one coding who
has the privileged to do it his own way. Verification could be done in a
second time for security issues, code improvement. This list and direct
PM has always been efficient when it has to be about a specific
technical issue or a blocking piece of code, but a more generic question
will leave mostly a silence. My idea is that this is because people
usually feel less confident on the subject that the one asking the
question after working on it for hours or days.

I will be happy to assist as long as I have time available and this is
something I am competent to do. One thing I can arrange is to build a
smeserver-manager rpm which could act as a sandbox pulling all
dependencies needed and setting Apache to access to the manager in a
mostly secure way. Will try to do this by the end of the week.

Rome wasn't built in one day, so just do not try to make it perfect on
first shot. But, as you know, you have already previous good example of
Stefano's work and Tony's to start with.
Post by Stefano Zamboni
well.. as we've seen before there are many ways to achieve the same result (a new server-manager) but the real issue here is not the way we'll choose but the lack of support by the devs, which seems not to be interested at all in this topic.
Stefano,
who are those "devs" and how many are they ?

This seems to me to be only an assumption: "seems not to be interested
at all in this topic". Have you think of any alternatives "do not feel
confident in this field", "overwhelmed by day work that pay for their
rent", "there are no devs", "family issues", "health issue" or anything
else ?

Do not misunderstand me  on those two questions, I do not want to start
a fight, rather want to change the point of view from "persecution /
fight" to let's try to work together and avoid assuming the worst when
things are not happening the way we would expect. I do not think anyone
around has bad intents.  Nobody is paid around to be here, so all of the
people here are there to do either something they enjoy, or they need
for them or their clients.  This is not a fight club (or I missed the
sign entering here), so I assume ( and I might be wrong as this is only
an assumption), that nobody here is happy to fight or to seek for
obstruction of others' work.

Remember SME Server is a community project. So devs are the community,
not one or two people making money of their time coding the software and
doing only what they want.


Anyway, thank you for all to keep on the discussion and help in whatever
way you are happy to !

Jean-Philippe

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.c
Stefano Zamboni
2018-01-30 10:05:17 UTC
Permalink
Post by Daniel Berteaud
Post by Stefano Zamboni
well.. as we've seen before there are many ways to achieve the same result (a new server-manager) but the real issue here is not the way we'll choose but the lack of support by the devs, which seems not to be interested at all in this topic.
Devs are just anyone willing to do the work. I'm just far too busy ATM
to step in.
I disagree.. I already proposed a way, a POC with some working code and asked for feedback (not for work)..
there's nothing frustrating like doing something with passion and then see that no one gives you feedback..
Moreover, if John or me or anybody else choose a way, I expect others to agree and to step in, thinking that it's all done for our product; on the contrary, I saw no interest and some "nays".

IIUC you're saying that we're free to decide and that the other guys will follow.
So Dani, at the end, my question for you is: if we'll start to work on a new S-M will you step in or will we discover, in the future, that you choose another way (letsencrypt..)?

Thank you for your clarification
S.

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinf
John Crisp
2018-02-01 23:15:18 UTC
Permalink
Just as a FYI so you don't think I am skiving or can't be bothered or
have given up.....

I have started a very pedestrian attempt at replicating the WBL panel.

It is pedestrian because I am a crap coder, but I'm making slow
progress. And everything at work seems to be committing Seppuku every 3
seconds.

As soon as I have a bit of it done to demonstrate I'll post a link.

Have noted some of the links posted and will follow that up in due course.

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-02-01 23:43:15 UTC
Permalink
Post by John Crisp
Just as a FYI so you don't think I am skiving or can't be bothered or
have given up.....
I have started a very pedestrian attempt at replicating the WBL panel.
I am a patient man :-)

Hoping the bods in the not quite a state of Oz will be able to throw
some resources at it as well.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-02 20:44:51 UTC
Permalink
On 02/02/2018 10:15 AM, John Crisp wrote:.
Post by John Crisp
I have started a very pedestrian attempt at replicating the WBL panel.
I am a patient man :-)
Need to be :-)
Hoping the bods in the not quite a state of Oz will be able to throw
some resources at it as well.
LOLz

FYI I have actually built something as a demo. It does work....
feeling a bit smug even if the code is crap. It works.

I ran out of time to need to organise and push it to a repo and
testbox so you can test. Currently it is on my home server with live
info...

May take a day or too to push it, but I have a simple read only SM
panel with no FormMagick or CGI in sight (as far as I can tell) !!!



_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-02-02 21:50:37 UTC
Permalink
Post by John Crisp
On 02/02/2018 10:15 AM, John Crisp wrote:.
Post by John Crisp
I have started a very pedestrian attempt at replicating the WBL panel.
I am a patient man :-)
Need to be :-)
Hoping the bods in the not quite a state of Oz will be able to throw
some resources at it as well.
LOLz
FYI I have actually built something as a demo. It does work.... feeling
a bit smug even if the code is crap. It works.
I ran out of time to need to organise and push it to a repo and testbox
so you can test. Currently it is on my home server with live info...
May take a day or too to push it, but I have a simple read only SM panel
with no FormMagick or CGI in sight (as far as I can tell) !!!
Oh yeah, its coming, I can see it...good job
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Jean-Philippe PIALASSE
2018-02-04 18:33:24 UTC
Permalink
FYI I just pushed a sandbox rpm to be able to dev a new panel aside to
the old one :
https://bugs.contribs.org/show_bug.cgi?id=10506

this is for SME10, but I made it tolerant to sme9
in other word you can download the package manually and then yum install
it (think to add --enablerepo=smedev to pull deps)

see bug for more infos.
Post by Terry Fage
Post by John Crisp
On 02/02/2018 10:15 AM, John Crisp wrote:.
Post by John Crisp
I have started a very pedestrian attempt at replicating the WBL panel.
I am a patient man :-)
Need to be :-)
Hoping the bods in the not quite a state of Oz will be able to throw
some resources at it as well.
LOLz
FYI I have actually built something as a demo. It does work....
feeling a bit smug even if the code is crap. It works.
I ran out of time to need to organise and push it to a repo and
testbox so you can test. Currently it is on my home server with live
info...
May take a day or too to push it, but I have a simple read only SM
panel with no FormMagick or CGI in sight (as far as I can tell) !!!
Oh yeah, its coming, I can see it...good job
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
--
*Jean-Philippe Pialasse DC PhD*
John Crisp
2018-02-04 18:53:18 UTC
Permalink
Post by Jean-Philippe PIALASSE
FYI I just pushed a sandbox rpm to be able to dev a new panel aside to
https://bugs.contribs.org/show_bug.cgi?id=10506
this is for SME10, but I made it tolerant to sme9
in other word you can download the package manually and then yum install
it (think to add --enablerepo=smedev to pull deps)
see bug for more infos.
Thanks JPP.

I need to try and sort one 'save' routine as a test but pretty sure it will work... the only issue being my lack of coding skills !!

I will then open a bug as a coverall and then one per vendor perl file where we can work at stripping FM code and reducing it to a pure function file.

You have to work on creating a template at the same time so you make sure each bit is reproduced correctly.

We do not need to really worry about formatting in the templates... just output a text box/form/drop down using the mojo codes. And we only need to work on the contents of each panel, not the whole thing. Someone can then write some css to format the objects as required.

I'm going to stick with the AdminLTE template for now (though I'll try to update to the latest code) purely cos Tony got quite a reasonable representation and I can't be arsed to hack css.

For demo purposes it works fine.

Onwards & upwards.

Who is going to spoil the party and tell me I have a fatal flaw in my plan?? :-)
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-04 13:35:41 UTC
Permalink
OK peeps, try this.

https://test.reetspetit.info/testbay/cgi-bin/wbl.cgi

Notes

There are a load more in the wbl.cgi file

'Home' gets you back to the start
Select from the list and it will read the live values from the server
Save/Submit for pages does not work as I haven't written that yet -
you'll get a nice error

Currently ALL the Mojo template code is in the one file. It reloads the
entire page every time which is probably not really necessary (I'm not a
html/bootstrap person) and is slow.

It loads main.html.ep which pulls in _choice.html.ep on the first request

On the next POST it checks which option is selected (SWITCH) and then
decides which bit of template to add to main

e.g selecting whitelist sets a key - main.html.ep loads and then
includes _white.html.ep

It kind of works like this

.main.html.ep
Some header code
{Check which panel has been called and include it
_choice.html.ep
_white.html.ep
_black.html.ep
_rbl.html.ep
}
Some footer code


This is very primitive but works.

The templates could be split out in to separate files. main.html.ep then
dictates the whole page look n feel, and then you just need a template
fragment per panel.

If you just do a fragment you do not have to understand how bootstrap or
CSS works particularly as that is all set in the main template.

Yes, you could have a style guide with CSS IDs for elements or some-such
- beyond me.

The really important points are....

Because wbl.pm was well written I barely had to touch it. Commented out
FM and CGI and that was about it.

It adds \n to array data which I disabled as it isn't necessary with Mojo

The template just calls the routines in wblNew.pm and formats it out as
html.

It would be easy to write some code to output JSON or somesuch instead -
see the way I called the wbl routines. A bit of smart code could enable
you to call any of those routines via a call such as


wbl.cgi?get_dnsbl

or whatever.

The called wblNew.pm routines should probably be part of the SWITCH
statement, so they only get called when the relevant call is made.

I'm sure someone will figure the technical complexities of it, but that
gives you LOADS of core routines you can call from anywhere like a
remote API, and no knowledge of perl required for the other end.

It just needs the relevant route setting up in the template.


To try this yourself:


Set up ibay eg testbay - make sure executable content is allowed

cd /home/e-smith/files/ibays/testbay/html

git clone https://github.com/reetp/server-manager.git

cd server-manager

copy wblNew.pm to /usr/share/perl5/vendor_perl/esmith/FormMagick/Panel

cp wblNew.pm /usr/share/perl5/vendor_perl/esmith/FormMagick/Panel

copy wbl.cgi to the cgi dir

cp wbl.cgi /home/e-smith/files/ibays/testbay/cgi-bin

chown the cgi file

chown root:www /home/e-smith/files/ibays/testbay/cgi-bin/*.cgi
chmod 0770 /home/e-smith/files/ibays/testbay/cgi-bin/*.cgi
chmod u+s /home/e-smith/files/ibays/testbay/cgi-bin/*.cgi

Now go to www.yourdomain.com/testbay/cgi-bin/wbl.cgi

Careful with the perms and don't get hacked - testbox only please ;-)

I need to look at the save stuff, but I don't think it is too terrible -
just the reverse of what i have done here really :-)

The challenge will be one of the bigger files like say useraccounts. But
it isn't impossible. Strip out the FM code, JUST return the data, and
build a new template fragment to format it.

Questions ?
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-06 11:30:09 UTC
Permalink
Post by John Crisp
OK peeps, try this.
https://test.reetspetit.info/testbay/cgi-bin/wbl.cgi
Notes
Ok, following on from this I have now split out the templating from the
web/function file

git pull
copy wbl.cgi AND the templates directory to your cgi-bin directory
chmod the cgi file

You will see that the templating has disappeared from the wbl.cgi and is
now in a set of templates. Note that we could have separate directories
in templates for each panel

'main.html.ep' for the overall structure and is always called.

_somefile.html.ep are the separate section templates for the particular
panel

I will try and add these to the smedev server-manager package so the all
the files are in the right place and it is easier to install/test. I
need a bit of time to do that !

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-06 13:19:16 UTC
Permalink
On 04/02/18 22:02, Charlie Brady wrote:

Hi Charlie, and thanks for you comments.
Post by John Crisp
OK peeps, try this.
https://test.reetspetit.info/testbay/cgi-bin/wbl.cgi
John, I think you are trying to tackle too many problems at the same time.
Replace a panel by a similar panel implemented with different technology.
Don't try to design a whole server-manager. The updated Koozali look with
the collapsing navigation menus is a very interesting project, but it is
orthogonal to the problem of implementing a wbl panel using Mojolicious on
the backend.
Orthogonal ? Is that something to do with dentistry ? Cos trying to
clean up the mess that is in there is like pulling teeth quite frankly :-)

I'm trying to tackle a whole host of problems because they need fixing.

"A coward verely neuer obteyned the loue of a faire lady"

The current system is outdated and messy. If we are going to rebuild the
server-manager we may as well go all in instead of just trying to tweak
what is there.

I'm trying to preserve as much of the useful functionality that is
already there, and there is plenty of it. But I don't want to throw the
baby out with the bathwater.

I have used the wbl panel as an example, mainly because it is one of the
cleanest file sets we have so it was easy to modify (the original old
core files are the messy ones and will take more time to clean up)

The same principle can then be applied to any of the other files in
FormMagic/panels.

The front end using bootstrap is really a corollary to the main problem
of sorting out the backend. We could use ANY html formatting frontend to
display data, assuming we get the back end to produce the data we want.

I picked the one I did as it was there, and worked. Anyone with some
html/bootstrap experience can hack together a template. You could even
have different selectable themes with whatever bells and whistles you
want. Yes, whoever does a template needs to document out what each CSS
selector does and will look like so you can use IDs/classes in the
templates so it looks right, but that is just detail. (Note using
bootstrap/jquery I believe that we can refresh the centre 'panel'
without reloading the entire page which would be handy, and much faster.)

The key part is separating the function from the content. How we then
format it is a non issue as there are so many tools out there to do it.
Quite frankly you could use a PHP frontend if you really felt sad and
lonely ;-) All it has to do is call your functions, and then use your
PHP framework to format the data.

Your web/function becomes a shim between between the calling end ie web
browser/server and the perl back end.

As I illustrate in the PDFs below, we have a great set of routines
already written. Just buried in FM and cgi.

cd /usr/share/perl5/vendor_perl/esmith/FormMagick/Panel
grep sub *

Look at say useraccounts.pm:

useraccounts.pm:sub modify_admin
useraccounts.pm:sub modify_user {
useraccounts.pm:sub create_user {
useraccounts.pm:sub set_groups
useraccounts.pm:sub remove_account {
useraccounts.pm:sub reset_password {
useraccounts.pm:sub lock_account {
useraccounts.pm:sub validate_acctName
useraccounts.pm:sub validate_acctName_length {
useraccounts.pm:sub validate_acctName_conflict
useraccounts.pm:sub check_password {

So all our template needs to do is call the subroutines.

Yes, some need modifying eg:

useraccounts.pm:sub print_user_table {

That should be:

useraccounts.pm:sub get_users {

And return a list of users for the template to output.

But you get the idea.
https://en.wikipedia.org/wiki/Post/Redirect/Get
I don't per se disagree with that, but it is incidental to what I was
trying to do in the first instance.

I would fully intend that each panel has it's own URL, similar to the
way that the current manager works.

So you have:

https://yourserver.com/server-manager/wbl
https://yourserver.com/server-manager/useraccounts
https://yourserver.com/server-manager/ibays

blah.

Of course they will need validation and security and a whole pile of
other things, but I am currently trying to look at an overview rather
than specifics.

I have added a couple of PDFs to my git to illustrate the existing
system, and a possible alternative:

https://github.com/reetp/server-manager/blob/master/SMEExistingLayout.pdf

https://github.com/reetp/server-manager/blob/master/SMENewLayout.pdf
Post by John Crisp
Replace a panel by a similar panel implemented with different
technology.
I've created a skeletal 'wbl' panel, implemented with Mojolicious.
https://pastebin.com/ZpnDyZbw
Funny that you did this because when I originally did a template you said

"Don't bounce around your URL space when you don't need to. Keep things
as simple as possible."

So I had...... by keeping it all under /

eg.

post '/' => sub {


Hence I tried to keep everything for 'wbl' under one call. Separating it
out like this makes life much easier, and is potentially more flexible:

get '/rbl' => sub {
} => 'rbl';
post '/rbl' => sub {
};

Ideally I think we'd have something like this (only an illustration)

index
get '/' => sub {
post '/' => sub {

wbl
get '/wbl' => sub {
post '/rbl' => sub {

useraccounts
get '/useraccounts' => sub {
post '/useraccounts' => sub {
if (only '/useraccounts') {
output a template
}
else (direct call /useraccount?get_users)
output some string of data
}

Blah blah foo foo

My attempt at a web function template is not as clean and tidy as yours,
perl wise, but equally I do not believe we should have any server API
calls or formatting in the function file beyond a call to the backend,
and the template has nothing but the plain html structure eg form,
dropdown, table etc.

So none of this:

use esmith::ConfigDB;
app->defaults(db => esmith::ConfigDB->open);


Leave the real server perl trickery in the background hidden from view.

Leave all the formatting to the front end which is designed for the job.

(and this was Stefanos original point, well made)

That way anyone can call your web/functions using any frontend and
display it as they see fit.

Yes, if you want added core functionality you will have to write some
new perl routines in vendor_perl. But that is where they belong.

As a for instance with my ipsec contrib I would

write some get/set db routines as ipsec.pm in vendor perl
write a function file in web/functions to call the routines - possibly
utilising other existing functions if required
write a template to output the basic data depending how it is called

All nicely separated.

It is then possible to access that either via the server-manager, or via
some other front end.

My next goal is to try and save some data, and have a go at one of the
old core file such as useraccounts and rid it of the FM/CGI code.

I never said any of this was particularly easy, though it is easier than
I thought in some respects. But when you look at what some of the
competition is doing, they are all heading down the same route.

And that is the way we should go to.

If people are interested and prepared to muck in and help I think this
is perfectly 'doable' and will give us a much more flexible front end to
SME.

I am trying to demonstrate my ideas with some code, and will do a bit
more with JPPs new RPM so it becomes easier to install and view. We can
develop it in tandem with, but completely separate from, the old manager
until such time as we are happy with it. Rome was not built in a day.

If none of this makes sense then please ask for clarification as I may
not have explained myself very well.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Terry Fage
2018-02-06 18:04:32 UTC
Permalink
Post by John Crisp
If none of this makes sense then please ask for clarification as I may
not have explained myself very well.
All the bits are there and can see where the train is heading, what the
driver and others do to get it there is just work :-)

I am but a babe in the woods around this but I can see the light, its there.

Terry

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-06 18:51:23 UTC
Permalink
Post by Terry Fage
Post by John Crisp
If none of this makes sense then please ask for clarification as I
may
Post by John Crisp
not have explained myself very well.
All the bits are there and can see where the train is heading, what the
driver and others do to get it there is just work :-)
I am but a babe in the woods around this but I can see the light, its there.
LOL... just crowbarring some stuff in to JPPs rpm.

Be much easier to install and test.

Hope to have that sorted tomorrow.

Keep ya posted.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-06 20:08:16 UTC
Permalink
Post by John Crisp
Post by John Crisp
I'm trying to tackle a whole host of problems because they need
fixing.
Post by John Crisp
"A coward verely neuer obteyned the loue of a faire lady"
The current system is outdated and messy. If we are going to rebuild
the
Post by John Crisp
server-manager we may as well go all in instead of just trying to
tweak
Post by John Crisp
what is there.
"O ye'll tak' the high road, and I'll tak' the low road, and I'll be
in Scotland a'fore ye"
LOL. Tortoise and hare then :-)

All you'll have done is swapped your horse drawn chariot for a car. I'd prefer the luxury of flight, even if it takes me longer to design wings.
Post by John Crisp
You have a lot of things you want to fix. Fine. But bundling them all
together and making them interdependent guarantees that you will never be done.
No guarantees of anything in life...

Maybe it will, maybe it won't. It depends on more than just me. Is a software project ever really finished ? SME has never been 'finished'.

Things are already interdependent. Overly so, with handcrufted code buried in different places in different files. All I really want to do is get shot of FM code and put bits in the right places and generate clean data.
Post by John Crisp
Fix the problems one at a time and you will knock them off one at a time.
I kind of am. Fixing the spaghetti in the vendor perl files and function files is a first step. Getting shot of FormMagick is a big job.

Doesn't mean it should be avoided.... it's put a lot of people off panel building, me included.

Trying to bodge round it is nothing but a waste of good time, unless you have some really good technical reasons why not, rather than just 'don't try', it's impossible, it'll never fly.

What is strange is that I can build a very rough panel and framework from scratch in days. With no knowledge of Mojo and piss poor coding skills. That's thanks to a clean perl file, some mojo, and a bit of bootstrap.
Post by John Crisp
The look and feel on the navigation frame can be changed now - doesn't
need to wait until every panel has been redesigned.
Look & feel is absolutely no big issue if you produce some clean data. I'm no html/guru but frankly even I know that front end stuff is pretty trivial to a reasonable hack. Html/CSS coders are 2 a penny.

Separation and modularity is the name of the game, unless I missed something.

I used the bootstrap stuff because it was there, and to give an illustration of what could be done as it was prettier than plain text. I could have used a variety of display mechanisms because I had clean simple data to work with (and neatly provided by the SME core backend)

So forget display. It is totally irrelevant right now. I'm not 'bothered' about replacing it per se. I'm more bothered about the hardwiring that makes it hard to replace or enhance. Display will then almost take care if itself.

Let's concentrate our attention on taking the excellent back end code SME has and producing nice clean formatted data via a set of accessible routines that can be utilised anywhere, anyhow. Think in terms of building an accesible API rather than fixing the display.
Post by John Crisp
Every panel doesn't need to be redesigned now.
Might as well. They are all a mess and so 1990s....... the days when we built sites by hand, Dreamweaver seemed a miracle tool, CSS wasn't even a glimmer in a sadists eye, there was no separation of function from form, and Esmith was streets ahead on linux configuration.

This is 2018.

It is just a slow and painstaking job. But then cleaning always was.

We can easily run stuff side by side. Fix the core stuff first, either migrate or write new with anything else eg my ipsec. I'd write a panel for the new system and forget the old.

Remember something you told me years back before v9?

Don't talk. Code.

So I had a go at installing on SME on Centos 6 (spectacular fail), and that kickstarted a lot of the dev.

I'm just doing what you told me :-)

Guide me and help me, point out better ways of what I AM doing, but don't tell me it will never be done...... that's red rag to a bull.

It can be done - I've proved the basics of it. It's just a case of how.

Equally it has generated interest. Chatter, buzz, discussion, maybe even some more code. That is actually just as important to a project.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Stefano Zamboni
2018-02-06 22:44:11 UTC
Permalink
Sorry for top quoting, at the phone

Charlie, thank you for you observations

Any chance to see you give some help too? Other than rowing in the opposite direction, I mean

Thank you in advance
Post by John Crisp
Post by John Crisp
I'm trying to tackle a whole host of problems because they need
fixing.
Post by John Crisp
"A coward verely neuer obteyned the loue of a faire lady"
The current system is outdated and messy. If we are going to rebuild
the
Post by John Crisp
server-manager we may as well go all in instead of just trying to
tweak
Post by John Crisp
what is there.
"O ye'll tak' the high road, and I'll tak' the low road, and I'll be
in Scotland a'fore ye"
You have a lot of things you want to fix. Fine. But bundling them all
together and making them interdependent guarantees that you will never
be
done.
Fix the problems one at a time and you will knock them off one at a
time.
The look and feel on the navigation frame can be changed now - doesn't
need to wait until every panel has been redesigned.
Every panel doesn't need to be redesigned now.
_______________________________________________
Server Development Discussion
Searchable archive at
https://lists.contribs.org/mailman/public/devinfo/
--
Inviato dal mio dispositivo Android con K-9 Mail. Perdonate la brevità.
John Crisp
2018-02-07 10:09:59 UTC
Permalink
Post by Stefano Zamboni
Sorry for top quoting, at the phone
Ha... you're eccused :-)
Post by Stefano Zamboni
Charlie, thank you for you observations
Any chance to see you give some help too? Other than rowing in the opposite direction, I mean
This was my point. I'm happy to listen to technical reasons why this approach is wrong, but not just "don't"

Greg made a point to me that perhaps in say useraccounts it may be difficult due to record locking or similar.

Ok, that might make sense (though as everything can really be called on the CLI I don't see an issue if the SM is just a wrapper to the dbs) but I'd appreciate a technical diagnosie viewpoint on the difficulties.

Beyond that my time is my own to waste :-) (don't tell the wife though!)

At least this direction we can build separate from the existing manager so we break nothing. It might take months. Might take years. Doesn't really matter.

All contribs are undoubtedly going to have to have at least some work migrating to v10 so we might as well start now on the core stuff and if it works then perhaps push contribs straight to it.

Once again, if there are any good technical reasons for not trying this then please say so. Otherwise I shall continue to amuse myself and learn more.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Greg Zartman
2018-02-07 18:33:07 UTC
Permalink
Post by John Crisp
Greg made a point to me that perhaps in say useraccounts it may be
difficult due to record locking or similar.
That's not entirely what I meant. I was using that as an example. The
point I was trying to make is that useraccounts.pm contains quite a bit of
logic that get's things properly setup so that when you run the user-create
event, the user is created. One of the checks the panel code does is for
username and pseudonym clashes.


Ok, that might make sense (though as everything can really be called on the
Post by John Crisp
CLI I don't see an issue if the SM is just a wrapper to the dbs) but I'd
appreciate a technical diagnosie viewpoint on the difficulties.
I don't think you can just create a user from the CLI without a few steps.
Sure it is possible, and I believe there is a contrib to make it easier,
but it isn't a one step deal. For example, you can't just trigger the
user-create event with a username and the user will be created because of
this in the very first action:

#------------------------------------------------------------
# Create the Unix account
#------------------------------------------------------------

die "username argument missing" unless defined ($userName);

my $acct = $accounts->get($userName);
unless (defined $acct and $acct->prop('type') eq "user")
{
die "Account $userName is not a user account; create user failed.\n";
}


The user-create event expects the dbase to entry to already have been made
for both the username itself and the pseudonyms. Therefore, any new panel
code would need to replicate that logic.


The point I was trying to make is that I don't think you can, or want, to
use the FM perl modules as they sit. Sure, there is some code in there
that can be re-used, but I think you need to step back and look at the
bigger design picture with mojo. Those FM perl modules aren't regular perl
modules. They are basically the logic part of the panels, so there's more
in there than regular function/methods that can be recycled. Recycling
them really would be a hack, IMO.

Greg
John Crisp
2018-02-12 12:32:03 UTC
Permalink
Ok, this is a test and I haven't committed anything. It should install
alongside your normal stuff without breaking anything.

I decided to separate the html manager part (AdminLTE/bootstrap etc)
from the core code - it was plain easier for now as I intend to update
the AdminLTE code when I get a minute.

It also means you can use any old formatting front end/ CSS template of
your choice.

Get the rpms from here:

wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm

wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-1.el6.sme.noarch.rpm

yum localinstall smeserver-manager*

signal-event post-upgrade; signal-event reboot

Go to you server:

https://x.x.x.x/server-manager2/cgi-bin/wbl

Login with your admin/password

'Home' takes you back to the first page.

------------------------------

The Mojo templates are like this:

main.html.ep

Loads the CSS styling and then outputs and builds the page frame so top
bar, left side etc.

_choice.html.ep

First 'Landing' panel.
Only uses CSS 'class= content'. All formatting handled by CSS.


_black.html.ep
_white.html.ep
_rbl.html.ep

Panels shown depending on original choice

Only uses CSS 'class= content'. All formatting handled by CSS.

Note this is really just a simple test with no fancy stuff.

Let me know what happens - you may need some settings in the wbl db to
get data.

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
brian read
2018-02-12 12:46:55 UTC
Permalink
Hi John

yes, that works for me.

I'll try to work out "how" now!


Cheers Brian
Post by John Crisp
Ok, this is a test and I haven't committed anything. It should install
alongside your normal stuff without breaking anything.
I decided to separate the html manager part (AdminLTE/bootstrap etc)
from the core code - it was plain easier for now as I intend to update
the AdminLTE code when I get a minute.
It also means you can use any old formatting front end/ CSS template of
your choice.
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-1.el6.sme.noarch.rpm
yum localinstall smeserver-manager*
signal-event post-upgrade; signal-event reboot
https://x.x.x.x/server-manager2/cgi-bin/wbl
Login with your admin/password
'Home' takes you back to the first page.
------------------------------
main.html.ep
Loads the CSS styling and then outputs and builds the page frame so top
bar, left side etc.
_choice.html.ep
First 'Landing' panel.
Only uses CSS 'class= content'. All formatting handled by CSS.
_black.html.ep
_white.html.ep
_rbl.html.ep
Panels shown depending on original choice
Only uses CSS 'class= content'. All formatting handled by CSS.
Note this is really just a simple test with no fancy stuff.
Let me know what happens - you may need some settings in the wbl db to
get data.
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-12 13:28:45 UTC
Permalink
Hi John
yes, that works for me.
I'll try to work out "how" now!
Yay !!!!!!

The rest is not rocket science ;-)

Just remember that the function file is very poor code but illustrates the concept
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo
John Crisp
2018-02-15 23:44:05 UTC
Permalink
A quick update. Note that most of this is just to prove some things work
as I thought.

First I have renamed one of my git repos. They are now as follows:

https://github.com/reetp/smeserver-manager
https://github.com/reetp/smeserver-manager-html

My young lad has hacked together a new AdminLTE template for SM2 and I
have have built this into a separate rpm.

This is just a very simple demo.

Remember, the formatting side is independent of the code here so you
could use any formatter you want.

The "real" code is in server-manager and the html rendering in
server-manager-html

So, I have quickly bashed together 2 RPM that you can try.

wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm

Install those and then go to

https://server.ip/server-manager2/cgi-bin/wbl

This is all done in a hurry so don't expect miracles.

You can also take a peek at some of the abilities of the AdminLTE template.

Have a play here.

https://www.reetspetit.com/AdminLTEDemo/index.html

Quite good idea of the sorts of things you can do.

For some added fun you should be able to try this now:

https://server.ip/server-manager2/cgi-bin/useraccounts

Yes, it will throw a Mojo error cos I haven't figured looping things
properly yet, but have a look at the Parameters and see what I found :-)

The function was converted from print_user_accounts or somesuch to
get_user_accounts

You may be able to see it gets ALL accounts so really the
useraccountsNew.pm file should weed that out to just users and the Mojo
templates lobs those into a table for the html formatter to prettify.

Anyway, my brain hurts and I'm off to sleep !

Please test and ask questions etc.

JC
Michael Doerner | Technologywise
2018-02-18 03:40:02 UTC
Permalink
Post by John Crisp
A quick update. Note that most of this is just to prove some things
work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am still
here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping things
properly yet, but have a look at the Parameters and see what I found :-)
The function was converted from print_user_accounts or somesuch to
get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.

I am unfortunately not of much (coding) help (still trying to find one
for that )but will try to help with testing.

Michael
michelandre
2018-02-18 03:55:33 UTC
Permalink
Hi all,

Just ny curiosity I wanted to try this but, when I tried to install the
2 RPMs, I get:

erreur: Dépendances requises:
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64

So I think I have to enable a certain repository but, which one?

Just curious to try,

Michel-André

*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some things
work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am still
here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping things
properly yet, but have a look at the Parameters and see what I found :-)
The function was converted from print_user_accounts or somesuch to
get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find one
for that )but will try to help with testing.
Michael
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
michelandre
2018-02-18 04:21:11 UTC
Permalink
Hi all,

I found it at:
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html

yum --enablerepo=smedev,smetest install perl-Mojolicious

rpm -Uvh smeserver-manager-*
Préparation...              ###########################################
[100%]
   1:smeserver-manager-html ###########################################
[ 50%]
   2:smeserver-manager      ###########################################
[100%]

* signal-event post-upgrade; signal-event reboot

When I go to: https://server.ip/server-manager2/cgi-bin/wbl

I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may have
caused the error.
More information about this error may be available in the server error log.

Michel-André

*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to install
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some things
work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping things
properly yet, but have a look at the Parameters and see what I found :-)
The function was converted from print_user_accounts or somesuch to
get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find
one for that )but will try to help with testing.
Michael
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Michael Doerner | Technologywise
2018-02-18 04:51:40 UTC
Permalink
Michel-Andre

After downloading John's two rpms, I installed with the command

yum localinstall smeserver-manager* --enablerepo=smedev

to resolve all potential dependencies. This not only then pulled in
perl-Mojolicious but also the following other rpms:

Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch

It's working here so I assume that your system might miss one of these
required packages (?).

I would try the following:

cd into directory where you had downloaded John's rpms, then try

yum reinstall smeserver-manager* --enablerepo=smedev

and see whether some or all of the above "perl" packages will be pulled in.

Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation...             
########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager     
########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to install
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some things
work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see what
I found :-)
The function was converted from print_user_accounts or somesuch to
get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find
one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise

Basestation
148 Durham St
Tauranga, NZ

email: ***@tw.co.nz
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
michelandre
2018-02-18 15:18:42 UTC
Permalink
Thank you for the follow-up,

Refreh the virtual machine and new install with:

yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,

https://192.168.1.156/server-manager2/cgi-bin/wbl/

Still same error:

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may have
caused the error.
More information about this error may be available in the server error log.

Tried on another VM and still the same error...

########################################################
Tried with a fresh SME-9.2 installation.
####################

wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm

yum -y localinstall smeserver-manager* --enablerepo=smedev

signal-event post-upgrade; signal-event reboot
####################
[***@coquille ~]# rpm -qa |  grep perl-Socket
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
[***@coquille ~]#
[***@coquille ~]# rpm -qa |  grep perl-IO-Socket-IP
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
[***@coquille ~]#
[***@coquille ~]# rpm -qa |  grep perl-Net-DNS-Native
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
[***@coquille ~]#
[***@coquille ~]# rpm -qa |  grep perl-Time-Local
perl-Time-Local-1.2300-1.el6.sme.noarch
[***@coquille ~]#

https://192.168.1.92/server-manager2/cgi-bin/wbl

Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may have
caused the error.
More information about this error may be available in the server error log.

***** MESSAGES *****

Feb 18 09:52:17 coquille esmith::event[2482]: expanding
/boot/grub/grub.conf
Feb 18 09:52:17 coquille esmith::event[2482]:
generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534
793077|End|1518965537 146964|Elapsed|2.353887
Feb 18 09:52:17 coquille esmith::event[2482]: Running event handler:
/etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix permissions
for www at /etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix permissions
for apache at /etc/e-smith/events/post-upgrade/S05init-accounts line 66.

vi /etc/e-smith/events/post-upgrade/S05init-accounts

61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63      system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3
turba-h3 2> /dev/nu        ll") == 0
64      );
65
66 warn "failed to fix permissions for apache" unless (
67      system("/bin/rpm --setugids --setperms httpd mod_auth_tkt
mod_ssl php pwauth 2>         /dev/null") == 0
68      );
########################################################

My curiosity is a bit dull now :(

Michel-André

*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
to resolve all potential dependencies. This not only then pulled in
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of these
required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation...             
########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager     
########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to install
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some
things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see
what I found :-)
The function was converted from print_user_accounts or somesuch to
get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find
one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
R. Vielnascher Alleskunst.net GmbH
2018-02-18 15:35:13 UTC
Permalink
I had a Similar Problem when i worked on my Server-internal Client handling Module.
It had to do then with wrong Settings of rights!
Just as an idea! If that helps at all ...
Post by michelandre
Thank you for the follow-up,
yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,
https://192.168.1.156/server-manager2/cgi-bin/wbl/
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Tried on another VM and still the same error...
########################################################
Tried with a fresh SME-9.2 installation.
####################
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
yum -y localinstall smeserver-manager* --enablerepo=smedev
signal-event post-upgrade; signal-event reboot
####################
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
perl-Time-Local-1.2300-1.el6.sme.noarch
https://192.168.1.92/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
***** MESSAGES *****
Feb 18 09:52:17 coquille esmith::event[2482]: expanding /boot/grub/grub.conf
Feb 18 09:52:17 coquille esmith::event[2482]: generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534 793077|End|1518965537 146964|Elapsed|2.353887
Feb 18 09:52:17 coquille esmith::event[2482]: Running event handler: /etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix permissions for www at /etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix permissions for apache at /etc/e-smith/events/post-upgrade/S05init-accounts line 66.
vi /etc/e-smith/events/post-upgrade/S05init-accounts
61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63 system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3 turba-h3 2> /dev/nu ll") == 0
64 );
65
66 warn "failed to fix permissions for apache" unless (
67 system("/bin/rpm --setugids --setperms httpd mod_auth_tkt mod_ssl php pwauth 2> /dev/null") == 0
68 );
########################################################
My curiosity is a bit dull now :(
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of these required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
I found it at: https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation... ########################################### [100%]
1:smeserver-manager-html ########################################### [ 50%]
2:smeserver-manager ########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
perl-Mojolicious >= 6.44 est nécessaire pour smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
A quick update. Note that most of this is just to prove some things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am still here, reading and trying :-).
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping things properly yet, but have a look at the Parameters and see what I found :-)
The function was converted from print_user_accounts or somesuch to get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Garanti sans virus. www.avast.com
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
brian read
2018-02-18 15:35:11 UTC
Permalink
Hi Michelandre

What are your permissions for the wbl file in the
/etc/e-smith/web/panels/manager2 directory?

Here are mine:

[***@sme92test cgi-bin]# pwd
/etc/e-smith/web/panels/manager2/cgi-bin
[***@sme92test cgi-bin]# ls -l
total 16
drwxr-xr-x 2 root root  4096 Feb 16 15:56 templates
-rwsr-x--- 1 root admin 1091 Feb 16 14:29 useraccounts
-rwsr-x--- 1 root admin 5017 Feb 16 14:29 wbl
[***@sme92test cgi-bin]#

Cheers Brian
Post by michelandre
Thank you for the follow-up,
yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,
https://192.168.1.156/server-manager2/cgi-bin/wbl/
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
Tried on another VM and still the same error...
########################################################
Tried with a fresh SME-9.2 installation.
####################
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
yum -y localinstall smeserver-manager* --enablerepo=smedev
signal-event post-upgrade; signal-event reboot
####################
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
perl-Time-Local-1.2300-1.el6.sme.noarch
https://192.168.1.92/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
***** MESSAGES *****
Feb 18 09:52:17 coquille esmith::event[2482]: expanding
/boot/grub/grub.conf
generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534
793077|End|1518965537 146964|Elapsed|2.353887
/etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for www at
/etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for apache at
/etc/e-smith/events/post-upgrade/S05init-accounts line 66.
vi /etc/e-smith/events/post-upgrade/S05init-accounts
61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63      system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3
turba-h3 2> /dev/nu        ll") == 0
64      );
65
66 warn "failed to fix permissions for apache" unless (
67      system("/bin/rpm --setugids --setperms httpd mod_auth_tkt
mod_ssl php pwauth 2>         /dev/null") == 0
68      );
########################################################
My curiosity is a bit dull now :(
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
to resolve all potential dependencies. This not only then pulled in
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of
these required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation... ########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager ###########################################
[100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to install
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some
things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see
what I found :-)
The function was converted from print_user_accounts or somesuch
to get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to find
one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive athttps://lists.contribs.org/mailman/public/devinfo/
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
michelandre
2018-02-18 15:48:12 UTC
Permalink
Hi Brian,

Thank you for the fast reply.

############################################################################

[***@coquille ~]# ls -alsd /etc/e-smith/web/panels/manager2
4 drwxr-xr-x 5 root root 4096 18 févr. 10:39
/etc/e-smith/web/panels/manager2
[***@coquille ~]#

[***@coquille ~]# cd /etc/e-smith/web/panels/manager2/cgi-bin
[***@coquille cgi-bin]#

[***@coquille cgi-bin]# pwd
/etc/e-smith/web/panels/manager2/cgi-bin
[***@coquille cgi-bin]#

[***@coquille cgi-bin]# ls -l
total 16
drwxr-xr-x 2 root root  4096 18 févr. 10:39 templates
-rwsr-x--- 1 root admin 1091 16 févr. 09:29 useraccounts
-rwsr-x--- 1 root admin 5017 16 févr. 09:29 wbl
[***@coquille cgi-bin]#

############################################################################

Michel-André

*************************************************************************
Post by brian read
Hi Michelandre
What are your permissions for the wbl file in the
/etc/e-smith/web/panels/manager2 directory?
/etc/e-smith/web/panels/manager2/cgi-bin
total 16
drwxr-xr-x 2 root root  4096 Feb 16 15:56 templates
-rwsr-x--- 1 root admin 1091 Feb 16 14:29 useraccounts
-rwsr-x--- 1 root admin 5017 Feb 16 14:29 wbl
Cheers Brian
Post by michelandre
Thank you for the follow-up,
yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,
https://192.168.1.156/server-manager2/cgi-bin/wbl/
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
Tried on another VM and still the same error...
########################################################
Tried with a fresh SME-9.2 installation.
####################
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
yum -y localinstall smeserver-manager* --enablerepo=smedev
signal-event post-upgrade; signal-event reboot
####################
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
perl-Time-Local-1.2300-1.el6.sme.noarch
https://192.168.1.92/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of the
time the error occurred, and anything you might have done that may
have caused the error.
More information about this error may be available in the server error log.
***** MESSAGES *****
Feb 18 09:52:17 coquille esmith::event[2482]: expanding
/boot/grub/grub.conf
generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534
793077|End|1518965537 146964|Elapsed|2.353887
/etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for www at
/etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for apache at
/etc/e-smith/events/post-upgrade/S05init-accounts line 66.
vi /etc/e-smith/events/post-upgrade/S05init-accounts
61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63      system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3
turba-h3 2> /dev/nu        ll") == 0
64      );
65
66 warn "failed to fix permissions for apache" unless (
67      system("/bin/rpm --setugids --setperms httpd mod_auth_tkt
mod_ssl php pwauth 2>         /dev/null") == 0
68      );
########################################################
My curiosity is a bit dull now :(
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
to resolve all potential dependencies. This not only then pulled in
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of
these required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation...             
########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager     
########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some
things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see
what I found :-)
The function was converted from print_user_accounts or somesuch
to get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to
find one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Jean-Philippe PIALASSE
2018-02-18 21:58:18 UTC
Permalink
log httpd/admin_error at the moment you are trying to hit the panel
might help.
Post by michelandre
Hi Brian,
Thank you for the fast reply.
############################################################################
4 drwxr-xr-x 5 root root 4096 18 févr. 10:39
/etc/e-smith/web/panels/manager2
/etc/e-smith/web/panels/manager2/cgi-bin
total 16
drwxr-xr-x 2 root root  4096 18 févr. 10:39 templates
-rwsr-x--- 1 root admin 1091 16 févr. 09:29 useraccounts
-rwsr-x--- 1 root admin 5017 16 févr. 09:29 wbl
############################################################################
Michel-André
*************************************************************************
Post by brian read
Hi Michelandre
What are your permissions for the wbl file in the
/etc/e-smith/web/panels/manager2 directory?
/etc/e-smith/web/panels/manager2/cgi-bin
total 16
drwxr-xr-x 2 root root  4096 Feb 16 15:56 templates
-rwsr-x--- 1 root admin 1091 Feb 16 14:29 useraccounts
-rwsr-x--- 1 root admin 5017 Feb 16 14:29 wbl
Cheers Brian
Post by michelandre
Thank you for the follow-up,
yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,
https://192.168.1.156/server-manager2/cgi-bin/wbl/
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
Tried on another VM and still the same error...
########################################################
Tried with a fresh SME-9.2 installation.
####################
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
yum -y localinstall smeserver-manager* --enablerepo=smedev
signal-event post-upgrade; signal-event reboot
####################
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
perl-Time-Local-1.2300-1.el6.sme.noarch
https://192.168.1.92/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
***** MESSAGES *****
Feb 18 09:52:17 coquille esmith::event[2482]: expanding
/boot/grub/grub.conf
generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534
793077|End|1518965537 146964|Elapsed|2.353887
/etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for www at
/etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for apache at
/etc/e-smith/events/post-upgrade/S05init-accounts line 66.
vi /etc/e-smith/events/post-upgrade/S05init-accounts
61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63      system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3
turba-h3 2> /dev/nu        ll") == 0
64      );
65
66 warn "failed to fix permissions for apache" unless (
67      system("/bin/rpm --setugids --setperms httpd mod_auth_tkt
mod_ssl php pwauth 2>         /dev/null") == 0
68      );
########################################################
My curiosity is a bit dull now :(
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
to resolve all potential dependencies. This not only then pulled in
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of
these required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation...             
########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager     
########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some
things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I am
still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see
what I found :-)
The function was converted from print_user_accounts or somesuch
to get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to
find one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
--
*Jean-Philippe Pialasse DC PhD*
michelandre
2018-02-19 04:12:55 UTC
Permalink
Salut Jean-Philippe,

***** /var/log/httpd/admin_error_log
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] Couldn't open wbl
dbase
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] Compilation failed
in require at /etc/e-smith/web/panels/manager2/cgi-bin/wbl line 15.
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] BEGIN
failed--compilation aborted at
/etc/e-smith/web/panels/manager2/cgi-bin/wbl line 15.
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] Premature end of
script headers: wbl

***** /etc/e-smith/web/panels/manager2/cgi-bin/wbl
12 use strict;
13 use warnings;
14 use Mojolicious::Lite;
_15 use smeserver::Panel::wblNew;_
16
17

Michel-André

*************************************************************************
Post by Jean-Philippe PIALASSE
log httpd/admin_error at the moment you are trying to hit the panel
might help.
Post by michelandre
Hi Brian,
Thank you for the fast reply.
############################################################################
4 drwxr-xr-x 5 root root 4096 18 févr. 10:39
/etc/e-smith/web/panels/manager2
/etc/e-smith/web/panels/manager2/cgi-bin
total 16
drwxr-xr-x 2 root root  4096 18 févr. 10:39 templates
-rwsr-x--- 1 root admin 1091 16 févr. 09:29 useraccounts
-rwsr-x--- 1 root admin 5017 16 févr. 09:29 wbl
############################################################################
Michel-André
*************************************************************************
Post by brian read
Hi Michelandre
What are your permissions for the wbl file in the
/etc/e-smith/web/panels/manager2 directory?
/etc/e-smith/web/panels/manager2/cgi-bin
total 16
drwxr-xr-x 2 root root  4096 Feb 16 15:56 templates
-rwsr-x--- 1 root admin 1091 Feb 16 14:29 useraccounts
-rwsr-x--- 1 root admin 5017 Feb 16 14:29 wbl
Cheers Brian
Post by michelandre
Thank you for the follow-up,
yum localinstall smeserver-manager* --enablerepo=smedev
All the dependencies are there now,
https://192.168.1.156/server-manager2/cgi-bin/wbl/
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
Tried on another VM and still the same error...
########################################################
Tried with a fresh SME-9.2 installation.
####################
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget
www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
yum -y localinstall smeserver-manager* --enablerepo=smedev
signal-event post-upgrade; signal-event reboot
####################
perl-Socket-2.021-1.el6.sme.x86_64
perl-Socket6-0.23-4.el6.x86_64
perl-IO-Socket-IP-0.37-1.el6.sme.noarch
perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
perl-Time-Local-1.2300-1.el6.sme.noarch
https://192.168.1.92/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done that
may have caused the error.
More information about this error may be available in the server error log.
***** MESSAGES *****
Feb 18 09:52:17 coquille esmith::event[2482]: expanding
/boot/grub/grub.conf
generic_template_expand=action|Event|post-upgrade|Action|generic_template_expand|Start|1518965534
793077|End|1518965537 146964|Elapsed|2.353887
Feb 18 09:52:17 coquille esmith::event[2482]: Running event
handler: /etc/e-smith/events/post-upgrade/S05init-accounts
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for www at
/etc/e-smith/events/post-upgrade/S05init-accounts line 62.
Feb 18 09:52:17 coquille esmith::event[2482]: failed to fix
permissions for apache at
/etc/e-smith/events/post-upgrade/S05init-accounts line 66.
vi /etc/e-smith/events/post-upgrade/S05init-accounts
61 # fix permissions for www and apache
62 warn "failed to fix permissions for www" unless (
63      system("/bin/rpm --setugids --setperms horde imp-h3 ingo-h3
turba-h3 2> /dev/nu        ll") == 0
64      );
65
66 warn "failed to fix permissions for apache" unless (
67      system("/bin/rpm --setugids --setperms httpd mod_auth_tkt
mod_ssl php pwauth 2>         /dev/null") == 0
68      );
########################################################
My curiosity is a bit dull now :(
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Michel-Andre
After downloading John's two rpms, I installed with the command
yum localinstall smeserver-manager* --enablerepo=smedev
to resolve all potential dependencies. This not only then pulled
Feb 18 16:14:42 Installed: perl-Socket-2.021-1.el6.sme.x86_64
Feb 18 16:14:42 Installed: perl-IO-Socket-IP-0.37-1.el6.sme.noarch
Feb 18 16:14:42 Installed: perl-Net-DNS-Native-0.15-1.el6.sme.x86_64
Feb 18 16:14:43 Installed: perl-Time-Local-1.2300-1.el6.sme.noarch
It's working here so I assume that your system might miss one of
these required packages (?).
cd into directory where you had downloaded John's rpms, then try
yum reinstall smeserver-manager* --enablerepo=smedev
and see whether some or all of the above "perl" packages will be pulled in.
Michael
Post by michelandre
Hi all,
https://lists.contribs.org/pipermail/devinfo/2016-June/013580.html
yum --enablerepo=smedev,smetest install perl-Mojolicious
rpm -Uvh smeserver-manager-*
Préparation...             
########################################### [100%]
   1:smeserver-manager-html
########################################### [ 50%]
   2:smeserver-manager     
########################################### [100%]
* signal-event post-upgrade; signal-event reboot
When I go to: https://server.ip/server-manager2/cgi-bin/wbl
Internal Server Error
The server encountered an internal error or misconfiguration and
was unable to complete your request.
Please contact the server administrator, admin and inform them of
the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error log.
Michel-André
*************************************************************************
Post by michelandre
Hi all,
Just ny curiosity I wanted to try this but, when I tried to
        perl-Mojolicious >= 6.44 est nécessaire pour
smeserver-manager-0.1.0-2.el7.sme.x86_64
So I think I have to enable a certain repository but, which one?
Just curious to try,
Michel-André
*************************************************************************
Post by Michael Doerner | Technologywise
Post by John Crisp
A quick update. Note that most of this is just to prove some
things work as I thought.
Thanks for your continuous efforts! Just wanted to say Yes, I
am still here, reading and trying :-).
Post by John Crisp
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-2.el6.sme.noarch.rpm
wget www.reetspetit.com/KoozaliServerManager/smeserver-manager-0.1.0-2.el7.sme.x86_64.rpm
Install those and then go to
https://server.ip/server-manager2/cgi-bin/wbl
Got this working w/o a problem.
Post by John Crisp
Have a play here.
https://www.reetspetit.com/AdminLTEDemo/index.html
Quite good idea of the sorts of things you can do.
Cool
Post by John Crisp
https://server.ip/server-manager2/cgi-bin/useraccounts
Yes, it will throw a Mojo error cos I haven't figured looping
things properly yet, but have a look at the Parameters and see
what I found :-)
The function was converted from print_user_accounts or
somesuch to get_user_accounts
You may be able to see it gets ALL accounts
Yes, that looks like it here too.
I am unfortunately not of much (coding) help (still trying to
find one for that )but will try to help with testing.
Michael
--
Michael Doerner
Director - Technologywise
Basestation
148 Durham St
Tauranga, NZ
office: +64 (0)7 571 1060
web: www.technologywise.co.nz
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Garanti sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
--
*Jean-Philippe Pialasse DC PhD*
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
John Crisp
2018-02-19 10:43:04 UTC
Permalink
Post by michelandre
Salut Jean-Philippe,
***** /var/log/httpd/admin_error_log
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] Couldn't open wbl
dbase
Error is in front of you.

No wbl database......

Install the wbl contrib and add a few entries.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
michelandre
2018-02-19 15:28:02 UTC
Permalink
Thanks John,

After: yum install --enablerepo=smecontribs smeserver-wbl

It is working.

By curiosity, I just wanted to see what was about the new Server-Manager

Michel-André

*************************************************************************
Post by John Crisp
Post by michelandre
Salut Jean-Philippe,
***** /var/log/httpd/admin_error_log
[Sun Feb 18 23:01:15 2018] [error] [client 127.0.0.1] Couldn't open wbl
dbase
Error is in front of you.
No wbl database......
Install the wbl contrib and add a few entries.
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Stefano Zamboni
2018-02-19 15:32:10 UTC
Permalink
Post by michelandre
Thanks John,
After: yum install --enablerepo=smecontribs smeserver-wbl
It is working.
By curiosity, I just wanted to see what was about the new Server-Manager
Michel-André
There's no "new server manager", just a POC (just to be clear)

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/de
michelandre
2018-02-19 15:42:38 UTC
Permalink
OK, but why such a title for this thread?

Also, "https://server.ip/server-manager2/cgi-bin/wbl" doesn't look like
the standard Server-Manager

Michel-André

*************************************************************************
Post by Stefano Zamboni
Post by michelandre
Thanks John,
After: yum install --enablerepo=smecontribs smeserver-wbl
It is working.
By curiosity, I just wanted to see what was about the new Server-Manager
Michel-André
There's no "new server manager", just a POC (just to be clear)
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Jean-Philippe PIALASSE
2018-02-19 16:26:53 UTC
Permalink
Post by michelandre
OK, but why such a title for this thread?
because those are development tests in order to pave the road for a new
server manager.
Post by michelandre
Also, "https://server.ip/server-manager2/cgi-bin/wbl" doesn't look
like the standard Server-Manager
because we are in 2018 and try to get something less 1995 ;)
John Crisp
2018-02-19 17:17:23 UTC
Permalink
Post by michelandre
OK, but why such a title for this thread?
Also, "https://server.ip/server-manager2/cgi-bin/wbl" doesn't look like
the standard Server-Manager
I'm not sure exactly what you CAN see !

Please go back and read right through this thread.

Note that there are 2 rpms.

I have split the 'code' ie functions, from the 'display' - up to now the
two have been totally intertwined making any change to the frontend near
impossible to do easily.

One rpm interfaces to the SME backend and pulls the required data and
outputs it as very simple html, although it could be output as any form
of data.

The other handles the html display part and is based on bootstrap
3/jquery with the AdminLTE template recoloured a bit for Koozali
(because it was easy and someone had already built a rough template) It
should look vaguely like the old server manager. The test panels are
ONLY tests - do not take them as actual implementation. I was more
concerned with making something work than how it actually looked.

Please look at some the earlier posts for demos of the capabilities of
Admin LTE (and that is just a flavour of what is available generally)

Note you could use ANY type of html formatter.

The whole point of the exercise was:

1. Separation of code and display

2. See if it is possible to use the backend code as a form of simple API
that could be accessed by any sort of front end - not just perl.

The simple answer is that yes, it is possible.

However, no one said it was easy... :-)
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
michelandre
2018-02-19 17:39:42 UTC
Permalink
Hi John,

I appreciate your efforts and all what you do.

Sorry about "doesn't look like the standard Server-Manager", I didn't
have the cookies enabled, a real newbie mistake :(

I just tried again and I find the whole new look absolutely beautiful.

Again, thank you heartily for your work,

Michel-André

*************************************************************************
Post by John Crisp
Post by michelandre
OK, but why such a title for this thread?
Also, "https://server.ip/server-manager2/cgi-bin/wbl" doesn't look like
the standard Server-Manager
I'm not sure exactly what you CAN see !
Please go back and read right through this thread.
Note that there are 2 rpms.
I have split the 'code' ie functions, from the 'display' - up to now the
two have been totally intertwined making any change to the frontend near
impossible to do easily.
One rpm interfaces to the SME backend and pulls the required data and
outputs it as very simple html, although it could be output as any form
of data.
The other handles the html display part and is based on bootstrap
3/jquery with the AdminLTE template recoloured a bit for Koozali
(because it was easy and someone had already built a rough template) It
should look vaguely like the old server manager. The test panels are
ONLY tests - do not take them as actual implementation. I was more
concerned with making something work than how it actually looked.
Please look at some the earlier posts for demos of the capabilities of
Admin LTE (and that is just a flavour of what is available generally)
Note you could use ANY type of html formatter.
1. Separation of code and display
2. See if it is possible to use the backend code as a form of simple API
that could be accessed by any sort of front end - not just perl.
The simple answer is that yes, it is possible.
However, no one said it was easy... :-)
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
John Crisp
2018-02-19 19:47:01 UTC
Permalink
Post by michelandre
Hi John,
I appreciate your efforts and all what you do.
Sorry about "doesn't look like the standard Server-Manager", I didn't
have the cookies enabled, a real newbie mistake :(
ROFL...... we've all done that ;-)
Post by michelandre
I just tried again and I find the whole new look absolutely beautiful.
Oh cool ! You can thank Tony Keane for the basics - he deserves all the
credit for it. It really is VERY basic, but you can see what COULD be
achieved....

Someone with a bit of flair in html & css could make it rock.

Check here for a demo of what you can do just with this template system.
Let your imagination run riot.....
Post by michelandre
Again, thank you heartily for your work,
NP. It has been fun. I just need to retire and do nothing else for a
year :-)

_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-22 00:42:34 UTC
Permalink
Botheration...

I realised I missed the koozali.css file from the html so you were all
stuck with boring blue.

I have built a new rpm:

https://www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-3.el6.sme.noarch.rpm

yum localinstall or rpm -Uvh

You should get a nice shiny green :-)

Screenshot attached (from my work server) - it should look a bit like this.





I've linked 1 file to this email:
Screenshot - 220218 - 01:36:37.png
<https://esmith.impamark.co.uk/dl/?t=24e3c01e001bfa18e4374a5a75bbfa63>(58.2
KB)DLhttps://esmith.impamark.co.uk/dl/?t=24e3c01e001bfa18e4374a5a75bbfa63
Mozilla Thunderbird <http://www.getthunderbird.com> makes it easy to
share large files over email.
brian read
2018-02-22 07:22:14 UTC
Permalink
Hi John

yes, that looks very nice!

Cheers Brian
Post by John Crisp
Botheration...
I realised I missed the koozali.css file from the html so you were all
stuck with boring blue.
https://www.reetspetit.com/KoozaliServerManager/smeserver-manager-html-0.1-3.el6.sme.noarch.rpm
yum localinstall or rpm -Uvh
You should get a nice shiny green :-)
Screenshot attached (from my work server) - it should look a bit like this.
Screenshot - 220218 - 01:36:37.png
<https://esmith.impamark.co.uk/dl/?t=24e3c01e001bfa18e4374a5a75bbfa63>(58.2
KB)DLhttps://esmith.impamark.co.uk/dl/?t=24e3c01e001bfa18e4374a5a75bbfa63
Mozilla Thunderbird <http://www.getthunderbird.com> makes it easy to
share large files over email.
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-22 08:53:59 UTC
Permalink
Hi John
yes, that looks very nice!
Ah good. Felt a right pillock :-)

I better get on and do something sensible with it then !!

I need to do a 'save' routine.

Data sanitising. Seeing as I am working on the KISS principle I am wondering where you should sanitise inputs.

We could do more in the mojo template for sure... the way I thought of it was the template merely asks for data from the backend and presents it either as html or a.n.other format so it really is "just" a layout template.

Do you add some sanity checking in the template (you could use some of the theme JS I guess) or some perl in the template?

See this as a mind of example where the template 'returns' to itself

http://blogs.perl.org/users/joel_berger/2012/10/a-simple-mojoliciousdbi-example.html

So you

Present panel
Submit data back to template
Template checks sanity
Template pushes to backend or throws error

I need to look at what error handling ia done in the backend. Clearly there is some somewhere but to date I haven't thought about it.

I'm trying to think in terms of the template outputting html OR say JSON depending on how it is called and where best to handle inputs.

Just thinking out loud.

Bit pushed for time right now. Will get back to it as soon as I can.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists
brian read
2018-02-22 09:44:17 UTC
Permalink
Hi John
Post by John Crisp
Post by brian read
Hi John
yes, that looks very nice!
Ah good. Felt a right pillock :-)
I better get on and do something sensible with it then !!
I need to do a 'save' routine.
Data sanitising. Seeing as I am working on the KISS principle I am wondering where you should sanitise inputs.
We could do more in the mojo template for sure... the way I thought of it was the template merely asks for data from the backend and presents it either as html or a.n.other format so it really is "just" a layout template.
Do you add some sanity checking in the template (you could use some of the theme JS I guess) or some perl in the template?
You probably need to do both, catch the obvious errors in JS (which is
quick and therefore effective for the end user)  but still need a
mechanism to bounce back errors based on the deeper understanding of the
setup that the perl has (e.g. Valid Network IPs etc).
John Crisp
2018-02-22 13:00:19 UTC
Permalink
Hi John
Post by John Crisp
Do you add some sanity checking in the template (you could use some of the theme JS I guess) or some perl in the template?
You probably need to do both, catch the obvious errors in JS (which is
quick and therefore effective for the end user)  but still need a
mechanism to bounce back errors based on the deeper understanding of the
setup that the perl has (e.g. Valid Network IPs etc).
Yup. JS sucks though :-(

Other thought is I am loath to lose the simple html SM version you can
use with elinks - that has proved very handy on lots of occasions for me!

Sometimes progress is not always what it is cracked up to be!


_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at
brian read
2018-02-22 17:32:41 UTC
Permalink
Post by John Crisp
Post by brian read
Hi John
Post by John Crisp
Do you add some sanity checking in the template (you could use some of the theme JS I guess) or some perl in the template?
You probably need to do both, catch the obvious errors in JS (which is
quick and therefore effective for the end user)  but still need a
mechanism to bounce back errors based on the deeper understanding of the
setup that the perl has (e.g. Valid Network IPs etc).
Yup. JS sucks though :-(
Not sure why you think that?
Post by John Crisp
Other thought is I am loath to lose the simple html SM version you can
use with elinks - that has proved very handy on lots of occasions for me!
Why does JS mean we loose them?
Post by John Crisp
Sometimes progress is not always what it is cracked up to be!
_______________________________________________
Server Development Discussion
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
John Crisp
2018-02-22 17:58:23 UTC
Permalink
Post by brian read
Post by John Crisp
Yup. JS sucks though :-(
Not sure why you think that?
Personal opinion ;-) And the number of people who run stuff like
NoScript (me included)
Post by brian read
Post by John Crisp
Other thought is I am loath to lose the simple html SM version you can
use with elinks - that has proved very handy on lots of occasions for me!
Why does JS mean we loose them?
If we switch to a more modern front end it may be trickier, though I am
no html/css/js guru. It may be possible with some care in the templating.
_______________________________________________
Server Development Discussion
To unsubscribe, e-mail devinfo-***@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/devinfo/
Loading...