Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PiStatus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
PiStatus
Commits
dfe751cb
Commit
dfe751cb
authored
8 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
deleted unneccessary files
parent
21e26b32
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
reboot.php
+0
-10
0 additions, 10 deletions
reboot.php
status.css
+0
-4
0 additions, 4 deletions
status.css
status.js
+0
-14
0 additions, 14 deletions
status.js
test.php
+0
-137
0 additions, 137 deletions
test.php
with
0 additions
and
165 deletions
reboot.php
deleted
100644 → 0
+
0
−
10
View file @
21e26b32
<?php
session_start
();
if
(
!
isset
(
$_SESSION
[
'loggedIn'
]))
{
header
(
'Location: login.php'
);
exit
;
}
//$uptime = shell_exec('sudo shutdown -r now');
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
status.css
+
0
−
4
View file @
dfe751cb
...
@@ -160,7 +160,3 @@ padding-right: 5vmin;
...
@@ -160,7 +160,3 @@ padding-right: 5vmin;
text-align
:
left
;
text-align
:
left
;
padding-left
:
5vmin
;
padding-left
:
5vmin
;
}
}
#button-reboot
{
background-color
:
#FFD54F
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
status.js
deleted
100644 → 0
+
0
−
14
View file @
21e26b32
$
(
document
).
ready
(
function
()
{
$
(
'
#button-reboot
'
).
click
(
function
()
{
alert
(
"
reboot
"
);
//window.location = "status-api.php";
});
$
(
'
#button-shutdown
'
).
click
(
function
()
{
alert
(
"
shutdown
"
);
//window.location = "status-api.php";
});
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test.php
deleted
100644 → 0
+
0
−
137
View file @
21e26b32
<?php
$json
=
file_get_contents
(
"http://"
.
$_SERVER
[
'SERVER_NAME'
]
.
"/status/status-api.php"
);
$infos
=
json_decode
(
$json
);
$percentageRAMClear
=
substr
(
$infos
->
memPercentageUsed
,
0
,
strlen
(
$infos
->
memPercentageUsed
)
-
2
);
$percentageRAMClear
=
number_format
(
$percentageRAMClear
,
2
,
'.'
,
''
);
$percentageDiskClear
=
substr
(
$infos
->
spacePercentageUsed
,
0
,
strlen
(
$infos
->
spacePercentageUsed
)
-
2
);
$percentageDiskClear
=
number_format
(
$percentageDiskClear
,
2
,
'.'
,
''
);
?>
<!DOCTYPE html>
<html>
<head>
<title>
Pi Status
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"status.css"
>
<link
rel=
"stylesheet"
href=
"font-awesome-4.5.0/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"weather-icons-master/css/weather-icons.min.css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"
></script>
<script
src=
"status.js"
></script>
<style>
#progress1
{
width
:
<?php
echo
$percentageRAMClear
;
?>
%
;
}
#progress2
{
width
:
<?php
echo
$percentageDiskClear
;
?>
%
;
}
</style>
</head>
<body>
<div
id=
"main"
>
<div
id=
"header"
>
Raspberry Pi - Status
</div>
<table
class=
"infos"
id=
"table1"
>
<tr
class=
"headline"
>
<td>
<div
class=
"icon"
>
<i
class=
"fa fa-wifi fa-1x"
></i><span
class=
"icon-text"
>
Uptime
</span>
</div>
</td>
<td
colspan=
"2"
>
<div
class=
"icon"
>
<i
class=
"fa fa-tachometer fa-1x"
></i><span
class=
"icon-text"
>
CPU-Load
</span>
</div>
</td>
<td>
<div
class=
"icon"
>
<i
class=
"wi wi-thermometer"
></i><span
class=
"icon-text"
>
Temperature
</span>
</div>
</td>
</tr>
<tr
class=
"value"
>
<td>
<?php
echo
$infos
->
uptime
;
?>
</td>
<td
colspan=
"2"
>
<?php
echo
$infos
->
cpuLoad
;
?>
</td>
<td>
<?php
echo
$infos
->
temperature
;
?>
</td>
</tr>
</table>
<table
class=
"infos"
>
<tr
class=
"headline"
>
<td
colspan=
"2"
>
<div
class=
"icon"
>
<i
class=
"fa fa-hdd-o fa-1x"
></i><span
class=
"icon-text"
>
RAM
</span>
</div>
</td>
<td
colspan=
"2"
>
<div
class=
"icon"
>
<i
class=
"fa fa-database fa-1x"
></i><span
class=
"icon-text"
>
Disk
</span>
</div>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
<table
class=
"details"
>
<tr
class=
"value"
>
<td>
Total:
</td>
<td
class=
"right"
>
<?php
echo
$infos
->
memTotal
;
?>
</td>
</tr>
<tr>
<td>
Free:
</td>
<td
class=
"right"
>
<?php
echo
$infos
->
memFree
;
?>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
<div
class=
"border"
>
<div
class=
"bar"
>
<div
class=
"percentage"
>
<?php
echo
$infos
->
memPercentageUsed
;
?>
</div>
<div
class=
"progress"
id=
"progress1"
>
</div>
</div>
</div>
</td>
</tr>
</table>
</td>
<td
colspan=
"2"
>
<table
class=
"details"
>
<tr
class=
"value"
>
<td>
Total:
</td>
<td
class=
"right"
>
<?php
echo
$infos
->
totalSpace
;
?>
</td>
</tr>
<tr>
<td>
Free:
</td>
<td
class=
"right"
>
<?php
echo
$infos
->
freeSpace
;
?>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
<div
class=
"border"
>
<div
class=
"bar"
>
<div
class=
"percentage"
>
<?php
echo
$infos
->
spacePercentageUsed
;
?>
</div>
<div
class=
"progress"
id=
"progress2"
>
</div>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table
class=
"infos"
>
<tr
class=
"headline"
>
<td
class=
"align-right"
>
<a
class=
"button save"
id=
"button-reboot"
href=
"javascript:void(null)"
>
<i
class=
"fa fa-refresh"
></i>
<span
class=
"button-text"
>
Reboot
</span>
</a>
</td>
<td
class=
"align-left"
>
<a
class=
"button save"
id=
"button-shutdown"
href=
"javascript:void(null)"
>
<i
class=
"fa fa-power-off"
></i>
<span
class=
"button-text"
>
Shutdown
</span>
</a>
</td>
</tr>
</table>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment