Summary Puppet report from Foreman

Stupid little details…

the links for each hostname come up with http:// instead of https:// even though I have :require_ssl: true in config/settings.yaml

(output from /usr/local/bin/rake reports:summarize days=1 RAILS_ENV="production")

I think this is a bug and I will have to find out how it builds the URL

··· -- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!

>
> Stupid little details…
>
> the links for each hostname come up with http:// instead of https:// even
though I have :require_ssl: true in config/settings.yaml
>
> (output from /usr/local/bin/rake reports:summarize days=1
RAILS_ENV="production")
>
> I think this is a bug and I will have to find out how it builds the URL

You can start with opening a new issue… if you want to look for a patch,
check the app model host mailer file.

Ohad
>
> –
> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com
>
> Need help communicating between generations at work to achieve your
desired success? Let us help!
>
> –
> You received this message because you are subscribed to the Google Groups
"Foreman users" group.
> To post to this group, send email to foreman-users@googlegroups.com.
> To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

··· On 2011 8 19 20:22, "Craig White" wrote: >

>
> >
> > Stupid little details…
> >
> > the links for each hostname come up with http:// instead of https:// even though I have :require_ssl: true in config/settings.yaml
> >
> > (output from /usr/local/bin/rake reports:summarize days=1 RAILS_ENV="production")
> >
> > I think this is a bug and I will have to find out how it builds the URL
>
> You can start with opening a new issue… if you want to look for a patch, check the app model host mailer file.

··· On Aug 19, 2011, at 12:32 PM, Ohad Levy wrote: > On 2011 8 19 20:22, "Craig White" wrote: ---- I was already looking there before I asked the list but I'm not familiar with what is actually stored in the db - I will check it out when I get more time - perhaps next week.

Thanks

Craig

>
> >
> > Stupid little details…
> >
> > the links for each hostname come up with http:// instead of https:// even though I have :require_ssl: true in config/settings.yaml
> >
> > (output from /usr/local/bin/rake reports:summarize days=1 RAILS_ENV="production")
> >
> > I think this is a bug and I will have to find out how it builds the URL
>
> You can start with opening a new issue… if you want to look for a patch, check the app model host mailer file.

··· On Aug 19, 2011, at 12:32 PM, Ohad Levy wrote: > On 2011 8 19 20:22, "Craig White" wrote: ---- as best as I can tell, it comes from here...

grep -r link_to_host app/*

app/views/host_mailer/_active_hosts.text.html.erb: <%= render ‘link_to_host’, :host => host %>
app/views/host_mailer/_nonactive_hosts.text.html.erb: <%= render ‘link_to_host’, :host => host %>

but I don’t know how ‘link_to_host’ is actually constructed

Craig

Have a look at app/views/host_mailer/_link_to_host.text.html.erb

You can use :protocol => "https://" with the link_to method.

to solve it correctly, we probably need to do something like this (so it
generate https links when SSL is enabled).

link_to host, host_path(:id => host, :host => @url, :only_path => false,
:protocol => SETTINGS[:require_ssl] ? ? "https://" : "http://")

Please create a new issue, and a patch if possible :wink:

Ohad

··· On 08/23/2011 02:40 AM, Craig White wrote: > On Aug 19, 2011, at 12:32 PM, Ohad Levy wrote: > >> On 2011 8 19 20:22, "Craig White" wrote: >>> Stupid little details... >>> >>> the links for each hostname come up with http:// instead of https:// even though I have :require_ssl: true in config/settings.yaml >>> >>> (output from /usr/local/bin/rake reports:summarize days=1 RAILS_ENV="production") >>> >>> I think this is a bug and I will have to find out how it builds the URL >> You can start with opening a new issue... if you want to look for a patch, check the app model host mailer file. > ---- > as best as I can tell, it comes from here... > > # grep -r link_to_host app/* > app/views/host_mailer/_active_hosts.text.html.erb:<%= render 'link_to_host', :host => host %> > app/views/host_mailer/_nonactive_hosts.text.html.erb:<%= render 'link_to_host', :host => host %> > > but I don't know how 'link_to_host' is actually constructed > > Craig >

Done - 1129

http://theforeman.org/issues/1129

this is what worked for me…

<= link_to host, host_path(:id => host, :host => @url, :only_path => false, :protocol => SETTINGS[:require_ssl] == true ? "https://" : "http://") %>

Thanks for the help

Craig

··· On Aug 23, 2011, at 12:20 AM, Ohad Levy wrote:

On 08/23/2011 02:40 AM, Craig White wrote:

On Aug 19, 2011, at 12:32 PM, Ohad Levy wrote:

On 2011 8 19 20:22, "Craig White"craig.white@ttiltd.com wrote:

Stupid little details…

the links for each hostname come up with http:// instead of https:// even though I have :require_ssl: true in config/settings.yaml

(output from /usr/local/bin/rake reports:summarize days=1 RAILS_ENV=“production”)

I think this is a bug and I will have to find out how it builds the URL
You can start with opening a new issue… if you want to look for a patch, check the app model host mailer file.


as best as I can tell, it comes from here…

grep -r link_to_host app/*

app/views/host_mailer/_active_hosts.text.html.erb:<%= render ‘link_to_host’, :host => host %>
app/views/host_mailer/_nonactive_hosts.text.html.erb:<%= render ‘link_to_host’, :host => host %>

but I don’t know how ‘link_to_host’ is actually constructed

Craig

Have a look at app/views/host_mailer/_link_to_host.text.html.erb

You can use :protocol => “https://” with the link_to method.

to solve it correctly, we probably need to do something like this (so it generate https links when SSL is enabled).

link_to host, host_path(:id => host, :host => @url, :only_path => false, :protocol => SETTINGS[:require_ssl] ? ? “https://” : “http://”)

Please create a new issue, and a patch if possible :wink:

Ohad


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.


Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!