Hello Mike,

I ran through an AngularJS course and with some more experiments I got the 
field to work, except for the second issue, the field missing when prefilled. 
Is this Guacamole or AngularJS?

Any suggestion what to look for?

Thanks, 
Joachim

 

Von: Joachim Lindenberg <guacam...@lindenberg.one> 
Gesendet: Montag, 12. Dezember 2022 23:16
An: user@guacamole.apache.org
Betreff: AW: Additional field (select options) on login screen?

 

Hello Mike,

I got my module, config, and controller to load – seeing console.log() output.

I am struggling with two issues right now:

*       While rendering the template I want to call methods in my controller, 
similar to ng-options="option as getFieldOption(option)" I have seen in other 
places. Unfortunately when I add this to my template, I always get an exception 
rather than a call to a controller method. How is this supposed to work? I have 
to admin I am newbie in ng and also unsure what is guacamole, what ng…
*       When I add my field/parameter name to the URL, the field gets omitted 
while rendering. How can I turn this off as I´d prefer that to be just a 
default?

Thanks, 
Joachim

 

 

Von: Michael Jumper <mjum...@apache.org <mailto:mjum...@apache.org> > 
Gesendet: Freitag, 9. Dezember 2022 02:25
An: user@guacamole.apache.org <mailto:user@guacamole.apache.org> 
Betreff: Re: Additional field (select options) on login screen?

 

On Thu, Dec 8, 2022 at 8:34 AM Joachim Lindenberg <guacam...@lindenberg.one 
<mailto:guacam...@lindenberg.one> > wrote:

Hello Mike,

thanks for that. I started trying out that route. I figured out I probably
also need an html template, a controller, probably additions to manifest,
but cannot get the field to be displayed yet, and also don´t see any errors
in the browsers console I can attribute to that. I enabled debug logging in
guacamole container. I can tell that my module.js (referenced from manifest)
is included and executes, but I cannot find my config, controller and
template within the network trace. Should they be included in manifest (totp
doesn´t)?

 

Everything has to be in the manifest somehow. The TOTP support doesn't include 
those specific files in the manifest because part of that extension's build 
process is JavaScript minification and concatenation. They're there implicitly 
via the single file that it does include.

 

Any tip what to watch out for? Is there any debug support for the browser
parts?

 

You need to make sure your module is added as a dependency of the "index" 
module or your module's config, etc. will not be loaded with the rest of the 
app. You need to also make sure that all relevant files are part of the 
manifest (either through being explicitly included or through a concatenation 
step). You should also double check that the field type name defined in the 
Java half of your field exactly matches the field type name that you're 
registering - if they don't match, the webapp won't be able to locate and 
render your field.

 

If things still are not behaving as expected, I recommend adding some 
console.log() calls around the various parts of your code to see what files are 
loaded vs. not, what parts of your module are loaded vs. not, etc. That might 
give you an idea where to look for the problem.

 

- Mike

 

Reply via email to