raspap-webgui-mirror/templates/data_usage.php

82 lines
4.6 KiB
PHP
Raw Normal View History

2019-08-18 23:21:23 +00:00
<div class="row">
<div class="col-lg-12">
2019-10-12 22:04:27 +00:00
<div class="card">
2019-10-14 20:21:56 +00:00
<div class="card-header"><i class="fas fa-chart-bar mr-2"></i><?php echo _("Data usage monitoring"); ?></div>
2019-10-12 22:04:27 +00:00
<div class="card-body">
2019-08-18 23:21:23 +00:00
<ul id="tabbarBandwidth" class="nav nav-tabs" role="tablist">
2019-10-14 20:21:56 +00:00
<li class="nav-item"><a class="nav-link active" href="#hourly" aria-controls="hourly" role="tab" data-toggle="tab"><?php echo _("Hourly"); ?></a></li>
2019-10-12 22:04:27 +00:00
<li class="nav-item"><a class="nav-link" href="#daily" aria-controls="daily" role="tab" data-toggle="tab"><?php echo _("Daily"); ?></a></li>
<li class="nav-item"><a class="nav-link" href="#monthly" aria-controls="monthly" role="tab" data-toggle="tab"><?php echo _("Monthly"); ?></a></li>
2019-08-18 23:21:23 +00:00
</ul>
<div id="tabsBandwidth" class="tabcontenttraffic tab-content">
2019-10-12 22:04:27 +00:00
<div role="tabpanel" class="tab-pane active" id="hourly">
2019-08-18 23:21:23 +00:00
<div class="row">
<div class="col-lg-12">
2019-10-14 20:21:56 +00:00
<h4 class="mt-3"><?php echo _('Hourly traffic amount'); ?></h4>
2019-08-18 23:57:26 +00:00
<label for="cbxInterfacehourly"><?php echo _('interface'); ?></label>
2019-08-18 23:21:23 +00:00
<select id="cbxInterfacehourly" class="form-control" name="interfacehourly">
<?php foreach ($interfaces as $if) : ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
2019-08-18 23:57:26 +00:00
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
2019-08-18 23:21:23 +00:00
<?php endforeach ?>
</select>
<div class="hidden alert alert-info" id="divLoaderBandwidthhourly">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('hourly')); ?>
2019-08-18 23:21:23 +00:00
</div>
2019-10-19 21:13:50 +00:00
<canvas id="divChartBandwidthhourly"></canvas>
2019-08-18 23:21:23 +00:00
<div id="divTableBandwidthhourly"></div>
</div>
</div>
</div><!-- /.tab-pane -->
<div role="tabpanel" class="tab-pane fade" id="daily">
<div class="row">
<div class="col-lg-12">
2019-10-14 20:21:56 +00:00
<h4 class="mt-3"><?php echo _('Daily traffic amount'); ?></h4>
2019-08-18 23:57:26 +00:00
<label for="cbxInterfacedaily"><?php echo _('interface'); ?></label>
2019-08-18 23:21:23 +00:00
<select id="cbxInterfacedaily" class="form-control" name="interfacedaily">
<?php foreach ($interfaces as $if) : ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
2019-08-18 23:57:26 +00:00
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
2019-08-18 23:21:23 +00:00
<?php endforeach ?>
</select>
<div class="hidden alert alert-info" id="divLoaderBandwidthdaily">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('daily')); ?>
2019-08-18 23:21:23 +00:00
</div>
2019-10-19 21:13:50 +00:00
<canvas id="divChartBandwidthdaily"></canvas>
2019-08-18 23:21:23 +00:00
<div id="divTableBandwidthdaily"></div>
</div>
</div>
</div><!-- /.tab-pane -->
<div role="tabpanel" class="tab-pane fade" id="monthly">
<div class="row">
<div class="col-lg-12">
2019-10-14 20:21:56 +00:00
<h4 class="mt-3"><?php echo _("Monthly traffic amount"); ?></h4>
2019-08-18 23:57:26 +00:00
<label for="cbxInterfacemonthly"><?php echo _('interface'); ?></label>
2019-08-18 23:21:23 +00:00
<select id="cbxInterfacemonthly" class="form-control" name="interfacemonthly">
<?php foreach ($interfaces as $if) : ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
2019-08-18 23:57:26 +00:00
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
2019-08-18 23:21:23 +00:00
<?php endforeach ?>
</select>
<div class="hidden alert alert-info" id="divLoaderBandwidthmonthly">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('monthly')); ?>
2019-08-18 23:21:23 +00:00
</div>
2019-10-19 21:13:50 +00:00
<canvas id="divChartBandwidthmonthly"></canvas>
2019-08-18 23:21:23 +00:00
<div id="divTableBandwidthmonthly"></div>
</div>
</div>
</div><!-- /.tab-pane -->
</div><!-- /.tabsBandwidth -->
2019-10-12 22:04:27 +00:00
</div><!-- /.card-body -->
<div class="card-footer"><?php echo _("Information provided by vnstat"); ?></div>
2019-10-12 22:04:27 +00:00
</div><!-- /.card -->
2019-08-18 23:21:23 +00:00
</div><!-- /.col-lg-12 -->
</div><!-- /.row -->
<script type="text/javascript"<?php //echo ' nonce="'.$csp_page_nonce.'"'; ?>>
// js translations:
var t = new Array();
t['send'] = '<?php echo addslashes(_('Send')); ?>';
t['receive'] = '<?php echo addslashes(_('Receive')); ?>';
</script>