Skip to content

Commit 9f44fee

Browse files
authored
Merge pull request #62 from femto-code/master
Update v1.1.4 (with critical fix)
2 parents 06a2d87 + 7df2121 commit 9f44fee

File tree

4 files changed

+142
-136
lines changed

4 files changed

+142
-136
lines changed

CHANGELOG.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
Open for your feature [requests](https://github.com/femto-code/Rasberry-Pi-Dashboard/pulls) or [issues](https://github.com/femto-code/Rasberry-Pi-Dashboard/issues)!
88
[https://github.com/femto-code/Rasberry-Pi-Dashboard](https://github.com/femto-code/Rasberry-Pi-Dashboard)
99

10-
## [1.2.0] - 2022-XX-XX
11-
12-
## Added
13-
- GPIO live status
14-
15-
## Changed
16-
- improved error handling of network requests
10+
## [1.1.4] - 2023-10-13
11+
- fix stats not showing up on systems with PHP version 8.1+ (#61)
1712

1813
## [1.1.3] - 2023-09-17
1914
- updated dependencies

backend/sys_infos.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2-
error_reporting(E_ALL);
3-
ini_set ('display_errors', 'On');
2+
if(isset($_GET["debug"])){
3+
error_reporting(E_ALL);
4+
ini_set ('display_errors', 'On');
5+
}
46
// Authorization
57
session_start();
68
if(!isset($_SESSION["rpidbauth"])){
@@ -14,7 +16,7 @@
1416
// Uptime
1517
$uptime = shell_exec("cat /proc/uptime");
1618
$uptime = explode(" ", $uptime);
17-
$uptime = $uptime[0];
19+
$uptime = (int) $uptime[0];
1820
$y = floor($uptime / 60 / 60 / 24 / 365);
1921
$d = floor($uptime / 60 / 60 / 24) % 365;
2022
$h = floor(($uptime / 3600) % 24);

css/index.css

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
/* rubik-300 - latin */
2+
@font-face {
3+
font-family: 'Rubik';
4+
font-style: normal;
5+
font-weight: 300;
6+
src: url('fonts/rubik-v12-latin-300.eot');
7+
/* IE9 Compat Modes */
8+
src: local(''),
9+
url('fonts/rubik-v12-latin-300.eot?#iefix') format('embedded-opentype'),
10+
/* IE6-IE8 */
11+
url('fonts/rubik-v12-latin-300.woff2') format('woff2'),
12+
/* Super Modern Browsers */
13+
url('fonts/rubik-v12-latin-300.woff') format('woff'),
14+
/* Modern Browsers */
15+
url('fonts/rubik-v12-latin-300.ttf') format('truetype'),
16+
/* Safari, Android, iOS */
17+
url('fonts/rubik-v12-latin-300.svg#Rubik') format('svg');
18+
/* Legacy iOS */
19+
}
20+
21+
body,
22+
.mdtoast {
23+
font-family: 'Rubik', sans-serif;
24+
}
25+
26+
.hidden {
27+
display: none;
28+
}
29+
30+
@media screen and (max-width: 530px) {
31+
#notf {
32+
display: block;
33+
}
34+
35+
#dot {
36+
display: none;
37+
}
38+
}
39+
40+
.preload-screen {
41+
position: fixed;
42+
left: 0px;
43+
top: 0px;
44+
width: 100%;
45+
height: 100%;
46+
z-index: 9999;
47+
background: url(img/load.gif) center no-repeat #fff;
48+
}
49+
50+
.doughnut-chart-container {
51+
height: 360px;
52+
width: 360px;
53+
float: left;
54+
}
55+
56+
.bd-placeholder-img {
57+
font-size: 1.125rem;
58+
text-anchor: middle;
59+
-webkit-user-select: none;
60+
-moz-user-select: none;
61+
user-select: none;
62+
}
63+
64+
@media (min-width: 768px) {
65+
.bd-placeholder-img-lg {
66+
font-size: 3.5rem;
67+
}
68+
}
69+
70+
.b-example-divider {
71+
width: 100%;
72+
height: 3rem;
73+
background-color: rgba(0, 0, 0, .1);
74+
border: solid rgba(0, 0, 0, .15);
75+
border-width: 1px 0;
76+
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
77+
}
78+
79+
.b-example-vr {
80+
flex-shrink: 0;
81+
width: 1.5rem;
82+
height: 100vh;
83+
}
84+
85+
.bi {
86+
/* vertical-align: -.125em; */
87+
fill: currentColor;
88+
}
89+
90+
.nav-scroller {
91+
position: relative;
92+
z-index: 2;
93+
height: 2.75rem;
94+
overflow-y: hidden;
95+
}
96+
97+
.nav-scroller .nav {
98+
display: flex;
99+
flex-wrap: nowrap;
100+
padding-bottom: 1rem;
101+
margin-top: -1px;
102+
overflow-x: auto;
103+
text-align: center;
104+
white-space: nowrap;
105+
-webkit-overflow-scrolling: touch;
106+
}
107+
108+
.btn-bd-primary {
109+
--bd-violet-bg: #712cf9;
110+
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;
111+
112+
--bs-btn-font-weight: 600;
113+
--bs-btn-color: var(--bs-white);
114+
--bs-btn-bg: var(--bd-violet-bg);
115+
--bs-btn-border-color: var(--bd-violet-bg);
116+
--bs-btn-hover-color: var(--bs-white);
117+
--bs-btn-hover-bg: #6528e0;
118+
--bs-btn-hover-border-color: #6528e0;
119+
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
120+
--bs-btn-active-color: var(--bs-btn-hover-color);
121+
--bs-btn-active-bg: #5a23c8;
122+
--bs-btn-active-border-color: #5a23c8;
123+
}
124+
125+
.bd-mode-toggle {
126+
z-index: 1500;
127+
}
128+
129+
.bd-mode-toggle .dropdown-menu .active .bi {
130+
display: block !important;
131+
}

index.php

Lines changed: 4 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -52,128 +52,6 @@
5252

5353
<title><?php system("hostname");?> - Loading...</title>
5454

55-
<style>
56-
/* rubik-300 - latin */
57-
@font-face {
58-
font-family: 'Rubik';
59-
font-style: normal;
60-
font-weight: 300;
61-
src: url('fonts/rubik-v12-latin-300.eot'); /* IE9 Compat Modes */
62-
src: local(''),
63-
url('fonts/rubik-v12-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
64-
url('fonts/rubik-v12-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
65-
url('fonts/rubik-v12-latin-300.woff') format('woff'), /* Modern Browsers */
66-
url('fonts/rubik-v12-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
67-
url('fonts/rubik-v12-latin-300.svg#Rubik') format('svg'); /* Legacy iOS */
68-
}
69-
body, .mdtoast{
70-
font-family: 'Rubik', sans-serif;
71-
}
72-
.hidden{
73-
display: none;
74-
}
75-
@media screen and (max-width: 530px) {
76-
#notf {
77-
display: block;
78-
}
79-
#dot{
80-
display:none;
81-
}
82-
}
83-
.preload-screen {
84-
position: fixed;
85-
left: 0px;
86-
top: 0px;
87-
width: 100%;
88-
height: 100%;
89-
z-index: 9999;
90-
background: url(img/load.gif) center no-repeat #fff;
91-
}
92-
.doughnut-chart-container {
93-
height: 360px;
94-
width: 360px;
95-
float: left;
96-
}
97-
</style>
98-
<style>
99-
.bd-placeholder-img {
100-
font-size: 1.125rem;
101-
text-anchor: middle;
102-
-webkit-user-select: none;
103-
-moz-user-select: none;
104-
user-select: none;
105-
}
106-
107-
@media (min-width: 768px) {
108-
.bd-placeholder-img-lg {
109-
font-size: 3.5rem;
110-
}
111-
}
112-
113-
.b-example-divider {
114-
width: 100%;
115-
height: 3rem;
116-
background-color: rgba(0, 0, 0, .1);
117-
border: solid rgba(0, 0, 0, .15);
118-
border-width: 1px 0;
119-
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
120-
}
121-
122-
.b-example-vr {
123-
flex-shrink: 0;
124-
width: 1.5rem;
125-
height: 100vh;
126-
}
127-
128-
.bi {
129-
/* vertical-align: -.125em; */
130-
fill: currentColor;
131-
}
132-
133-
.nav-scroller {
134-
position: relative;
135-
z-index: 2;
136-
height: 2.75rem;
137-
overflow-y: hidden;
138-
}
139-
140-
.nav-scroller .nav {
141-
display: flex;
142-
flex-wrap: nowrap;
143-
padding-bottom: 1rem;
144-
margin-top: -1px;
145-
overflow-x: auto;
146-
text-align: center;
147-
white-space: nowrap;
148-
-webkit-overflow-scrolling: touch;
149-
}
150-
151-
.btn-bd-primary {
152-
--bd-violet-bg: #712cf9;
153-
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;
154-
155-
--bs-btn-font-weight: 600;
156-
--bs-btn-color: var(--bs-white);
157-
--bs-btn-bg: var(--bd-violet-bg);
158-
--bs-btn-border-color: var(--bd-violet-bg);
159-
--bs-btn-hover-color: var(--bs-white);
160-
--bs-btn-hover-bg: #6528e0;
161-
--bs-btn-hover-border-color: #6528e0;
162-
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
163-
--bs-btn-active-color: var(--bs-btn-hover-color);
164-
--bs-btn-active-bg: #5a23c8;
165-
--bs-btn-active-border-color: #5a23c8;
166-
}
167-
168-
.bd-mode-toggle {
169-
z-index: 1500;
170-
}
171-
172-
.bd-mode-toggle .dropdown-menu .active .bi {
173-
display: block !important;
174-
}
175-
</style>
176-
17755
<?php
17856
if($auth){
17957
$upt=new DateTime(shell_exec('uptime -s'));
@@ -206,7 +84,7 @@
20684

20785
</head>
20886
<body onload="preload()">
209-
<noscript style="z-index: 99999!important; position: absolute; top: 0; width: 98%; padding: 3%;"><div class="alert alert-danger" role="alert">Raspberry Pi Dashboard Web Application <b>requires</b> JavaScript to be enabled in order to work properly - enable it to continue!</div></noscript>
87+
<noscript style="z-index: 99999!important; position: absolute; top: 0; width: 98%; padding: 3%;"><div class="alert alert-danger" role="alert">Raspberry Pi Dashboard as a web application <b>requires</b> JavaScript to be enabled in order to work properly!</div></noscript>
21088

21189
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
21290
<symbol id="check2" viewBox="0 0 16 16">
@@ -623,9 +501,9 @@
623501
</h2>
624502
<div id="collapseOne" class="accordion-collapse collapse show" data-bs-parent="#accordionExample">
625503
<div class="accordion-body">
626-
<h3><span class='text-success'>&#10003;</span> Version 1.1.2</h3>
504+
<h3><span class='text-success'>&#10003;</span> Version 1.1.4</h3>
627505
<ul><li>live page title with hostname + status of monitored RPi</li><li>overhauled project documentation / readme</li><li><a href='https://github.com/femto-code/Rasberry-Pi-Dashboard/releases'>Stay updated here</a></li><li><i><a href="CHANGELOG.md">All changes</a></i></li></ul>
628-
<small>most important changes since RPi Dashboard v1.0.1</small>
506+
<small>most important changes since RPi Dashboard v1.0</small>
629507
</div>
630508
</div>
631509
</div>
@@ -693,7 +571,7 @@
693571
<!-- Footer -->
694572
<footer style="line-height: 40px; margin-top: 10px;" class="border-top py-1">
695573
<div class="container text-center">
696-
RPi Dashboard v1.1.3 <span class="text-muted">(Sept 2023)</span> <span id="dot">&middot;</span> <span id="notf" class="text-success">See the <a href="https://github.com/femto-code/Rasberry-Pi-Dashboard/releases">Github releases</a> for updates!</span><br />
574+
RPi Dashboard v1.1.4 <span class="text-muted">(Oct 2023)</span> <span id="dot">&middot;</span> <span id="notf" class="text-success">See the <a href="https://github.com/femto-code/Rasberry-Pi-Dashboard/releases">Github releases</a> for updates!</span><br />
697575
<button class="btn btn-secondary mb-2" onclick="$('#exampleModal').modal('show');"><i class="bi bi-gear"></i>&nbsp;Options</button>
698576
<hr style="margin-top: 0; margin-bottom: 0;">
699577
femto-code&nbsp;<a href="https://github.com/femto-code"><i class="bi bi-github"></i></a> &middot; <span class="text-muted">2018 - 2023</span>

0 commit comments

Comments
 (0)