[community module proposal] template editor

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[community module proposal] template editor

Jean Pommier - PI geosolutions

Hi,

I'd like to propose a template editor module for integration into community modules.

It is something I wrote some time ago. I've updated it so it works on 2.15 branch (so I expect it will also on master, or will with minor changes)

It is quite basic for now, but serves its purpose: offering a UI to edit the freemarker templates. For now, it supports only the header, content and footer template files (the ones useful for WMS getfeatureinfo). It allows to edit them at workspace, datastore or layer level.

I've joined a screenshot of the edition page.

Are you OK with it ? If so, I'll need some commit access (or I can make a PR)

Best regards,

Jean


--

Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

template-editor.png (185K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

jody.garnett
I am not sure this is needed Jean, the web-resource community module offers editing.  If you are game I would love to pick this module up as a supported extension.

Can you try the above community module and write back what you think?
--
Jody Garnett


On Mon, 13 May 2019 at 14:18, Jean Pommier <[hidden email]> wrote:

Hi,

I'd like to propose a template editor module for integration into community modules.

It is something I wrote some time ago. I've updated it so it works on 2.15 branch (so I expect it will also on master, or will with minor changes)

It is quite basic for now, but serves its purpose: offering a UI to edit the freemarker templates. For now, it supports only the header, content and footer template files (the ones useful for WMS getfeatureinfo). It allows to edit them at workspace, datastore or layer level.

I've joined a screenshot of the edition page.

Are you OK with it ? If so, I'll need some commit access (or I can make a PR)

Best regards,

Jean


--

Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

Jean Pommier - PI geosolutions

OH, I did not know this extension. Does it have some sort of documentation ?


Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

Le 13/05/2019 à 22:57, Jody Garnett a écrit :
I am not sure this is needed Jean, the web-resource community module offers editing.  If you are game I would love to pick this module up as a supported extension.

Can you try the above community module and write back what you think?
--
Jody Garnett


On Mon, 13 May 2019 at 14:18, Jean Pommier <[hidden email]> wrote:

Hi,

I'd like to propose a template editor module for integration into community modules.

It is something I wrote some time ago. I've updated it so it works on 2.15 branch (so I expect it will also on master, or will with minor changes)

It is quite basic for now, but serves its purpose: offering a UI to edit the freemarker templates. For now, it supports only the header, content and footer template files (the ones useful for WMS getfeatureinfo). It allows to edit them at workspace, datastore or layer level.

I've joined a screenshot of the edition page.

Are you OK with it ? If so, I'll need some commit access (or I can make a PR)

Best regards,

Jean


--

Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

geowolf
In reply to this post by jody.garnett
Hi Jody,
if memory serves me right, the web-resource module allows editing whatever file in the data directory.
I would see this template editor well as a new tab in the layer, layergroup and workspace pages instead, would be 
less powerful but more user friendly.

Just my 2 cents...

Cheers
Andrea


On Mon, May 13, 2019 at 10:59 PM Jody Garnett <[hidden email]> wrote:
I am not sure this is needed Jean, the web-resource community module offers editing.  If you are game I would love to pick this module up as a supported extension.

Can you try the above community module and write back what you think?
--
Jody Garnett


On Mon, 13 May 2019 at 14:18, Jean Pommier <[hidden email]> wrote:

Hi,

I'd like to propose a template editor module for integration into community modules.

It is something I wrote some time ago. I've updated it so it works on 2.15 branch (so I expect it will also on master, or will with minor changes)

It is quite basic for now, but serves its purpose: offering a UI to edit the freemarker templates. For now, it supports only the header, content and footer template files (the ones useful for WMS getfeatureinfo). It allows to edit them at workspace, datastore or layer level.

I've joined a screenshot of the edition page.

Are you OK with it ? If so, I'll need some commit access (or I can make a PR)

Best regards,

Jean


--

Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


--

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

geowolf
In reply to this post by Jean Pommier - PI geosolutions
On Tue, May 14, 2019 at 9:41 AM Jean Pommier <[hidden email]> wrote:

OH, I did not know this extension. Does it have some sort of documentation ?

I don't see any documentation about it:

However as far as I remember the UI is pretty self-explanatory, you just need to build GeoServer
with -Pweb-resource (or enable that profile in your IDE) and the module should show up in the UI

Cheers
Andrea
 
==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

Jean Pommier - PI geosolutions
In reply to this post by jody.garnett

Hi Jody,

I didn't know this module. I've just had a look at it. And of course, you're right, it allows you to edit a template and create a new one, so yes, it does the job.

Quite handy extension, nice to know its existence. You're right, I'd probably not have written template-editor extension if I had known this.

I'd say there are some differences though:

  1. template-editor deals only with templates. You might not want to give your users access to all the files in the datadir. For instance, editing/removing a layer.xml file might not be the best idea. Or, the security config. While access to template files for all users allowed to edit a layer seems quite legit.
  2. template-editor shows the header, content and footer templates on the same page. I find it rather practical when editing a template, even though you often mostly deal with ceontent.ftl
  3. template-editor is less low-level. You don't have to know how the datadir is organized. The entrypoint it a table listing workspace, datastore and layer, like the LayerPage so you can choose at which level you want to work. Then you get to the edit page show in the screenshot.
  4. When editing templates for a layer, it gives you the available attributes. I found this quite handy.

So I'd say it is more specific, but a little bit more focused on template edition. And much less an admin tool.

I was also considering on the medium term to replace the textareas by an html editor. Why not some completion, too ?


Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

Le 13/05/2019 à 22:57, Jody Garnett a écrit :
I am not sure this is needed Jean, the web-resource community module offers editing.  If you are game I would love to pick this module up as a supported extension.

Can you try the above community module and write back what you think?
--
Jody Garnett


On Mon, 13 May 2019 at 14:18, Jean Pommier <[hidden email]> wrote:

Hi,

I'd like to propose a template editor module for integration into community modules.

It is something I wrote some time ago. I've updated it so it works on 2.15 branch (so I expect it will also on master, or will with minor changes)

It is quite basic for now, but serves its purpose: offering a UI to edit the freemarker templates. For now, it supports only the header, content and footer template files (the ones useful for WMS getfeatureinfo). It allows to edit them at workspace, datastore or layer level.

I've joined a screenshot of the edition page.

Are you OK with it ? If so, I'll need some commit access (or I can make a PR)

Best regards,

Jean


--

Jean Pommier -- pi-Geosolutions

Ingénieur, consultant indépendant

Tél. : (+33) 6 09 23 21 36
E-mail : [hidden email]
Web : www.pi-geosolutions.fr

_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

geowolf
On Tue, May 14, 2019 at 12:39 PM Jean Pommier <[hidden email]> wrote:

So I'd say it is more specific, but a little bit more focused on template edition. And much less an admin tool.

Agree, I would also be more comfortable putting it in the hands of some content manager (e.g., workspace admin) rather than unchecked access to anything
in the data directory.

I was also considering on the medium term to replace the textareas by an html editor. Why not some completion, too ?

Check the CodeMirrorEditor wicket component and how it's used in style and demo requests editing for that

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

Niels Charlier

I agree as well. Web-resource was meant in the first place as a companion for jdbcstore, to be able to still edit your config files manually if you store them in a database rather than the file system.

There is the user/permission matter as mentioned before, and the fact that the template editor already has template specific functionality, and this could be extended upon - the CodeMirrorEditor has the possibility of adding customized buttons. I mean, it is kind of like saying that the style editor should be removed because of web-resource...

$0.02

Niels

On 14/05/2019 12:46, Andrea Aime wrote:
On Tue, May 14, 2019 at 12:39 PM Jean Pommier <[hidden email]> wrote:

So I'd say it is more specific, but a little bit more focused on template edition. And much less an admin tool.

Agree, I would also be more comfortable putting it in the hands of some content manager (e.g., workspace admin) rather than unchecked access to anything
in the data directory.

I was also considering on the medium term to replace the textareas by an html editor. Why not some completion, too ?

Check the CodeMirrorEditor wicket component and how it's used in style and demo requests editing for that

Cheers
Andrea
==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: [community module proposal] template editor

jody.garnett
In reply to this post by geowolf
I really like the functionality, and had it included in Boundless Server.

And yeah if I can get some collaborators it would be a good candidate to be an extension, or folded in to the web-app.
--
Jody Garnett


On Tue, 14 May 2019 at 02:54, Andrea Aime <[hidden email]> wrote:
On Tue, May 14, 2019 at 9:41 AM Jean Pommier <[hidden email]> wrote:

OH, I did not know this extension. Does it have some sort of documentation ?

I don't see any documentation about it:

However as far as I remember the UI is pretty self-explanatory, you just need to build GeoServer
with -Pweb-resource (or enable that profile in your IDE) and the module should show up in the UI

Cheers
Andrea
 
==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel