1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Standardize card-headers

This commit is contained in:
billz 2019-11-01 09:08:49 +00:00
parent 23c60010b3
commit 929fbd2572
9 changed files with 303 additions and 267 deletions

View File

@ -1,7 +1,13 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-info-circle mr-2"></i><?php echo _("About RaspAP"); ?></div> <div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-info-circle mr-2"></i><?php echo _("About RaspAP"); ?>
</div>
</div><!-- ./row -->
</div><!-- ./card-header -->
<div class="card-body text-center"> <div class="card-body text-center">
<h3><?php echo _("RaspAP") . " v" . RASPI_VERSION; ?></h3> <h3><?php echo _("RaspAP") . " v" . RASPI_VERSION; ?></h3>
<h5><a href="https://github.com/billz/raspap-webgui/blob/master/LICENSE">GNU General Public License v3.0</a></h5> <h5><a href="https://github.com/billz/raspap-webgui/blob/master/LICENSE">GNU General Public License v3.0</a></h5>
@ -9,7 +15,6 @@
<p>RaspAP is a co-creation of <a href="https://github.com/billz">@billz</a> and <a href="https://github.com/sirlagz">@SirLagz</a><br /> <p>RaspAP is a co-creation of <a href="https://github.com/billz">@billz</a> and <a href="https://github.com/sirlagz">@SirLagz</a><br />
with the contributions of our <a href="https://github.com/billz/raspap-webgui/graphs/contributors">community</a>.</p> with the contributions of our <a href="https://github.com/billz/raspap-webgui/graphs/contributors">community</a>.</p>
<p><i class="fab fa-github"></i> <a href="https://github.com/billz/raspap-webgui">https://github.com/billz/raspap-webgui</a></p> <p><i class="fab fa-github"></i> <a href="https://github.com/billz/raspap-webgui">https://github.com/billz/raspap-webgui</a></p>
</div><!-- /.card-body --> </div><!-- /.card-body -->
<div class="card-footer"></div> <div class="card-footer"></div>
</div><!-- /.card --> </div><!-- /.card -->

View File

@ -1,7 +1,13 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-user-lock mr-2"></i><?php echo _("Configure Auth"); ?></div> <div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-user-lock mr-2"></i><?php echo _("Configure Auth"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<?php $status->showMessages(); ?> <?php $status->showMessages(); ?>
<h4><?php echo _("Authentication settings") ;?></h4> <h4><?php echo _("Authentication settings") ;?></h4>

View File

@ -1,8 +1,13 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-wifi mr-2"></i><?php echo _("Configure WiFi client"); ?></div> <div class="card-header">
<!-- /.card-header --> <div class="row">
<div class="col">
<i class="fas fa-wifi mr-2"></i><?php echo _("Configure WiFi client"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<?php $status->showMessages(); ?> <?php $status->showMessages(); ?>
<div class="row"> <div class="row">
@ -16,7 +21,7 @@
<form method="POST" action="?page=wpa_conf" name="wpa_conf_form" class="row"> <form method="POST" action="?page=wpa_conf" name="wpa_conf_form" class="row">
<?php echo CSRFTokenFieldTag() ?> <?php echo CSRFTokenFieldTag() ?>
<input type="hidden" name="client_settings" ?> <input type="hidden" name="client_settings" ?>
<div class="js-wifi-stations loading-spinner w-100"></div> <div class="js-wifi-stations loading-spinner"></div>
</form> </form>
</div><!-- ./ card-body --> </div><!-- ./ card-body -->
<div class="card-footer"><?php echo _("<strong>Note:</strong> WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP"); ?></div> <div class="card-footer"><?php echo _("<strong>Note:</strong> WEP access points appear as 'Open'. RaspAP does not currently support connecting to WEP"); ?></div>

View File

@ -6,8 +6,7 @@ if ($arrHostapdConf['WifiAPEnable'] == 1) {
$client_iface = RASPI_WIFI_CLIENT_INTERFACE; $client_iface = RASPI_WIFI_CLIENT_INTERFACE;
} }
exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep -oE "(([0-9]|[a-f]|[A-F]){2}:){5}([0-9]|[a-f]|[A-F]){2}" | tr "\n" "\|" | sed "s/.$//")', $clients); exec('cat '.RASPI_DNSMASQ_LEASES.'| grep -E $(arp -i '.$client_iface.' -n | grep -oE "(([0-9]|[a-f]|[A-F]){2}:){5}([0-9]|[a-f]|[A-F]){2}" | tr "\n" "\|" | sed "s/.$//")', $clients);
$ifaceStatus = $wlan0up ? "running" : "stopped"; $ifaceStatus = $wlan0up ? "up" : "down";
$ifaceLabel = $wlan0up ? "up" : "down";
?> ?>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -20,7 +19,7 @@ $ifaceLabel = $wlan0up ? "up" : "down";
<div class="col"> <div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-right"> <button class="btn btn-light btn-icon-split btn-sm service-status float-right">
<span class="icon"><i class="fas fa-circle service-status-<?php echo $ifaceStatus ?>"></i></span> <span class="icon"><i class="fas fa-circle service-status-<?php echo $ifaceStatus ?>"></i></span>
<span class="text service-status"><?php echo strtolower($client_iface) .' '. _($ifaceLabel) ?></span> <span class="text service-status"><?php echo strtolower($client_iface) .' '. _($ifaceStatus) ?></span>
</button> </button>
</div> </div>
</div><!-- /.row --> </div><!-- /.row -->
@ -40,7 +39,7 @@ $ifaceLabel = $wlan0up ? "up" : "down";
<div class="info-item"><?php echo _("Link Quality"); ?></div> <div class="info-item"><?php echo _("Link Quality"); ?></div>
<script>var linkQ = <?php echo json_encode($strLinkQuality); ?>;</script> <script>var linkQ = <?php echo json_encode($strLinkQuality); ?>;</script>
<div class="chart-pie pt-5"> <div class="chart-pie pt-5">
<canvas id="canvas" xwidth="662" xheight="430" class="chartjs-render-monitor"></canvas> <canvas id="canvas" class="chartjs-render-monitor"></canvas>
</div> </div>
</div><!-- /.card-body --> </div><!-- /.card-body -->
</div><!-- /.card --> </div><!-- /.card -->

View File

@ -1,75 +1,80 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-chart-bar mr-2"></i><?php echo _("Data usage monitoring"); ?></div> <div class="card-header">
<div class="card-body"> <div class="row">
<ul id="tabbarBandwidth" class="nav nav-tabs" role="tablist"> <div class="col">
<li class="nav-item"><a class="nav-link active" href="#hourly" aria-controls="hourly" role="tab" data-toggle="tab"><?php echo _("Hourly"); ?></a></li> <i class="fas fa-chart-bar mr-2"></i><?php echo _("Data usage monitoring"); ?>
<li class="nav-item"><a class="nav-link" href="#daily" aria-controls="daily" role="tab" data-toggle="tab"><?php echo _("Daily"); ?></a></li> </div>
<li class="nav-item"><a class="nav-link" href="#monthly" aria-controls="monthly" role="tab" data-toggle="tab"><?php echo _("Monthly"); ?></a></li> </div><!-- /.row -->
</ul> </div><!-- /.card-header -->
<div id="tabsBandwidth" class="tabcontenttraffic tab-content"> <div class="card-body">
<div role="tabpanel" class="tab-pane active" id="hourly"> <ul id="tabbarBandwidth" class="nav nav-tabs" role="tablist">
<div class="row"> <li class="nav-item"><a class="nav-link active" href="#hourly" aria-controls="hourly" role="tab" data-toggle="tab"><?php echo _("Hourly"); ?></a></li>
<div class="col-lg-12"> <li class="nav-item"><a class="nav-link" href="#daily" aria-controls="daily" role="tab" data-toggle="tab"><?php echo _("Daily"); ?></a></li>
<h4 class="mt-3"><?php echo _('Hourly traffic amount'); ?></h4> <li class="nav-item"><a class="nav-link" href="#monthly" aria-controls="monthly" role="tab" data-toggle="tab"><?php echo _("Monthly"); ?></a></li>
<label for="cbxInterfacehourly"><?php echo _('interface'); ?></label> </ul>
<select id="cbxInterfacehourly" class="form-control" name="interfacehourly"> <div id="tabsBandwidth" class="tabcontenttraffic tab-content">
<?php foreach ($interfaces as $if) : ?> <div role="tabpanel" class="tab-pane active" id="hourly">
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?> <div class="row">
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option> <div class="col-lg-12">
<?php endforeach ?> <h4 class="mt-3"><?php echo _('Hourly traffic amount'); ?></h4>
</select> <label for="cbxInterfacehourly"><?php echo _('interface'); ?></label>
<div class="hidden alert alert-info" id="divLoaderBandwidthhourly"> <select id="cbxInterfacehourly" class="form-control" name="interfacehourly">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('hourly')); ?> <?php foreach ($interfaces as $if) : ?>
</div> <?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<canvas id="divChartBandwidthhourly"></canvas> <option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
<div id="divTableBandwidthhourly"></div> <?php endforeach ?>
</div> </select>
</div> <div class="hidden alert alert-info" id="divLoaderBandwidthhourly">
</div><!-- /.tab-pane --> <?php echo sprintf(_("Loading %s bandwidth chart"), _('hourly')); ?>
<div role="tabpanel" class="tab-pane fade" id="daily"> </div>
<div class="row"> <canvas id="divChartBandwidthhourly"></canvas>
<div class="col-lg-12"> <div id="divTableBandwidthhourly"></div>
<h4 class="mt-3"><?php echo _('Daily traffic amount'); ?></h4> </div>
<label for="cbxInterfacedaily"><?php echo _('interface'); ?></label> </div>
<select id="cbxInterfacedaily" class="form-control" name="interfacedaily"> </div><!-- /.tab-pane -->
<?php foreach ($interfaces as $if) : ?> <div role="tabpanel" class="tab-pane fade" id="daily">
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?> <div class="row">
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option> <div class="col-lg-12">
<?php endforeach ?> <h4 class="mt-3"><?php echo _('Daily traffic amount'); ?></h4>
</select> <label for="cbxInterfacedaily"><?php echo _('interface'); ?></label>
<div class="hidden alert alert-info" id="divLoaderBandwidthdaily"> <select id="cbxInterfacedaily" class="form-control" name="interfacedaily">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('daily')); ?> <?php foreach ($interfaces as $if) : ?>
</div> <?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<canvas id="divChartBandwidthdaily"></canvas> <option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
<div id="divTableBandwidthdaily"></div> <?php endforeach ?>
</div> </select>
</div> <div class="hidden alert alert-info" id="divLoaderBandwidthdaily">
</div><!-- /.tab-pane --> <?php echo sprintf(_("Loading %s bandwidth chart"), _('daily')); ?>
<div role="tabpanel" class="tab-pane fade" id="monthly"> </div>
<div class="row"> <canvas id="divChartBandwidthdaily"></canvas>
<div class="col-lg-12"> <div id="divTableBandwidthdaily"></div>
<h4 class="mt-3"><?php echo _("Monthly traffic amount"); ?></h4> </div>
<label for="cbxInterfacemonthly"><?php echo _('interface'); ?></label> </div>
<select id="cbxInterfacemonthly" class="form-control" name="interfacemonthly"> </div><!-- /.tab-pane -->
<?php foreach ($interfaces as $if) : ?> <div role="tabpanel" class="tab-pane fade" id="monthly">
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?> <div class="row">
<option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option> <div class="col-lg-12">
<?php endforeach ?> <h4 class="mt-3"><?php echo _("Monthly traffic amount"); ?></h4>
</select> <label for="cbxInterfacemonthly"><?php echo _('interface'); ?></label>
<div class="hidden alert alert-info" id="divLoaderBandwidthmonthly"> <select id="cbxInterfacemonthly" class="form-control" name="interfacemonthly">
<?php echo sprintf(_("Loading %s bandwidth chart"), _('monthly')); ?> <?php foreach ($interfaces as $if) : ?>
</div> <?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<canvas id="divChartBandwidthmonthly"></canvas> <option value="<?php echo $if_quoted ?>"><?php echo $if_quoted ?></option>
<div id="divTableBandwidthmonthly"></div> <?php endforeach ?>
</div> </select>
</div> <div class="hidden alert alert-info" id="divLoaderBandwidthmonthly">
</div><!-- /.tab-pane --> <?php echo sprintf(_("Loading %s bandwidth chart"), _('monthly')); ?>
</div><!-- /.tabsBandwidth --> </div>
<canvas id="divChartBandwidthmonthly"></canvas>
</div><!-- /.card-body --> <div id="divTableBandwidthmonthly"></div>
<div class="card-footer"><?php echo _("Information provided by vnstat"); ?></div> </div>
</div>
</div><!-- /.tab-pane -->
</div><!-- /.tabsBandwidth -->
</div><!-- /.card-body -->
<div class="card-footer"><?php echo _("Information provided by vnstat"); ?></div>
</div><!-- /.card --> </div><!-- /.card -->
</div><!-- /.col-lg-12 --> </div><!-- /.col-lg-12 -->
</div><!-- /.row --> </div><!-- /.row -->

View File

@ -1,138 +1,138 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<i class="fas fa-exchange-alt mr-2"></i><?php echo _("Configure DHCP"); ?> <i class="fas fa-exchange-alt mr-2"></i><?php echo _("Configure DHCP"); ?>
</div> </div>
<div class="col"> <div class="col">
<button class="btn btn-light btn-icon-split btn-sm service-status float-right"> <button class="btn btn-light btn-icon-split btn-sm service-status float-right">
<span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span> <span class="icon text-gray-600"><i class="fas fa-circle service-status-<?php echo $serviceStatus ?>"></i></span>
<span class="text service-status">dnsmasq <?php echo _($serviceStatus) ?></span> <span class="text service-status">dnsmasq <?php echo _($serviceStatus) ?></span>
</button> </button>
</div> </div>
</div><!-- /.row --> </div><!-- /.row -->
</div><!-- /.card-header --> </div><!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<?php $status->showMessages(); ?> <?php $status->showMessages(); ?>
<form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form"> <form method="POST" action="?page=dhcpd_conf" class="js-dhcp-settings-form">
<?php echo CSRFTokenFieldTag() ?> <?php echo CSRFTokenFieldTag() ?>
<!-- Nav tabs --> <!-- Nav tabs -->
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" href="#server-settings" data-toggle="tab"><?php echo _("Server settings"); ?></a></li> <li class="nav-item"><a class="nav-link active" href="#server-settings" data-toggle="tab"><?php echo _("Server settings"); ?></a></li>
<li class="nav-item"><a class="nav-link" href="#static-leases" data-toggle="tab"><?php echo _("Static Leases") ?></a></li> <li class="nav-item"><a class="nav-link" href="#static-leases" data-toggle="tab"><?php echo _("Static Leases") ?></a></li>
<li class="nav-item"><a class="nav-link" href="#client-list" data-toggle="tab"><?php echo _("Client list"); ?></a></li> <li class="nav-item"><a class="nav-link" href="#client-list" data-toggle="tab"><?php echo _("Client list"); ?></a></li>
</ul> </ul>
<!-- Tab panes --> <!-- Tab panes -->
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="server-settings"> <div class="tab-pane active" id="server-settings">
<h4 class="mt-3">DHCP server settings</h4> <h4 class="mt-3">DHCP server settings</h4>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code">Interface</label> <label for="code">Interface</label>
<select class="form-control" name="interface"> <select class="form-control" name="interface">
<?php foreach ($interfaces as $if) : ?> <?php foreach ($interfaces as $if) : ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?> <?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<?php $selected = $if === $conf['interface'] ? ' selected="selected"' : '' ?> <?php $selected = $if === $conf['interface'] ? ' selected="selected"' : '' ?>
<option value="<?php echo $if_quoted ?>"<?php echo $selected ?>><?php echo $if_quoted ?></option> <option value="<?php echo $if_quoted ?>"<?php echo $selected ?>><?php echo $if_quoted ?></option>
<?php endforeach ?> <?php endforeach ?>
</select> </select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code"><?php echo _("Starting IP Address"); ?></label> <label for="code"><?php echo _("Starting IP Address"); ?></label>
<input type="text" class="form-control"name="RangeStart" value="<?php echo htmlspecialchars($RangeStart, ENT_QUOTES); ?>" /> <input type="text" class="form-control"name="RangeStart" value="<?php echo htmlspecialchars($RangeStart, ENT_QUOTES); ?>" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code"><?php echo _("Ending IP Address"); ?></label> <label for="code"><?php echo _("Ending IP Address"); ?></label>
<input type="text" class="form-control" name="RangeEnd" value="<?php echo htmlspecialchars($RangeEnd, ENT_QUOTES); ?>" /> <input type="text" class="form-control" name="RangeEnd" value="<?php echo htmlspecialchars($RangeEnd, ENT_QUOTES); ?>" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-xs-3 col-sm-3"> <div class="form-group col-xs-3 col-sm-3">
<label for="code"><?php echo _("Lease Time"); ?></label> <label for="code"><?php echo _("Lease Time"); ?></label>
<input type="text" class="form-control" name="RangeLeaseTime" value="<?php echo htmlspecialchars($arrRangeLeaseTime[1], ENT_QUOTES); ?>" /> <input type="text" class="form-control" name="RangeLeaseTime" value="<?php echo htmlspecialchars($arrRangeLeaseTime[1], ENT_QUOTES); ?>" />
</div> </div>
<div class="col-xs-3 col-sm-3"> <div class="col-xs-3 col-sm-3">
<label for="code"><?php echo _("Interval"); ?></label> <label for="code"><?php echo _("Interval"); ?></label>
<select name="RangeLeaseTimeUnits" class="form-control" > <select name="RangeLeaseTimeUnits" class="form-control" >
<option value="m"<?php echo $mselected; ?>><?php echo _("Minute(s)"); ?></option> <option value="m"<?php echo $mselected; ?>><?php echo _("Minute(s)"); ?></option>
<option value="h"<?php echo $hselected; ?>><?php echo _("Hour(s)"); ?></option> <option value="h"<?php echo $hselected; ?>><?php echo _("Hour(s)"); ?></option>
<option value="d"<?php echo $dselected; ?>><?php echo _("Day(s)"); ?></option> <option value="d"<?php echo $dselected; ?>><?php echo _("Day(s)"); ?></option>
<option value="infinite"<?php echo $infiniteselected; ?>><?php echo _("Infinite"); ?></option> <option value="infinite"<?php echo $infiniteselected; ?>><?php echo _("Infinite"); ?></option>
</select> </select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code"><?php echo _("DNS Server"); ?> 1</label> <label for="code"><?php echo _("DNS Server"); ?> 1</label>
<input type="text" class="form-control"name="DNS1" value="<?php echo htmlspecialchars($DNS1, ENT_QUOTES); ?>" /> <input type="text" class="form-control"name="DNS1" value="<?php echo htmlspecialchars($DNS1, ENT_QUOTES); ?>" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code"><?php echo _("DNS Server"); ?> 2</label> <label for="code"><?php echo _("DNS Server"); ?> 2</label>
<input type="text" class="form-control" name="DNS2" value="<?php echo htmlspecialchars($DNS2, ENT_QUOTES); ?>" /> <input type="text" class="form-control" name="DNS2" value="<?php echo htmlspecialchars($DNS2, ENT_QUOTES); ?>" />
</div> </div>
</div> </div>
<?php if (!RASPI_MONITOR_ENABLED) : ?> <?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" /> <input type="submit" class="btn btn-outline btn-primary" value="<?php echo _("Save settings"); ?>" name="savedhcpdsettings" />
<?php if ($dnsmasq_state) : ?> <?php if ($dnsmasq_state) : ?>
<input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" /> <input type="submit" class="btn btn-warning" value="<?php echo _("Stop dnsmasq") ?>" name="stopdhcpd" />
<?php else : ?> <?php else : ?>
<input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" /> <input type="submit" class="btn btn-success" value="<?php echo _("Start dnsmasq") ?>" name="startdhcpd" />
<?php endif ?> <?php endif ?>
<?php endif ?> <?php endif ?>
</div><!-- /.tab-pane --> </div><!-- /.tab-pane -->
<div class="tab-pane fade in" id="client-list"> <div class="tab-pane fade" id="client-list">
<h4 class="mt-3 mb-3">Client list</h4> <h4 class="mt-3 mb-3">Client list</h4>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><?php echo _("Active DHCP leases"); ?></div> <div class="card-header"><?php echo _("Active DHCP leases"); ?></div>
<!-- /.panel-heading --> <!-- /.panel-heading -->
<div class="card-body"> <div class="card-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr> <tr>
<th><?php echo _("Expire time"); ?></th> <th><?php echo _("Expire time"); ?></th>
<th><?php echo _("MAC Address"); ?></th> <th><?php echo _("MAC Address"); ?></th>
<th><?php echo _("IP Address"); ?></th> <th><?php echo _("IP Address"); ?></th>
<th><?php echo _("Host name"); ?></th> <th><?php echo _("Host name"); ?></th>
<th><?php echo _("Client ID"); ?></th> <th><?php echo _("Client ID"); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($leases as $lease) : ?> <?php foreach ($leases as $lease) : ?>
<?php foreach (explode(' ', $lease) as $prop) : ?> <?php foreach (explode(' ', $lease) as $prop) : ?>
<tr> <tr>
<?php foreach (explode(' ', $lease) as $prop) : ?> <?php foreach (explode(' ', $lease) as $prop) : ?>
<td><?php echo htmlspecialchars($prop, ENT_QUOTES) ?></td> <td><?php echo htmlspecialchars($prop, ENT_QUOTES) ?></td>
<?php endforeach ?> <?php endforeach ?>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
</div><!-- /.table-responsive --> </div><!-- /.table-responsive -->
</div><!-- /.card-body --> </div><!-- /.card-body -->
</div><!-- /.card --> </div><!-- /.card -->
</div><!-- /.col-lg-12 --> </div><!-- /.col-lg-12 -->
</div><!-- /.row --> </div><!-- /.row -->
</div><!-- /.tab-pane --> </div><!-- /.tab-pane -->
<div class="tab-pane fade in" id="static-leases"> <div class="tab-pane fade" id="static-leases">
<div class="dhcp-static-leases js-dhcp-static-lease-container"> <div class="dhcp-static-leases js-dhcp-static-lease-container">
<?php foreach ($dhcpHost as $host) : ?> <?php foreach ($dhcpHost as $host) : ?>
<?php list($mac, $ip) = array_map("trim", explode(",", $host)); ?> <?php list($mac, $ip) = array_map("trim", explode(",", $host)); ?>

