Skip to content

Commit

Permalink
node: skip link for config only peers
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Oct 20, 2024
1 parent fd52103 commit c770f5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ sub get_server {
my $server = {
peer_key => $peer->{'key'},
peer_name => $peer->{'name'},
peer_type => $peer->{'type'} // '',
section => $peer->{'section'},
gathering => $facts->{'gathering'} || 0, # job id of current gathering job or 0
cleaning => $facts->{'cleaning'} || 0, # cleaning job id
Expand Down
16 changes: 11 additions & 5 deletions plugins/plugins-available/node-control/templates/node_control.tt
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,17 @@
[% ELSE %]
<td class="align-top">[% IF s.host_name %]<a class="link" target="_blank" href="//[% s.host_name | uri %][% IF s.omd_site %]/[% s.omd_site | uri; END %]/"><i class="uil uil-external-link-alt text-xs"></i>[% s.host_name | html %]</a>[% END %]</td>
<td class="align-top">
[% IF s.omd_site %]
[% remote_thruk_url = get_remote_thruk_url_path(c, s.peer_key) %]
<a class="link" href="[% IF remote_thruk_url %]proxy.cgi/[% s.peer_key | uri %][% remote_thruk_url %][% ELSE %][% url_prefix %][% END %]" target="_blank">
<i class="fa-solid fa-desktop text-xs" title="Open site in a new tab."></i> [% s.omd_site | html %]
</a>
[% IF s.peer_type == "configonly" %]
<span title="no web interface available">
<i class="fa-solid fa-desktop text-xs invisible"></i> [% s.omd_site | html %]
</span>
[% ELSE %]
[% IF s.omd_site %]
[% remote_thruk_url = get_remote_thruk_url_path(c, s.peer_key) %]
<a class="link" href="[% IF remote_thruk_url %]proxy.cgi/[% s.peer_key | uri %][% remote_thruk_url %][% ELSE %][% url_prefix %][% END %]" target="_blank">
<i class="fa-solid fa-desktop text-xs" title="Open site in a new tab."></i> [% s.omd_site | html %]
</a>
[% END %]
[% END %]
</td>
[% IF error_lines.size > 0 %]
Expand Down

0 comments on commit c770f5b

Please sign in to comment.