[Geoserver-devel] Web user interface for scripting module

Hi all!

I would like to propose adding a web user interface for adding, editing, and deleting scripts to the community script module. This is my first foray into wicket development, but I have a branch that includes a page that lists scripts, a page that can add new scripts, and a page that can edit scripts.

https://github.com/jericks/geoserver/commit/49e43ddaa695d19b3084f8894fa7faffe0144ed7

I can create a Jira ticket and send a pull request if this sounds like a good idea.

Thanks,
Jared

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

The Submit / Canel both take you back to the list of scripts. This is a pain when debugging, can we add a “Apply” button which saves and leave you on this page? Or perhaps “Apply”, “Save” and “Cancel” buttons allowing the work to be saved (and tested in another window) while leaving this page editing the current script.

(attachments)

scripts.png
editscript.png
newscript.png

···

Jody Garnett

On Wed, May 7, 2014 at 9:48 PM, Jared Erickson <jared.erickson@anonymised.com> wrote:

Hi all!

I would like to propose adding a web user interface for adding, editing, and deleting scripts to the community script module. This is my first foray into wicket development, but I have a branch that includes a page that lists scripts, a page that can add new scripts, and a page that can edit scripts.

https://github.com/jericks/geoserver/commit/49e43ddaa695d19b3084f8894fa7faffe0144ed7

I can create a Jira ticket and send a pull request if this sounds like a good idea.

Thanks,
Jared


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Thu, May 8, 2014 at 4:48 AM, Jared Erickson <jared.erickson@anonymised.com>wrote:

Hi all!

I would like to propose adding a web user interface for adding, editing,
and deleting scripts to the community script module. This is my first
foray into wicket development, but I have a branch that includes a page
that lists scripts, a page that can add new scripts, and a page that can
edit scripts.

https://github.com/jericks/geoserver/commit/49e43ddaa695d19b3084f8894fa7faffe0144ed7

I can create a Jira ticket and send a pull request if this sounds like a
good idea.

Thanks,
Jared

Nice!

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

(attachments)

scripts.png
newscript.png
editscript.png

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I
know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not
have to scroll so much. Could the extra name/type/extension information be
moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff
align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look
the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then
designers would have
asked for our head...)

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Good to know I was getting stuck trying to do that for the style legend graphic patch.

···

Jody Garnett

On Thu, May 8, 2014 at 2:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then designers would have
asked for our head…)

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Wow! This is awesome Jared!

Regarding the textarea / text editor, is it using code mirror? Be nice if we could get the syntax highlighting and other nice features of code mirror. We use it for the SLD editor and if I remember it isn’t too difficult to wire up with wicket.

···

On Thu, May 8, 2014 at 11:47 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Good to know I was getting stuck trying to do that for the style legend graphic patch.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

Jody Garnett

On Thu, May 8, 2014 at 2:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then designers would have
asked for our head…)

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Great idea!

Please correct me if I’m wrong, its an “editor” for referenced scripts to modify these via browser, right?

I was wondering whether geoserver could have a scripting console for GeoServer instance itself, where the admin could hav script access to modify settings of layers, datastores, workspaces, users, etc.
A similar and really effective way to administrate an instance does Jenkins/Hudson have (https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console). The user/admin have access to the whole model and can change settings/configurations via Groovy.

Wouldn’t that be a nice improvement for GeoServer Community?

Code highlighting would be fantastic btw :wink:

  • Frank
···

2014-05-09 15:01 GMT+02:00 Justin Deoliveira <jdeolive@anonymised.com>:

Wow! This is awesome Jared!

Regarding the textarea / text editor, is it using code mirror? Be nice if we could get the syntax highlighting and other nice features of code mirror. We use it for the SLD editor and if I remember it isn’t too difficult to wire up with wicket.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Thu, May 8, 2014 at 11:47 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Good to know I was getting stuck trying to do that for the style legend graphic patch.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

Jody Garnett

On Thu, May 8, 2014 at 2:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then designers would have
asked for our head…)

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Indeed! The python module actually already has one :slight_smile:

https://github.com/geoserver/geoserver/blob/master/src/community/script/py/src/main/python/console.py

You run it specifying the location, credentials, etc… of a geoserver instance and it provides you with a remote console.

···

On Fri, May 9, 2014 at 8:21 AM, Frank Gasdorf <fgdrf@anonymised.com> wrote:

Great idea!

Please correct me if I’m wrong, its an “editor” for referenced scripts to modify these via browser, right?

I was wondering whether geoserver could have a scripting console for GeoServer instance itself, where the admin could hav script access to modify settings of layers, datastores, workspaces, users, etc.
A similar and really effective way to administrate an instance does Jenkins/Hudson have (https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console). The user/admin have access to the whole model and can change settings/configurations via Groovy.

Wouldn’t that be a nice improvement for GeoServer Community?

Code highlighting would be fantastic btw :wink:

  • Frank

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

2014-05-09 15:01 GMT+02:00 Justin Deoliveira <jdeolive@anonymised.com>:

Wow! This is awesome Jared!

