20 sec refresh

pull/14/head
Tom Early 6 years ago
parent 3d90876104
commit 837be10c19

@ -1,19 +1,22 @@
##### DASHBOARD.README ##### ##### DASHBOARD.README #####
A web-based dashboard can be enabled. You can supply your own index.php file, A web-based dashboard can be enabled. You can supply your own index.php file,
or a functional dashboard can be provide. If no index.php file is in the or a functional dashboard is available. If no index.php file is in the build
build directroy when try to install the dashboard, the installation will fail. directroy when try to install the dashboard, the installation will fail. To
To get started, copy the "example.php" file to "index.php". get started, copy the "example.php" file to "index.php":
The example.php file is a good place to start, if you want to create your own cp example.php index.php
The example.php file is a good place to start if you want to create your own
by adding features to your dashboard. This dashboard include a <form> with by adding features to your dashboard. This dashboard include a <form> with
a button to send any URCALL to your gateway. a button to send any URCALL to your gateway.
To install, run the following command after you have created an index.php file: To install the dashboard system, run the following command after you have
created an index.php file:
sudo make installdash sudo make installdash
Note that this will install a php web server and all necessary packaged needed Note that this will install a php web server and all necessary packages needed
for the server. To uninstall, run the following: for the server. To uninstall, run the following:
sudo make uninstalldash sudo make uninstalldash
@ -32,3 +35,6 @@ address or at http://<hostname>.local/ (on the same subnet).
Please note that this is a very simple server and is not recommended for the Please note that this is a very simple server and is not recommended for the
world wide web. If you want a robust dashboard accessible from the web, you world wide web. If you want a robust dashboard accessible from the web, you
will want to use a robust server, like apache, and a different index.php file. will want to use a robust server, like apache, and a different index.php file.
Please note that if you are tryping in a URCALL when the webpage is refreshing,
the entry field will loose focus and you'll have to try again.

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>QnetGateway Dashboard</title> <title>QnetGateway Dashboard</title>
<meta http-equiv="refresh" content="15"> <meta http-equiv="refresh" content="20">
</head> </head>
<body> <body>
<?php <?php
@ -62,7 +62,7 @@
<h2>QnetGateway <?php echo $cfg['ircddb_login']; ?> Dashboard</h2> <h2>QnetGateway <?php echo $cfg['ircddb_login']; ?> Dashboard</h2>
<?php <?php
if (`ps -aux | grep -e qn -e MMDVMHost | wc -l` > 2) { if (`ps -aux | grep -e qn -e MMDVMHost | wc -l` > 2) {
echo 'Process:<br><code>', "\n"; echo 'Processes:<br><code>', "\n";
echo str_replace(' ', '&nbsp;', 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND<br>'), "\n"; echo str_replace(' ', '&nbsp;', 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND<br>'), "\n";
$lines = explode("\n", `ps -aux | grep -e qngateway -e qnlink -e qndtmf -e qndvap -e qnitap -e qnrelay -e qndvrptr -e qnmodem -e MMDVMHost | grep -v grep`); $lines = explode("\n", `ps -aux | grep -e qngateway -e qnlink -e qndtmf -e qndvap -e qnitap -e qnrelay -e qndvrptr -e qnmodem -e MMDVMHost | grep -v grep`);
foreach ($lines as $line) { foreach ($lines as $line) {

Loading…
Cancel
Save

Powered by TurnKey Linux.