Skip to content

Commit 7e79605

Browse files
committed
cleanup infobox
1 parent e13dfa3 commit 7e79605

File tree

1 file changed

+38
-40
lines changed

1 file changed

+38
-40
lines changed

templates/_infobox.tt

+38-40
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,48 @@
11
[% USE date %]
22
[% DEFAULT extra_classes = "" %][% IF extra_classes %][% SET extra_classes = " " _ extra_classes %][% END %]
3-
<div class="card min-w-[350px][% extra_classes %]">
3+
<div class="card min-w-[350px][% extra_classes %] overflow-hidden">
44
<div class="head">
55
<h3>[% infoBoxTitle %]</h3>
66
</div>
7-
<div class="body">
8-
<table>
9-
[% IF show_last_update %]
7+
<table>
8+
[% IF show_last_update %]
9+
<tr>
10+
<th class="px-2 pt-2">Date</th>
11+
<td>
12+
<span id="infoboxdate">[% format_date(date.now, datetime_format_long) %]</span>[% IF ! no_auto_reload %]<span id="refresh_label" title="page with automatically refresh every [% refresh_rate %] seconds"> (&infin;[% refresh_rate %]s)</span>[% END %]
13+
</td>
14+
</tr>
15+
[% END %]
16+
<tr>
17+
<th class="px-2">Version</th>
18+
<td class="truncate">
19+
<a class="link" href='http://www.thruk.org' target='_blank'>Thruk [% thrukversion %]</a>
20+
</td>
21+
</tr>
22+
[% IF c.config.extra_version %]
1023
<tr>
11-
<th>Date</th>
24+
<th class="px-2">OMD</th>
1225
<td>
13-
<span id="infoboxdate">[% format_date(date.now, datetime_format_long) %]</span>[% IF ! no_auto_reload %]<span id="refresh_label" title="page with automatically refresh every [% refresh_rate %] seconds"> (&infin;[% refresh_rate %]s)</span>[% END %]
26+
<a class="link" href='[% c.config.extra_version_link %]' target='_blank'>[% c.config.extra_version %]</a>
1427
</td>
1528
</tr>
16-
[% END %]
17-
<tr>
18-
<th>Version</th>
19-
<td class="truncate">
20-
<a class="link" href='http://www.thruk.org' target='_blank'>Thruk [% thrukversion %]</a>
21-
</td>
22-
</tr>
23-
[% IF c.config.extra_version %]
24-
<tr>
25-
<th>OMD</th>
26-
<td>
27-
<a class="link" href='[% c.config.extra_version_link %]' target='_blank'>[% c.config.extra_version %]</a>
28-
</td>
29-
</tr>
30-
[% END %]
31-
[% IF c.user_exists %]
32-
<tr>
33-
<th>User</th><td><a class="link" href="[% url_prefix %]cgi-bin/user.cgi">[% remote_user %]</a></td>
34-
</tr>
35-
[% IF has_proc_info %]
36-
<tr>
37-
<td colspan="2">
38-
[% IF pi.keys.size > 0 && pi.enable_notifications == 0 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Notifications are disabled</div></a>[% END %]
39-
[% IF pi.keys.size > 0 && pi.enable_notifications == -1 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Notifications are partially disabled</div></a>[% END %]
40-
[% IF pi.keys.size > 0 && pi.execute_service_checks == 0 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Service checks are disabled </div></a>[% END %]
41-
[% IF pi.keys.size > 0 && pi.execute_service_checks == -1 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Service checks are partially disabled </div></a>[% END %]
42-
[% IF pi.keys.size > 0 && pi.execute_host_checks == 0 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Host checks are disabled </div></a>[% END %]
43-
[% IF pi.keys.size > 0 && pi.execute_host_checks == -1 %]<a href='extinfo.cgi?type=0'><div class='textALERT'> - Host checks are partially disabled </div></a>[% END %]
44-
</td>
45-
</tr>
46-
[% END %]
47-
[% END %]
48-
</table>
49-
</div>
29+
[% END %]
30+
[% IF c.user_exists %]
31+
<tr>
32+
<th class="px-2">User</th><td><a class="link" href="[% url_prefix %]cgi-bin/user.cgi">[% remote_user %]</a></td>
33+
</tr>
34+
[% IF has_proc_info %]
35+
<tr>
36+
<td colspan="2">
37+
[% IF pi.keys.size > 0 && pi.enable_notifications == 0 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Notifications are disabled</div></a>[% END %]
38+
[% IF pi.keys.size > 0 && pi.enable_notifications == -1 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Notifications are partially disabled</div></a>[% END %]
39+
[% IF pi.keys.size > 0 && pi.execute_service_checks == 0 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Service checks are disabled </div></a>[% END %]
40+
[% IF pi.keys.size > 0 && pi.execute_service_checks == -1 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Service checks are partially disabled </div></a>[% END %]
41+
[% IF pi.keys.size > 0 && pi.execute_host_checks == 0 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Host checks are disabled </div></a>[% END %]
42+
[% IF pi.keys.size > 0 && pi.execute_host_checks == -1 %]<a class="" href='extinfo.cgi?type=0'><div class='textALERT hoverable px-2 pb-1'> - Host checks are partially disabled </div></a>[% END %]
43+
</td>
44+
</tr>
45+
[% END %]
46+
[% END %]
47+
</table>
5048
</div>

0 commit comments

Comments
 (0)