Support HTTPS with http_secure parameter

This commit is contained in:
Oliver Gorwits
2014-02-27 18:26:03 +00:00
parent c7fa253bb7
commit b28eaf8d4c
3 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2.002000 - 2014-02-27
* Support HTTPS with http_secure parameter
2.001000 - 2013-12-08
* Initial release

View File

@@ -33,6 +33,7 @@ App::NetdiscoX::Web::Plugin::Observium - Port Traffic Links and Thumbnail Graphs
plugin_observium:
webhost: "web-server.example.com"
open_in_new_window: true
http_secure: true
=head1 Description
@@ -58,6 +59,12 @@ Value: Boolean. Default: false.
If set to true, the hyperlink is configured to open the port's Observium page
in a new browser window or tab.
=head2 http_secure
Value: Boolean. Default: false.
If set to true, the hyperlink is configured to use HTTPS.
=head1 AUTHOR
Oliver Gorwits <oliver@cpan.org>

View File

@@ -1,4 +1,4 @@
<a href="http://[% settings.plugin_observium.webhost | uri %]/device/hostname=[% device.dns || device.name | uri %]/tab=port/ifdescr=[% row.base64url_port %]/"
<a href="[% http_secure ? 'https' : 'http' %]://[% settings.plugin_observium.webhost | uri %]/device/hostname=[% device.dns || device.name | uri %]/tab=port/ifdescr=[% row.base64url_port %]/"
[% 'target="_blank"' IF settings.plugin_observium.open_in_new_window %]
class="btn nd_observium"
data-content='