Skip to content

Commit e74c392

Browse files
Address some issues brought up by #1001 (#1005)
* Add back pid and add styling for update checks * improve styling and layout --------- Co-authored-by: dylan-at-nagios <122833930+dylan-at-nagios@users.noreply.github.com>
1 parent efa56d2 commit e74c392

File tree

5 files changed

+59
-50
lines changed

5 files changed

+59
-50
lines changed

Changelog

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Nagios Core 4 Change Log
44

55
4.5.8 - 2024-XX-XX
66
------------------
7+
* Improve new exfoliation theme and add back in PID information (Dylan Anderson)
78
* Fix issues with downtimes that are both flexible and triggered and improve downtime additions in general (#595) (Dylan Anderson)
89

910
4.5.7 - 2024-10-24

contrib/exfoliation/stylesheets/common.css

+31-14
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ not important: blue aaccff 777777
9696
--border: #28303E;
9797
--input: #0D1014;
9898
--radius: 0.3rem;
99+
100+
--info-msg-text: #89BDF1;
101+
--info-msg-border: #1866B6;
102+
--info-msg-bg: #041220;
103+
104+
--success-msg-text: #40DE7A;
105+
--success-msg-border: #147538;
106+
--success-msg-bg: #04160A;
107+
108+
--warning-msg-text: #FFF948;
109+
--warning-msg-border: #706C00;
110+
--warning-msg-bg: #191900;
111+
112+
--error-msg-text: #F9B4B5;
113+
--error-msg-border: #710B09;
114+
--error-msg-bg: #1C0202;
99115
}
100116

101117
#side {
@@ -161,7 +177,6 @@ a:hover {
161177
gap: 4px;
162178
padding: 16px;
163179
margin: 0;
164-
border-right: 1px var(--border) solid;
165180
}
166181

167182
.navbarlogo {
@@ -261,12 +276,6 @@ ul.navsectionlinks li ul li a:hover {
261276
text-align: center;
262277
}
263278

264-
#mainbrandsplash {
265-
font-size: 12pt;
266-
font-weight: bold;
267-
margin: 0 0 35px 0;
268-
}
269-
270279
#maincopy {
271280
margin: 0 0 15px 0;
272281
}
@@ -305,7 +314,7 @@ ul.navsectionlinks li ul li a:hover {
305314
}
306315

307316
#updateversioninfo {
308-
margin: 15px auto 35px auto;
317+
margin: 15px auto 0 auto;
309318
width: 400px;
310319
}
311320

@@ -314,8 +323,10 @@ ul.navsectionlinks li ul li a:hover {
314323
}
315324

316325
.updatechecksdisabled {
317-
background-color: #FF9F9F;
318-
border: 1px solid red;
326+
background-color: var(--error-msg-bg);
327+
border: 1px solid var(--error-msg-border);
328+
color: var(--error-msg-text);
329+
border-radius: var(--radius);
319330
padding: 10px;
320331
}
321332

@@ -324,8 +335,10 @@ ul.navsectionlinks li ul li a:hover {
324335
}
325336

326337
.updateavailable {
327-
background-color: #9FD4FF;
328-
border: 1px solid blue;
338+
background-color: var(--info-msg-bg);
339+
border: 1px solid var(--info-msg-border);
340+
color: var(--info-msg-text);
341+
border-radius: var(--radius);
329342
padding: 10px;
330343
}
331344

@@ -334,8 +347,12 @@ ul.navsectionlinks li ul li a:hover {
334347
font-weight: bold;
335348
}
336349

337-
#mainbrandsplash {
338-
display: none;
350+
.dot-enabled {
351+
color: #00EE5F;
352+
}
353+
354+
.dot-disabled {
355+
color: red;
339356
}
340357

341358
#mainsplash {

html/index.php.in

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ $this_year = '2024';
5151
height: 100vh;
5252
width: 200px;
5353
border: none;
54+
/* I don't like doing this but not sure of a better way */
55+
border-right: 1px solid #28303E;
5456
}
5557

5658
iframe[name="main"] {

html/main.php

+3-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function getCoreStatus() {
5656
}
5757

5858
function setCoreStatusHTML(image, text) {
59-
$('#core-status').html('<img src="images/' + image + '.gif" /> ' + text);
59+
$('#core-status').html(`<span class='dot-${image}'>●</span>&nbsp&nbsp${text}`);
6060
}
6161
</script>
6262

@@ -65,17 +65,12 @@ function setCoreStatusHTML(image, text) {
6565

6666
<body id="splashpage">
6767

68-
69-
<div id="mainbrandsplash">
70-
<div><span id="core-status"></span></div>
71-
</div>
72-
73-
7468
<div id="currentversioninfo">
7569
<div>
7670
<div class="version">Version <b><?php echo $this_version; ?></b></div>
7771
<div class="releasedate">October 24, 2024</div>
7872
</div>
73+
<div><span id="core-status"></span></div>
7974
<a class="checkforupdates" href="https://www.nagios.org/checkforupdates/?version=<?php echo $this_version; ?>&amp;product=nagioscore" target="_blank">Check for updates</a>
8075
</div>
8176

@@ -90,9 +85,7 @@ function setCoreStatusHTML(image, text) {
9085
<div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="https://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div>
9186
</div>
9287
<?php
93-
} else if (
94-
$updateinfo['update_available'] && $this_version < $updateinfo['update_version']
95-
) {
88+
} else if ($updateinfo['update_available'] && $this_version < $updateinfo['update_version']) {
9689
?>
9790
<div class="updateavailable">
9891
<div class="updatemessage">A new version of Nagios Core is available!</div>

html/stylesheets/common.css

+22-26
Original file line numberDiff line numberDiff line change
@@ -190,40 +190,36 @@ div.navsectionheader ul li ul li {
190190
text-align: center;
191191
}
192192

193-
#mainbrandsplash{
194-
font-size: 12pt;
195-
font-weight: bold;
196-
margin: 0 0 35px 0;
197-
}
198-
199193
#maincopy{
200194
margin: 0 0 15px 0;
201195
}
202196

203-
#currentversioninfo{
204-
font-size: 12pt;
205-
}
206-
#currentversioninfo .product{
207-
font-size: 14pt;
208-
font-weight: bold;
209-
}
210-
#currentversioninfo .version{
197+
#currentversioninfo {
211198
font-size: 14pt;
212-
font-weight: bold;
199+
display: flex;
200+
flex-direction: column;
201+
gap: 2rem;
213202
}
214-
#currentversioninfo .version b{
215-
font-size: 14pt;
216-
font-weight: bold;
217-
}
218-
#currentversioninfo .releasedate{
219-
font-size: 11pt;
220-
margin: 5px 0 0 0;
221-
}
222-
#currentversioninfo .checkforupdates{
223-
font-size: 11pt;
224-
font-weight: bold;
203+
204+
#currentversioninfo *{
205+
font-size: 12pt;
225206
}
226207

208+
#currentversioninfo > div {
209+
display: flex;
210+
flex-direction: column;
211+
align-items: center;
212+
gap: 2rem;
213+
}
214+
215+
.dot-enabled {
216+
color: #33FF00;
217+
}
218+
219+
.dot-disabled {
220+
color: red;
221+
}
222+
227223
#updateversioninfo{
228224
margin: 15px auto 35px auto;
229225
width: 400px;

0 commit comments

Comments
 (0)