@@ -22,6 +22,9 @@ function GetHeader() {
22
22
td {
23
23
padding-right: 20px;
24
24
}
25
+ h1 {
26
+ text-transform: none;
27
+ }
25
28
.far, .fas {
26
29
font-family: "Font Awesome 5 Free" !important;
27
30
}
@@ -89,7 +92,7 @@ function GetProxies() {
89
92
$ index ++;
90
93
}
91
94
return <<<HTML
92
- <div class="wrap-panel status-div">
95
+ <article class="wrap-panel status-div">
93
96
<div id="proxiesTable">
94
97
<script>
95
98
$.ajax({
@@ -116,10 +119,8 @@ function GetProxies() {
116
119
{$ status }
117
120
</tbody>
118
121
</table>
119
- <br/>
120
122
</div>
121
- <br/>
122
- </div>
123
+ </article>
123
124
HTML ;
124
125
}
125
126
@@ -137,7 +138,7 @@ function GetF2B() {
137
138
$ index ++;
138
139
}
139
140
return <<<HTML
140
- <div class="wrap-panel status-div">
141
+ <article class="wrap-panel status-div">
141
142
<div>
142
143
<h2>Fail2Ban</h2>
143
144
<table class="table-hover">
@@ -152,10 +153,8 @@ function GetF2B() {
152
153
{$ status }
153
154
</tbody>
154
155
</table>
155
- <br/>
156
156
</div>
157
- <br/>
158
- </div>
157
+ </article>
159
158
HTML ;
160
159
}
161
160
@@ -202,7 +201,7 @@ function GetTemplates() {
202
201
return "" ;
203
202
}
204
203
return <<<HTML
205
- <div class="wrap-panel status-div">
204
+ <article class="wrap-panel status-div">
206
205
<div>
207
206
<h2>Version Updates <i class="fas fa-info-circle" title=" {$ tooltip }"></i></h2>
208
207
<table class="table-hover">
@@ -218,10 +217,8 @@ function GetTemplates() {
218
217
{$ files }
219
218
</tbody>
220
219
</table>
221
- <br/>
222
220
</div>
223
- <br/>
224
- </div>
221
+ </article>
225
222
HTML ;
226
223
}
227
224
@@ -243,24 +240,22 @@ function GetAnnouncements() {
243
240
$ counter ++;
244
241
}
245
242
return <<<HTML
246
- <div class="wrap-panel status-div">
243
+ <article class="wrap-panel status-div">
247
244
<div>
248
245
<h2>Announcements</h2>
249
246
<table class="table-hover">
250
247
<tbody class="tbody-data">
251
248
{$ output }
252
249
</tbody>
253
250
</table>
254
- <br/>
255
251
</div>
256
- <br/>
257
- </div>
252
+ </article>
258
253
HTML ;
259
254
}
260
255
261
256
function GetLinks () {
262
257
return <<<HTML
263
- <div class="wrap-panel status-div">
258
+ <article class="wrap-panel status-div">
264
259
<div>
265
260
<h2>Useful Links</h2>
266
261
<table class="table-hover">
@@ -272,10 +267,8 @@ function GetLinks() {
272
267
<tr><td class="link-text left-text"><span class="status-text"><a href="https://opencollective.com/linuxserver/donate">Donate</a></span></td></tr>
273
268
</tbody>
274
269
</table>
275
- <br/>
276
270
</div>
277
- <br/>
278
- </div>
271
+ </article>
279
272
HTML ;
280
273
}
281
274
@@ -299,9 +292,9 @@ function GetGoaccess() {
299
292
300
293
$ access_log = file_exists ("/dashboard/logs " ) ? "/dashboard/logs/*.log " : "/config/log/nginx/access.log " ;
301
294
$ goaccess = shell_exec ("cat $ access_log | /usr/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf $ geodb $ asndb - " );
295
+ $ goaccess = str_replace ("<div class='loading-container'> " , "<div hidden> " , $ goaccess );
302
296
$ goaccess = str_replace ("<title>Server Statistics " , "<title>SWAG Dashboard " , $ goaccess );
303
- $ goaccess = str_replace ("<h1 class='h-dashboard'> " , "<h1> " , $ goaccess );
304
- $ goaccess = str_replace ("<i class='fa fa-tachometer'></i> " , "<img src='/icon.svg' width='32' height='32'> SWAG " , $ goaccess );
297
+ $ goaccess = str_replace ("<i class='fa fa-tachometer' aria-hidden='true'></i> " , "<img src='/icon.svg' width='32' height='32'> SWAG " , $ goaccess );
305
298
$ goaccess = preg_replace ("/(<link rel='icon' )(.*?)(>)/ " , "<link rel='icon' type='image/svg+xml' href='/icon.svg'> " , $ goaccess );
306
299
return $ goaccess ;
307
300
}
@@ -318,7 +311,7 @@ function GetCertificate() {
318
311
return <<<HTML
319
312
<div class="pull-right status-div">
320
313
<h4>
321
- <span class="label label-info" style="display:block">
314
+ <span class="label label-info" style="display:block" id="last-updated" >
322
315
{$ ssl }
323
316
</span>
324
317
</h4>
@@ -365,10 +358,10 @@ function GetStats() {
365
358
echo json_encode ($ page );
366
359
} else {
367
360
$ goaccess = GetGoaccess ();
368
- $ status = GetHeader () . GetProxies () . GetF2B () . GetTemplates () . GetAnnouncements () . GetLinks () . "<div class='wrap-general '> " ;
369
- $ page = str_replace ("<div class='wrap-general '> " , $ status , $ goaccess );
370
- $ ssl = GetCertificate () . "<div class='pull-right hide '> " ;
371
- $ page = str_replace ("<div class='pull-right '> " , $ ssl , $ page );
361
+ $ status = GetHeader () . GetProxies () . GetF2B () . GetTemplates () . GetAnnouncements () . GetLinks () . "<br/><br/><aside id='overall' aria-labelledby='overall-heading '> " ;
362
+ $ page = str_replace ("<aside id='overall' aria-labelledby='overall-heading '> " , $ status , $ goaccess );
363
+ $ ssl = GetCertificate () . "<div hidden style='margin-left: auto; '> " ;
364
+ $ page = str_replace ("<div style='margin-left: auto; '> " , $ ssl , $ page );
372
365
echo $ page ;
373
366
}
374
367
?>
0 commit comments