|
|
@ -19,19 +19,18 @@ function DisplayVnstat(&$extraFooterScripts)
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="panel-body">
|
|
|
|
<ul id="tabbarBandwidth" class="nav nav-tabs" role="tablist">
|
|
|
|
<ul id="tabbarBandwidth" class="nav nav-tabs" role="tablist">
|
|
|
|
<li role="presentation" class="active"><a href="#daily" aria-controls="daily" role="tab" data-toggle="tab"><?php echo _("Daily"); ?></a></li>
|
|
|
|
<li role="presentation" class="active"><a href="#daily" aria-controls="daily" role="tab" data-toggle="tab"><?php echo _("Daily"); ?></a></li>
|
|
|
|
<?php /* <li role="presentation" class=""><a href="#hours" aria-controls="hours" role="tab" data-toggle="tab">php echo _("Hourly"); ?</a></li> */ ?>
|
|
|
|
|
|
|
|
<li role="presentation" class=""><a href="#monthly" aria-controls="monthly" role="tab" data-toggle="tab"><?php echo _("Monthly"); ?></a></li>
|
|
|
|
<li role="presentation" class=""><a href="#monthly" aria-controls="monthly" role="tab" data-toggle="tab"><?php echo _("Monthly"); ?></a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
<div id="tabsBandwidth" class="tabcontenttraffic tab-content">
|
|
|
|
<div id="tabsBandwidth" class="tabcontenttraffic tab-content">
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="daily">
|
|
|
|
<div role="tabpanel" class="tab-pane active fade in" id="daily">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<h4><?php echo _('Daily traffic amount'); ?></h4>
|
|
|
|
<h4><?php echo _('Daily traffic amount'); ?></h4>
|
|
|
|
<label for="cbxInterfacedaily"><?php echo _('interface'); ?></label> <select id="cbxInterfacedaily" class="form-control" name="interface">
|
|
|
|
<label for="cbxInterfacedaily"><?php echo _('interface'); ?></label> <select id="cbxInterfacedaily" class="form-control" name="interface">
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
exec("ip -o link show | awk -F ': ' '{print $2}' | grep -v lo ", $interfacesWlo);
|
|
|
|
exec("ip -o link show | awk -F ': ' '{print $2}' | grep -v lo ", $interfacesWlo);
|
|
|
|
foreach ($interfacesWlo as $interface) {
|
|
|
|
foreach ($interfacesWlo as $interface) {
|
|
|
|
echo ' <option value="' , htmlentities($interface. ENT_QUOTES) , '">' ,
|
|
|
|
echo ' <option value="' , htmlentities($interface, ENT_QUOTES) , '">' ,
|
|
|
|
htmlentities($interface, ENT_QUOTES) , '</option>' , PHP_EOL;
|
|
|
|
htmlentities($interface, ENT_QUOTES) , '</option>' , PHP_EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -40,60 +39,36 @@ foreach ($interfacesWlo as $interface) {
|
|
|
|
<div class="hidden alert alert-info" id="divLoaderBandwidthdaily">
|
|
|
|
<div class="hidden alert alert-info" id="divLoaderBandwidthdaily">
|
|
|
|
<?php echo sprintf(_("Loading %s bandwidth chart"), _('daily')); ?>
|
|
|
|
<?php echo sprintf(_("Loading %s bandwidth chart"), _('daily')); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="divBandwidthdaily"></div><br />
|
|
|
|
<div id="divChartBandwidthdaily"></div>
|
|
|
|
<br />
|
|
|
|
<div id="divTableBandwidthdaily"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.tab-pane -->
|
|
|
|
<?php
|
|
|
|
<div role="tabpanel" class="tab-pane fade" id="monthly">
|
|
|
|
/*
|
|
|
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="hourly">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<h4>php echo _("Hourly traffic amount today"); ?</h4>
|
|
|
|
<h4><?php echo _("Monthly traffic amount"); ?></h4>
|
|
|
|
<label for="cbxInterfacehours"><?php echo _('interface'); ?></label> <select id="cbxInterfacehours" class="form-control" name="interface">
|
|
|
|
<label for="cbxInterfacemonthly"><?php echo _('interface'); ?></label> <select id="cbxInterfacemonthly" class="form-control" name="interface">
|
|
|
|
php
|
|
|
|
|
|
|
|
foreach ($interfacesWlo as $interface) {
|
|
|
|
|
|
|
|
echo ' <option value="' , htmlentities($interface. ENT_QUOTES) , '">' ,
|
|
|
|
|
|
|
|
htmlentities($interface, ENT_QUOTES) , '</option>' , PHP_EOL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<div class="hidden alert alert-info" id="divLoaderBandwidthhourly">
|
|
|
|
|
|
|
|
<hp echo sprintf(_("Loading %s bandwidth chart"), _('hourly')); ?
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="divBandwidthhours"></div><br />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div role="tabpanel" class="tab-pane" id="monthly">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-lg-6">
|
|
|
|
|
|
|
|
<h4><?php echo _("Monthly traffic amount"); ?></h4>
|
|
|
|
|
|
|
|
<label for="cbxInterfacemonthly"><?php echo _('interface'); ?></label> <select id="cbxInterfacemonthly" class="form-control" name="interface">
|
|
|
|
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
foreach ($interfacesWlo as $interface) {
|
|
|
|
foreach ($interfacesWlo as $interface) {
|
|
|
|
echo ' <option value="' , htmlentities($interface. ENT_QUOTES) , '">' ,
|
|
|
|
echo ' <option value="' , htmlentities($interface, ENT_QUOTES) , '">' ,
|
|
|
|
htmlentities($interface, ENT_QUOTES) , '</option>' , PHP_EOL;
|
|
|
|
htmlentities($interface, ENT_QUOTES) , '</option>' , PHP_EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<div class="hidden alert alert-info" id="divLoaderBandwidthmonthly">
|
|
|
|
<div class="hidden alert alert-info" id="divLoaderBandwidthmonthly">
|
|
|
|
<?php echo sprintf(_("Loading %s bandwidth chart"), _('monthly')); ?>
|
|
|
|
<?php echo sprintf(_("Loading %s bandwidth chart"), _('monthly')); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="divBandwidthmonthly"></div><br />
|
|
|
|
<div id="divChartBandwidthmonthly"></div>
|
|
|
|
<br />
|
|
|
|
<div id="divTableBandwidthmonthly"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.tab-pane -->
|
|
|
|
</div>
|
|
|
|
</div><!-- /.tabsBandwidth -->
|
|
|
|
</div><!-- /.tabcontenttraffic -->
|
|
|
|
</div><!-- /.panel-default -->
|
|
|
|
</div><!-- /.panel-default -->
|
|
|
|
</div><!-- /.col-md-6 -->
|
|
|
|
</div><!-- /.col-md-6 -->
|
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.row -->
|
|
|
|
|
|
|
|
</div><!-- /.panel-body -->
|
|
|
|
</div><!-- /.panel-body -->
|
|
|
|
</div><!-- /.panel-primary -->
|
|
|
|
</div><!-- /.panel-primary -->
|
|
|
|
<div class="panel-footer"><?php echo _("Information provided by vnstat"); ?></div>
|
|
|
|
<div class="panel-footer"><?php echo _("Information provided by vnstat"); ?></div>
|
|
|
|