You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Willem van de Mheen <Wi...@workspace365.net> on 2022/12/21 11:15:48 UTC

Adding JavaScript to your Guacamole extension

Hi,

I'm trying to build a Guacamole extension and I want to include some JavaScript. Unfortunately, I can't really find any documentation on this subject. I can include a JavaScript file in the guac-manifest.json but when I define an Angular module, I need to refer to a template HTML file and you can't simply add an HTML file to a Guacamole extension. How is this supposed to work?

Best regards,
Willem van de Mheen


AW: Adding JavaScript to your Guacamole extension

Posted by Joachim Lindenberg <gu...@lindenberg.one>.
Hello Willem,

I tried and succeeded, you may wish to review https://lists.apache.org/thread/78qhjzg79fb9y6435ym1hxmol0lbvzlp. 

Best Regards,

Joachim

 

Von: Willem van de Mheen <Wi...@workspace365.net> 
Gesendet: Mittwoch, 21. Dezember 2022 12:16
An: user@guacamole.apache.org
Betreff: Adding JavaScript to your Guacamole extension

 

Hi,

 

I’m trying to build a Guacamole extension and I want to include some JavaScript. Unfortunately, I can’t really find any documentation on this subject. I can include a JavaScript file in the guac-manifest.json but when I define an Angular module, I need to refer to a template HTML file and you can’t simply add an HTML file to a Guacamole extension. How is this supposed to work?

 

Best regards,

Willem van de Mheen

 


Re: Adding JavaScript to your Guacamole extension

Posted by Nick Couchman <vn...@apache.org>.
On Wed, Dec 21, 2022 at 6:16 AM Willem van de Mheen
<Wi...@workspace365.net> wrote:
> I’m trying to build a Guacamole extension and I want to include some JavaScript. Unfortunately, I can’t really find any documentation on this subject. I can include a JavaScript file in the guac-manifest.json but when I define an Angular module, I need to refer to a template HTML file and you can’t simply add an HTML file to a Guacamole extension. How is this supposed to work?
>

This is both documented in the user guide:
https://guacamole.apache.org/doc/gug/guacamole-ext.html

And also present in several extensions:
https://github.com/apache/guacamole-client/tree/master/extensions/guacamole-auth-duo
https://github.com/apache/guacamole-client/tree/master/extensions/guacamole-auth-radius
https://github.com/apache/guacamole-client/tree/master/extensions/guacamole-display-statistics

Those are examples and some of the simpler modules. Note that all of
those modules use a JavaScript/CSS Minification plugin in their
pom.xml files that combines and compresses all of the JavaScript data.
The pom.xml and guac-manifest.json files will give you hints as to
where the JavaScript is located and how it is loaded, and those can
guide you to how to implement it in your own module.

-NIck

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org