View File

@ -1,7 +1,13 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-network-wired mr-2"></i><?php echo _("Configure networking"); ?></div> <div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-network-wired mr-2"></i><?php echo _("Configure networking"); ?>
</div>
</div><!-- ./row -->
</div><!-- ./card-header -->
<div class="card-body"> <div class="card-body">
<div id="msgNetworking"></div> <div id="msgNetworking"></div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">

View File

@ -29,74 +29,78 @@ if ($cpuload > 90) {
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-cube mr-2"></i><?php echo _("System"); ?></div> <div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-cube mr-2"></i><?php echo _("System"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<?php $status->showMessages(); ?> <?php $status->showMessages(); ?>
<form role="form" action="?page=system_info" method="POST"> <form role="form" action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?> <?php echo CSRFTokenFieldTag() ?>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="nav-item"><a class="nav-link active" id="systemtab" href="#system" aria-controls="system" role="tab" data-toggle="tab"><?php echo _("System"); ?></a></li> <li role="presentation" class="nav-item"><a class="nav-link active" id="systemtab" href="#system" aria-controls="system" role="tab" data-toggle="tab"><?php echo _("System"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="languagetab" href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li> <li role="presentation" class="nav-item"><a class="nav-link" id="languagetab" href="#language" aria-controls="language" role="tab" data-toggle="tab"><?php echo _("Language"); ?></a></li>
<li role="presentation" class="nav-item"><a class="nav-link" id="consoletab" href="#console" aria-controls="console" role="tab" data-toggle="tab"><?php echo _("Console"); ?></a></li> <li role="presentation" class="nav-item"><a class="nav-link" id="consoletab" href="#console" aria-controls="console" role="tab" data-toggle="tab"><?php echo _("Console"); ?></a></li>
</ul> </ul>
<div class="systemtabcontent tab-content"> <div class="systemtabcontent tab-content">
<div role="tabpanel" class="tab-pane active" id="system"> <div role="tabpanel" class="tab-pane active" id="system">
<div class="row"> <div class="row">
<div class="col-lg-6"> <div class="col-lg-6">
<h4 class="mt-3"><?php echo _("System Information"); ?></h4> <h4 class="mt-3"><?php echo _("System Information"); ?></h4>
<div class="info-item"><?php echo _("Hostname"); ?></div><div><?php echo htmlspecialchars($hostname, ENT_QUOTES); ?></div> <div class="info-item"><?php echo _("Hostname"); ?></div><div><?php echo htmlspecialchars($hostname, ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Pi Revision"); ?></div><div><?php echo htmlspecialchars(RPiVersion(), ENT_QUOTES); ?></div> <div class="info-item"><?php echo _("Pi Revision"); ?></div><div><?php echo htmlspecialchars(RPiVersion(), ENT_QUOTES); ?></div>
<div class="info-item"><?php echo _("Uptime"); ?></div><div><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div> <div class="info-item"><?php echo _("Uptime"); ?></div><div><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
<div class="mb-1"><?php echo _("Memory Used"); ?></div> <div class="mb-1"><?php echo _("Memory Used"); ?></div>
<div class="progress mb-2" style="height: 20px;"> <div class="progress mb-2" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?>" <div class="progress-bar bg-<?php echo htmlspecialchars($memused_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($memused, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100" role="progressbar" aria-valuenow="<?php echo htmlspecialchars($memused, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($memused, ENT_QUOTES); ?>% style="width: <?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($memused, ENT_QUOTES); ?>%
</div> </div>
</div> </div>
<div class="mb-1"><?php echo _("CPU Load"); ?></div> <div class="mb-1"><?php echo _("CPU Load"); ?></div>
<div class="progress mb-4" style="height: 20px;"> <div class="progress mb-4" style="height: 20px;">
<div class="progress-bar bg-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?>" <div class="progress-bar bg-<?php echo htmlspecialchars($cpuload_status, ENT_QUOTES); ?>"
role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100" role="progressbar" aria-valuenow="<?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>" aria-valuemin="0" aria-valuemax="100"
style="width: <?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>% style="width: <?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%"><?php echo htmlspecialchars($cpuload, ENT_QUOTES); ?>%
</div> </div>
</div> </div>
<form action="?page=system_info" method="POST"> <form action="?page=system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?> <?php echo CSRFTokenFieldTag() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?> <?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" /> <input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
<input type="submit" class="btn btn-warning" name="system_shutdown" value="<?php echo _("Shutdown"); ?>" /> <input type="submit" class="btn btn-warning" name="system_shutdown" value="<?php echo _("Shutdown"); ?>" />
<?php endif ?> <?php endif ?>
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a> <a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
<div role="tabpanel" class="tab-pane" id="language"> <div role="tabpanel" class="tab-pane" id="language">
<h4 class="mt-3"><?php echo _("Language settings") ;?></h4> <h4 class="mt-3"><?php echo _("Language settings") ;?></h4>
<div class="row"> <div class="row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="code"><?php echo _("Select a language"); ?></label> <label for="code"><?php echo _("Select a language"); ?></label>
<?php SelectorOptions('locale', $arrLocales, $_SESSION['locale']); ?> <?php SelectorOptions('locale', $arrLocales, $_SESSION['locale']); ?>
</div> </div>
</div> </div>
<input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" /> <input type="submit" class="btn btn-outline btn-primary" name="SaveLanguage" value="<?php echo _("Save settings"); ?>" />
<a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a> <a href="?page=<?php echo $_GET['page'] ?>" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</div> </div>
<div role="tabpanel" class="tab-pane" id="console">
<div role="tabpanel" class="tab-pane" id="console"> <div class="row">
<div class="row"> <div class="col-lg-12 mt-3">
<div class="col-lg-12 mt-3"> <iframe src="includes/webconsole.php" class="webconsole"></iframe>
<iframe src="includes/webconsole.php" class="webconsole"></iframe> </div>
</div> </div>
</div> </div>
</div> </div><!-- /.systemtabcontent -->
</div><!-- /.systemtabcontent --> </form>
</form>
</div><!-- /.card-body --> </div><!-- /.card-body -->
<div class="card-footer"></div> <div class="card-footer"></div>
</div><!-- /.card --> </div><!-- /.card -->

View File

@ -1,7 +1,13 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"><i class="fas fa-paint-brush mr-2"></i><?php echo _("Change Theme"); ?></div> <div class="card-header">
<div class="row">
<div class="col">
<i class="fas fa-paint-brush mr-2"></i><?php echo _("Change Theme"); ?>
</div>
</div><!-- /.row -->
</div><!-- /.card-header -->
<div class="card-body"> <div class="card-body">
<h4><?php echo _("Theme settings"); ?></h4> <h4><?php echo _("Theme settings"); ?></h4>
<div class="row"> <div class="row">