This commit is contained in:
billz 2021-05-02 16:15:07 +01:00
commit a8d59c1479

View file

@ -1,13 +1,15 @@
<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="row"> <div class="card-header">
<div class="col"> <div class="row">
<i class="fas fa-network-wired mr-2"></i><?php echo _("Networking"); ?> <div class="col">
</div> <i class="fas fa-network-wired mr-2"></i><?php echo _("Networking"); ?>
</div><!-- ./row --> </div>
</div><!-- ./card-header --> </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">
@ -17,68 +19,65 @@
<div role="tabpanel" class="tab-pane active" id="summary"> <div role="tabpanel" class="tab-pane active" id="summary">
<h4 class="mt-3"><?php echo _("Internet connection"); ?></h4> <h4 class="mt-3"><?php echo _("Internet connection"); ?></h4>
<div class="row"> <div class="row">
<div class="col-sm-12""> <div class="col-sm-12">
<div class="card "> <div class="table-responsive">
<div class="card-body"> <table class="table">
<div class="table-responsive"> <thead>
<table class="table table-hover"> <tr>
<thead> <th><?php echo _("Interface"); ?></th>
<tr> <th><?php echo _("IP Address"); ?></th>
<th><?php echo _("Interface"); ?></th> <th><?php echo _("Gateway"); ?></th>
<th><?php echo _("IP Address"); ?></th> <th colspan="2"><?php echo _("Internet Access"); ?></th>
<th><?php echo _("Gateway"); ?></th> </tr>
<th colspan="2"><?php echo _("Internet Access"); ?></th> </thead>
</tr> <tbody>
</thead> <?php if (isset($routeInfo["error"]) || empty($routeInfo)): ?>
<tbody> <tr><td colspan=5>No route to the internet found</td></tr>
<?php <?php else: ?>
if (isset($routeInfo["error"]) || empty($routeInfo)) { <?php foreach($routeInfo as $route): ?>
echo "<tr><td colspan=5>No route to the internet found</td></tr>"; <tr>
} else { <td><?php echo $route['interface'] ?></td>
foreach($routeInfo as $route) { <td><?php echo $route['ip-address'] ?></td>
echo "<tr>"; <td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td>
echo "<td>".$route["interface"]."</td>"; <td>
echo "<td>".$route["ip-address"]."</td>"; <p class="m-0">
echo "<td>".$route["gateway"]."<br>".$route["gw-name"]."</td>"; <i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_IP ?>
$status = $route["access-ip"] ? "fa-check" : "fa-times"; </p>
echo '<td><i class="fas '.$status.'"></i><br>'.RASPI_ACCESS_CHECK_IP.'</td>'; <p class="m-0">
$status = $route["access-dns"] ? "fa-check" : "fa-times"; <i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_DNS ?>
echo '<td><i class="fas '.$status.'"></i><br>'.RASPI_ACCESS_CHECK_DNS.'</td>'; </p>
echo "</tr>"; </td>
} </tr>
} <?php endforeach ?>
?> <?php endif ?>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
<h4 class="mt-3"><?php echo _("Current settings") ?></h4> <h4 class="mt-3"><?php echo _("Current settings") ?></h4>
<div class="row"> <div class="row">
<?php if (!$bridgedEnabled) : // No interface details when bridged ?> <?php if (!$bridgedEnabled) : // No interface details when bridged ?>
<?php foreach ($interfaces as $if): ?> <?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?> <?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<div class="col-md-6 mb-3"> <div class="col-md mb-3">
<div class="card"> <div class="card h-100 w-100">
<div class="card-header"><?php echo $if_quoted ?></div> <div class="card-header"><?php echo $if_quoted ?></div>
<div class="card-body"> <div class="card-body">
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre> <pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
</div>
</div>
</div> </div>
</div> <?php endforeach ?>
</div> <?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div><!-- /.row --> </div><!-- /.row -->
<div class="col-lg-12">
<div class="row"> <button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</div>
</div>
</div> </div>
</div> </div>
</div><!-- /.card-body --> </div><!-- /.card-body -->
<div class="card-footer"><?php echo _("Information provided by /sys/class/net"); ?></div> <div class="card-footer"><?php echo _("Information provided by /sys/class/net"); ?></div>
</div><!-- /.card --> </div><!-- /.card -->
</div><!-- /.col-lg-12 --> </div><!-- /.col-lg-12 -->