Skip to content

Commit

Permalink
Merge pull request #62 from femto-code/master
Browse files Browse the repository at this point in the history
Update v1.1.4 (with critical fix)
  • Loading branch information
femto-code authored Oct 13, 2023
2 parents 06a2d87 + 7df2121 commit 9f44fee
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 136 deletions.
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
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)!
[https://github.com/femto-code/Rasberry-Pi-Dashboard](https://github.com/femto-code/Rasberry-Pi-Dashboard)

## [1.2.0] - 2022-XX-XX

## Added
- GPIO live status

## Changed
- improved error handling of network requests
## [1.1.4] - 2023-10-13
- fix stats not showing up on systems with PHP version 8.1+ (#61)

## [1.1.3] - 2023-09-17
- updated dependencies
Expand Down
8 changes: 5 additions & 3 deletions backend/sys_infos.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
error_reporting(E_ALL);
ini_set ('display_errors', 'On');
if(isset($_GET["debug"])){
error_reporting(E_ALL);
ini_set ('display_errors', 'On');
}
// Authorization
session_start();
if(!isset($_SESSION["rpidbauth"])){
Expand All @@ -14,7 +16,7 @@
// Uptime
$uptime = shell_exec("cat /proc/uptime");
$uptime = explode(" ", $uptime);
$uptime = $uptime[0];
$uptime = (int) $uptime[0];
$y = floor($uptime / 60 / 60 / 24 / 365);
$d = floor($uptime / 60 / 60 / 24) % 365;
$h = floor(($uptime / 3600) % 24);
Expand Down
131 changes: 131 additions & 0 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/* rubik-300 - latin */
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: 300;
src: url('fonts/rubik-v12-latin-300.eot');
/* IE9 Compat Modes */
src: local(''),
url('fonts/rubik-v12-latin-300.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('fonts/rubik-v12-latin-300.woff2') format('woff2'),
/* Super Modern Browsers */
url('fonts/rubik-v12-latin-300.woff') format('woff'),
/* Modern Browsers */
url('fonts/rubik-v12-latin-300.ttf') format('truetype'),
/* Safari, Android, iOS */
url('fonts/rubik-v12-latin-300.svg#Rubik') format('svg');
/* Legacy iOS */
}

body,
.mdtoast {
font-family: 'Rubik', sans-serif;
}

.hidden {
display: none;
}

@media screen and (max-width: 530px) {
#notf {
display: block;
}

#dot {
display: none;
}
}

.preload-screen {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(img/load.gif) center no-repeat #fff;
}

.doughnut-chart-container {
height: 360px;
width: 360px;
float: left;
}

.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}

@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}

.b-example-divider {
width: 100%;
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.b-example-vr {
flex-shrink: 0;
width: 1.5rem;
height: 100vh;
}

.bi {
/* vertical-align: -.125em; */
fill: currentColor;
}

.nav-scroller {
position: relative;
z-index: 2;
height: 2.75rem;
overflow-y: hidden;
}

.nav-scroller .nav {
display: flex;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;
overflow-x: auto;
text-align: center;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}

.btn-bd-primary {
--bd-violet-bg: #712cf9;
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;

--bs-btn-font-weight: 600;
--bs-btn-color: var(--bs-white);
--bs-btn-bg: var(--bd-violet-bg);
--bs-btn-border-color: var(--bd-violet-bg);
--bs-btn-hover-color: var(--bs-white);
--bs-btn-hover-bg: #6528e0;
--bs-btn-hover-border-color: #6528e0;
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
--bs-btn-active-color: var(--bs-btn-hover-color);
--bs-btn-active-bg: #5a23c8;
--bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
z-index: 1500;
}

.bd-mode-toggle .dropdown-menu .active .bi {
display: block !important;
}
130 changes: 4 additions & 126 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,128 +52,6 @@

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

<style>
/* rubik-300 - latin */
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: 300;
src: url('fonts/rubik-v12-latin-300.eot'); /* IE9 Compat Modes */
src: local(''),
url('fonts/rubik-v12-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/rubik-v12-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
url('fonts/rubik-v12-latin-300.woff') format('woff'), /* Modern Browsers */
url('fonts/rubik-v12-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/rubik-v12-latin-300.svg#Rubik') format('svg'); /* Legacy iOS */
}
body, .mdtoast{
font-family: 'Rubik', sans-serif;
}
.hidden{
display: none;
}
@media screen and (max-width: 530px) {
#notf {
display: block;
}
#dot{
display:none;
}
}
.preload-screen {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url(img/load.gif) center no-repeat #fff;
}
.doughnut-chart-container {
height: 360px;
width: 360px;
float: left;
}
</style>
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}

@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}

.b-example-divider {
width: 100%;
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.b-example-vr {
flex-shrink: 0;
width: 1.5rem;
height: 100vh;
}

.bi {
/* vertical-align: -.125em; */
fill: currentColor;
}

.nav-scroller {
position: relative;
z-index: 2;
height: 2.75rem;
overflow-y: hidden;
}

.nav-scroller .nav {
display: flex;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;
overflow-x: auto;
text-align: center;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}

.btn-bd-primary {
--bd-violet-bg: #712cf9;
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;

--bs-btn-font-weight: 600;
--bs-btn-color: var(--bs-white);
--bs-btn-bg: var(--bd-violet-bg);
--bs-btn-border-color: var(--bd-violet-bg);
--bs-btn-hover-color: var(--bs-white);
--bs-btn-hover-bg: #6528e0;
--bs-btn-hover-border-color: #6528e0;
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
--bs-btn-active-color: var(--bs-btn-hover-color);
--bs-btn-active-bg: #5a23c8;
--bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
z-index: 1500;
}

.bd-mode-toggle .dropdown-menu .active .bi {
display: block !important;
}
</style>

<?php
if($auth){
$upt=new DateTime(shell_exec('uptime -s'));
Expand Down Expand Up @@ -206,7 +84,7 @@

</head>
<body onload="preload()">
<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>
<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>

<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
<symbol id="check2" viewBox="0 0 16 16">
Expand Down Expand Up @@ -623,9 +501,9 @@
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" data-bs-parent="#accordionExample">
<div class="accordion-body">
<h3><span class='text-success'>&#10003;</span> Version 1.1.2</h3>
<h3><span class='text-success'>&#10003;</span> Version 1.1.4</h3>
<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>
<small>most important changes since RPi Dashboard v1.0.1</small>
<small>most important changes since RPi Dashboard v1.0</small>
</div>
</div>
</div>
Expand Down Expand Up @@ -693,7 +571,7 @@
<!-- Footer -->
<footer style="line-height: 40px; margin-top: 10px;" class="border-top py-1">
<div class="container text-center">
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 />
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 />
<button class="btn btn-secondary mb-2" onclick="$('#exampleModal').modal('show');"><i class="bi bi-gear"></i>&nbsp;Options</button>
<hr style="margin-top: 0; margin-bottom: 0;">
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>
Expand Down

0 comments on commit 9f44fee

Please sign in to comment.