|
|
|
@ -123,7 +123,12 @@ ParseKVFile($cfgdir.'/defaults', $defaults);
|
|
|
|
<h2>QnetGateway <?php echo GetCFGValue('ircddb_login'); ?> Dashboard</h2>
|
|
|
|
<h2>QnetGateway <?php echo GetCFGValue('ircddb_login'); ?> Dashboard</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
if ('true' == GetCFGValue('dash_show_ps') && `ps -aux | grep -e qn -e MMDVMHost | wc -l` > 2) {
|
|
|
|
$showorder = GetCFGValue('dash_show_order');
|
|
|
|
|
|
|
|
$showlist = explode(',', trim($showorder));
|
|
|
|
|
|
|
|
foreach($showlist as $section) {
|
|
|
|
|
|
|
|
switch ($section) {
|
|
|
|
|
|
|
|
case 'PS':
|
|
|
|
|
|
|
|
if (`ps -aux | grep -e qn -e MMDVMHost | wc -l` > 2) {
|
|
|
|
echo 'Processes:<br><code>', "\n";
|
|
|
|
echo 'Processes:<br><code>', "\n";
|
|
|
|
echo str_replace(' ', ' ', 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND<br>'), "\n";
|
|
|
|
echo str_replace(' ', ' ', '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`);
|
|
|
|
@ -132,8 +137,8 @@ if ('true' == GetCFGValue('dash_show_ps') && `ps -aux | grep -e qn -e MMDVMHost
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</code>', "\n";
|
|
|
|
echo '</code>', "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
if ('true' == GetCFGValue('dash_show_sy')) {
|
|
|
|
case 'SY':
|
|
|
|
echo 'System Info:<br>', "\n";
|
|
|
|
echo 'System Info:<br>', "\n";
|
|
|
|
$hn = trim(`uname -n`);
|
|
|
|
$hn = trim(`uname -n`);
|
|
|
|
$kn = trim(`uname -rmo`);
|
|
|
|
$kn = trim(`uname -rmo`);
|
|
|
|
@ -152,9 +157,8 @@ if ('true' == GetCFGValue('dash_show_sy')) {
|
|
|
|
echo '<table cellpadding="1" border="1" style="font-family: monospace">', "\n";
|
|
|
|
echo '<table cellpadding="1" border="1" style="font-family: monospace">', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">Hostname</td><td style="text-align:center">Kernel</td><td style="text-align:center">OS</td><td style="text-align:center">CPU</td></tr>', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">Hostname</td><td style="text-align:center">Kernel</td><td style="text-align:center">OS</td><td style="text-align:center">CPU</td></tr>', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">', $hn, '</td><td style="text-align:center">', $kn, '</td><td style="text-align:center">', $os, '</td><td style="text-align:center">', $cu, '</td></tr></table><br>', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">', $hn, '</td><td style="text-align:center">', $kn, '</td><td style="text-align:center">', $os, '</td><td style="text-align:center">', $cu, '</td></tr></table><br>', "\n";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'LH':
|
|
|
|
if ('true' == GetCFGValue('dash_show_lh')) {
|
|
|
|
|
|
|
|
echo 'Last Heard:<br><code>', "\n";
|
|
|
|
echo 'Last Heard:<br><code>', "\n";
|
|
|
|
$rstr = 'MyCall/Sfx Source Last Time<br>';
|
|
|
|
$rstr = 'MyCall/Sfx Source Last Time<br>';
|
|
|
|
echo str_replace(' ', ' ', $rstr), "\n";
|
|
|
|
echo str_replace(' ', ' ', $rstr), "\n";
|
|
|
|
@ -174,20 +178,18 @@ if ('true' == GetCFGValue('dash_show_lh')) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$db->Close();
|
|
|
|
$db->Close();
|
|
|
|
echo '</code><br>', "\n";
|
|
|
|
echo '</code><br>', "\n";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'IP':
|
|
|
|
if ('true' == GetCFGValue('dash_show_ip')) {
|
|
|
|
|
|
|
|
echo 'IP Addresses:<br>', "\n";
|
|
|
|
echo 'IP Addresses:<br>', "\n";
|
|
|
|
echo '<table cellpadding="1" border="1" style="font-family: monospace">', "\n";
|
|
|
|
echo '<table cellpadding="1" border="1" style="font-family: monospace">', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">Internal</td><td style="text-align:center">IPV4</td><td style="text-align:center">IPV6</td></tr>', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">Internal</td><td style="text-align:center">IPV4</td><td style="text-align:center">IPV6</td></tr>', "\n";
|
|
|
|
echo '<tr><td>', GetIP('internal'), '</td><td>', GetIP('ipv4'), '</td><td>', GetIP('ipv6'), '</td></tr>', "\n";
|
|
|
|
echo '<tr><td>', GetIP('internal'), '</td><td>', GetIP('ipv4'), '</td><td>', GetIP('ipv6'), '</td></tr>', "\n";
|
|
|
|
echo '</table><br>', "\n";
|
|
|
|
echo '</table><br>', "\n";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'MO':
|
|
|
|
if ('true' == GetCFGValue('dash_show_mo')) {
|
|
|
|
|
|
|
|
echo 'Modules:<br>', "\n";
|
|
|
|
echo 'Modules:<br>', "\n";
|
|
|
|
echo "<table cellpadding='1' border='1' style='font-family: monospace'>\n";
|
|
|
|
echo "<table cellpadding='1' border='1' style='font-family: monospace'>\n";
|
|
|
|
echo '<tr><td style="text-align:center">Module</td><td style="text-align:center">Modem</td><td style="text-align:center">Frequency</td><td style="text-align:center">Repeater</td><td style="text-align:center">Repeater IP</td></tr>', "\n";
|
|
|
|
echo '<tr><td style="text-align:center">Module</td><td style="text-align:center">Modem</td><td style="text-align:center">Frequency</td><td style="text-align:center">Link</td><td style="text-align:center">Link IP</td></tr>', "\n";
|
|
|
|
foreach (array('a', 'b', 'c') as $mod) {
|
|
|
|
foreach (array('a', 'b', 'c') as $mod) {
|
|
|
|
$module = 'module_'.$mod;
|
|
|
|
$module = 'module_'.$mod;
|
|
|
|
if (array_key_exists($module, $cfg)) {
|
|
|
|
if (array_key_exists($module, $cfg)) {
|
|
|
|
@ -206,9 +208,8 @@ if ('true' == GetCFGValue('dash_show_mo')) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo '</table><br>', "\n";
|
|
|
|
echo '</table><br>', "\n";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'UR':
|
|
|
|
if ('true' == GetCFGValue('dash_show_ur')) {
|
|
|
|
|
|
|
|
echo 'Send URCall:<br>', "\n";
|
|
|
|
echo 'Send URCall:<br>', "\n";
|
|
|
|
echo '<form method="post">', "\n";
|
|
|
|
echo '<form method="post">', "\n";
|
|
|
|
if (count($configured) > 1) {
|
|
|
|
if (count($configured) > 1) {
|
|
|
|
@ -238,6 +239,11 @@ if ('true' == GetCFGValue('dash_show_ur')) {
|
|
|
|
echo $command, "<br>\n";
|
|
|
|
echo $command, "<br>\n";
|
|
|
|
$unused = `$command`;
|
|
|
|
$unused = `$command`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
echo 'Section "', $section, '" was not found!<br>', "\n";
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
|