Regarding the textarea / text editor, is it using code mirror? Be nice if we could get the syntax highlighting and other nice features of code mirror. We use it for the SLD editor and if I remember it isn’t too difficult to wire up with wicket.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Thu, May 8, 2014 at 11:47 AM, Jody Garnett <jody.garnett@anonymised.com…> wrote:

Good to know I was getting stuck trying to do that for the style legend graphic patch.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

Jody Garnett

On Thu, May 8, 2014 at 2:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then designers would have
asked for our head…)

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi Justin!

I am not using CodeMirror yet. I did have it working but it only did XML syntax highlighting. Do you know what version GeoServer is using? I couldn’t figure it out. Also, what do you think about upgrading the CodeMirror JS library? Recent versions support all modern browsers and IE back to version 8.

Thanks,
Jared

···

On Thu, May 8, 2014 at 11:47 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Good to know I was getting stuck trying to do that for the style legend graphic patch.


Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
� 3 signs your SCM is hindering your productivity
� Requirements for releasing software faster
� Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

Jody Garnett

On Thu, May 8, 2014 at 2:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, May 8, 2014 at 5:37 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

It sounds like a good idea, I do have some feedback on the UI design (I know it is similar to the style editor design).

I would like to see the text editor near the top of the page, so we do not have to scroll so much. Could the extra name/type/extension information be moved to the right of the text area (as we have wider monitors now?

Hi Jody,
everything in the CSS is setup for a single column design, making stuff align in any other way
is hard, we had to curse quite a bit just to get the envelope editor look the way it looks without
using tables to lay it out (which would have been a 2 minutes job, but then designers would have
asked for our head…)

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Sat, May 10, 2014 at 4:14 AM, Jared Erickson <jared.erickson@anonymised.com>wrote:

Hi Justin!

I am not using CodeMirror yet. I did have it working but it only did XML
syntax highlighting. Do you know what version GeoServer is using? I
couldn’t figure it out. Also, what do you think about upgrading the
CodeMirror JS library?

I don't know the version either, but it has committed back in Nov 2010, so
it's 3.5 years old.
Upgrading would be great, just make sure the sld editor and the demo
request pages keep on working fine

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Hi all,

Sorry for the delay, but I am the world’s slowest wicket developer. I finally have CodeMirror working as the editor for scripts (see attached). This required upgrading CodeMirror to version 4.1 (the latest) which supports all modern browsers and IE 8 and above (http://codemirror.net/#browsersupport). I have tested the upgraded CodeMirror on FireFox, Chrome, and Safari on OS X. I haven’t tested on IE yet. If these proposed changes seems acceptable how would you like me to structure the pull requests? I see two alternatives:

#1

  1. CodeMirror Upgrade
  2. Script UI using CodeMirror

#2.

  1. Script UI using text area
  2. CodeMirror Upgrade
  3. Script UI using CodeMirror

The only reason to go with #2 is if the CodeMirror upgrade is problematic.

Thanks,
Jared

···

On Sat, May 10, 2014 at 4:14 AM, Jared Erickson <jared.erickson@anonymised.com> wrote:

Hi Justin!

I am not using CodeMirror yet. I did have it working but it only did XML syntax highlighting. Do you know what version GeoServer is using? I couldn’t figure it out. Also, what do you think about upgrading the CodeMirror JS library?

I don’t know the version either, but it has committed back in Nov 2010, so it’s 3.5 years old.
Upgrading would be great, just make sure the sld editor and the demo request pages keep on working fine

Cheers
Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Wed, May 14, 2014 at 5:25 AM, Jared Erickson <jared.erickson@anonymised.com>wrote:

Hi all,

Sorry for the delay, but I am the world’s slowest wicket developer. I
finally have CodeMirror working as the editor for scripts (see attached).
This required upgrading CodeMirror to version 4.1 (the latest) which
supports all modern browsers and IE 8 and above (
http://codemirror.net/#browsersupport). I have tested the upgraded
CodeMirror on FireFox, Chrome, and Safari on OS X. I haven’t tested on IE
yet. If these proposed changes seems acceptable how would you like me to
structure the pull requests? I see two alternatives:

#1
1. CodeMirror Upgrade
2. Script UI using CodeMirror

#2.
1. Script UI using text area
2. CodeMirror Upgrade
3. Script UI using CodeMirror

The only reason to go with #2 is if the CodeMirror upgrade is problematic.

The only reason for concern is that, I believe, the version we're currently
using supports IE down to version 6 (support for which was dropped around
2012).
I guess it would be nice/useful if the code could recognize the browser
version and fall back on a plain text area in case the
browser is not supported.

Maybe you go with 2, make the pull request for the code mirror upgrade, and
allow other people to help you with the above?

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Hi all,

The code mirror upgrade happened and I updated the script editor pull
request so now we have syntax highlighting. Any chance this could get
accepted before the upcoming feature freeze?

https://jira.codehaus.org/browse/GEOS-6483

https://github.com/geoserver/geoserver/pull/584

Thanks!
Jared

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Web-user-interface-for-scripting-module-tp5139131p5150204.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.