relocated javascripts for better performance if disabling sections
This commit is contained in:
parent
4204ac33bd
commit
89c871dfe3
7 changed files with 62 additions and 57 deletions
|
@ -30,4 +30,30 @@ $totalLH = count($lastHeard);
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var lastHeardT = $('#lastHeard').dataTable( {
|
||||||
|
"aaSorting": [[0,'desc']],
|
||||||
|
"ajax": '<?php
|
||||||
|
$protocol = "http";
|
||||||
|
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
|
||||||
|
$protocol = "https";
|
||||||
|
echo $protocol."://";
|
||||||
|
$base_dir = __DIR__;// Absolute path to your installation, ex: /var/www/mywebsite
|
||||||
|
$base_dir = substr($basedir,0,strpos($basedir,"include"));
|
||||||
|
$doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www
|
||||||
|
echo $_SERVER['HTTP_HOST'].preg_replace("!^${doc_root}!", '', $base_dir) ?>/ajax.php?section=lastHeard',
|
||||||
|
"deferRender": true
|
||||||
|
} );
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (!isset($_GET['stoprefresh'])) {
|
||||||
|
?>
|
||||||
|
setInterval( function () {
|
||||||
|
lastHeardT.api().ajax.reload( );
|
||||||
|
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -30,4 +30,30 @@ $totalLH = count($lastHeard);
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var localTxT = $('#localTx').dataTable( {
|
||||||
|
"aaSorting": [[0,'desc']],
|
||||||
|
"ajax": '<?php
|
||||||
|
$protocol = "http";
|
||||||
|
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
|
||||||
|
$protocol = "https";
|
||||||
|
echo $protocol."://";
|
||||||
|
$base_dir = __DIR__; // Absolute path to your installation, ex: /var/www/mywebsite
|
||||||
|
$base_dir = substr($basedir,0,strpos($basedir,"include"));
|
||||||
|
$doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www
|
||||||
|
echo $_SERVER['HTTP_HOST'].preg_replace("!^${doc_root}!", '', $base_dir) ?>/ajax.php?section=localTx',
|
||||||
|
"deferRender": true
|
||||||
|
} );
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (!isset($_GET['stoprefresh'])) {
|
||||||
|
?>
|
||||||
|
setInterval( function () {
|
||||||
|
localTxT.api().ajax.reload( );
|
||||||
|
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -25,7 +25,6 @@ function loadXMLDocSysinfo() {
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
|
|
||||||
var timeout = window.setTimeout("loadXMLDocSysinfo()", 20000);
|
var timeout = window.setTimeout("loadXMLDocSysinfo()", 20000);
|
||||||
refreshMode();
|
|
||||||
}
|
}
|
||||||
loadXMLDocSysinfo();
|
loadXMLDocSysinfo();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -56,3 +56,11 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var ysfGatewaysT = $('#ysfGateways').dataTable( {
|
||||||
|
"aaSorting": [[0,'asc']]
|
||||||
|
} );
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
54
index.php
54
index.php
|
@ -106,60 +106,6 @@ if (!isset($_GET['stoprefresh'])) {
|
||||||
?>
|
?>
|
||||||
| get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
| get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
$(document).ready(function(){
|
|
||||||
|
|
||||||
var lastHeardT = $('#lastHeard').dataTable( {
|
|
||||||
"aaSorting": [[0,'desc']],
|
|
||||||
"ajax": '<?php
|
|
||||||
$protocol = "http";
|
|
||||||
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
|
|
||||||
$protocol = "https";
|
|
||||||
echo $protocol."://";
|
|
||||||
$base_dir = __DIR__; // Absolute path to your installation, ex: /var/www/mywebsite
|
|
||||||
$doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www
|
|
||||||
echo $_SERVER['HTTP_HOST'].preg_replace("!^${doc_root}!", '', $base_dir) ?>/ajax.php?section=lastHeard',
|
|
||||||
"deferRender": true
|
|
||||||
} );
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!isset($_GET['stoprefresh'])) {
|
|
||||||
?>
|
|
||||||
setInterval( function () {
|
|
||||||
lastHeardT.api().ajax.reload( );
|
|
||||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
var localTxT = $('#localTx').dataTable( {
|
|
||||||
"aaSorting": [[0,'desc']],
|
|
||||||
"ajax": '<?php
|
|
||||||
$protocol = "http";
|
|
||||||
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
|
|
||||||
$protocol = "https";
|
|
||||||
echo $protocol."://";
|
|
||||||
$base_dir = __DIR__; // Absolute path to your installation, ex: /var/www/mywebsite
|
|
||||||
$doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www
|
|
||||||
echo $_SERVER['HTTP_HOST'].preg_replace("!^${doc_root}!", '', $base_dir) ?>/ajax.php?section=localTx',
|
|
||||||
"deferRender": true
|
|
||||||
} );
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!isset($_GET['stoprefresh'])) {
|
|
||||||
?>
|
|
||||||
setInterval( function () {
|
|
||||||
localTxT.api().ajax.reload( );
|
|
||||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
var ysfGatewaysT = $('#ysfGateways').dataTable( {
|
|
||||||
"aaSorting": [[0,'asc']]
|
|
||||||
} );
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<noscript>
|
<noscript>
|
||||||
For full functionality of this site it is necessary to enable JavaScript.
|
For full functionality of this site it is necessary to enable JavaScript.
|
||||||
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
|
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
|
||||||
|
|
|
@ -10,7 +10,7 @@ $logLinesMMDVM = getShortMMDVMLog();
|
||||||
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
||||||
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
||||||
$lastHeard = getLastHeard($reverseLogLinesMMDVM, True);
|
$lastHeard = getLastHeard($reverseLogLinesMMDVM, True);
|
||||||
$oldLastHeard = $_SESSION['lastHeard'];
|
//$oldLastHeard = $_SESSION['lastHeard'];
|
||||||
echo"<!--";
|
echo"<!--";
|
||||||
var_dump($lastHeard);
|
var_dump($lastHeard);
|
||||||
echo"-->";
|
echo"-->";
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20161012-2");
|
define("VERSION", "20161012-3");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue