fix markup in networking

This commit is contained in:
glaszig 2021-04-03 17:57:45 +01:00
parent e5ac7d23a3
commit 8dbb2f3a1b

View file

@ -1,84 +1,77 @@
<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="col">
<i class="fas fa-network-wired mr-2"></i><?php echo _("Networking"); ?> <i class="fas fa-network-wired mr-2"></i><?php echo _("Networking"); ?>
</div> </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">
<li role="presentation" class="nav-item"><a class="nav-link active" href="#summary" aria-controls="summary" role="tab" data-toggle="tab"><?php echo _("Summary"); ?></a></li> <h4 class="card-title mt-3"><?php echo _("Internet connection"); ?></h4>
</ul> <div class="row">
<div class="tab-content"> <div class="col-sm-12">
<div role="tabpanel" class="tab-pane active" id="summary"> <div class="table-responsive">
<h4 class="mt-3"><?php echo _("Internet connection"); ?></h4> <table class="table">
<div class="row"> <thead>
<div class="col-sm-12"> <tr>
<div class="table-responsive"> <th><?php echo _("Interface"); ?></th>
<table class="table"> <th><?php echo _("IP Address"); ?></th>
<thead> <th><?php echo _("Gateway"); ?></th>
<tr> <th colspan="2"><?php echo _("Internet Access"); ?></th>
<th><?php echo _("Interface"); ?></th> </tr>
<th><?php echo _("IP Address"); ?></th> </thead>
<th><?php echo _("Gateway"); ?></th> <tbody>
<th colspan="2"><?php echo _("Internet Access"); ?></th> <?php if (isset($routeInfo["error"]) || empty($routeInfo)): ?>
</tr> <tr><td colspan=5>No route to the internet found</td></tr>
</thead> <?php else: ?>
<tbody> <?php foreach($routeInfo as $route): ?>
<?php if (isset($routeInfo["error"]) || empty($routeInfo)): ?> <tr>
<tr><td colspan=5>No route to the internet found</td></tr> <td><?php echo $route['interface'] ?></td>
<?php else: ?> <td><?php echo $route['ip-address'] ?></td>
<?php foreach($routeInfo as $route): ?> <td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td>
<tr> <td>
<td><?php echo $route['interface'] ?></td> <p class="m-0">
<td><?php echo $route['ip-address'] ?></td> <i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_IP ?>
<td><?php echo $route['gateway'] ?><br><?php $route['gw-name'] ?></td> </p>
<td> <p class="m-0">
<p class="m-0"> <i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_DNS ?>
<i class="fas <?php echo $route["access-ip"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_IP ?> </p>
</p> </td>
<p class="m-0"> </tr>
<i class="fas <?php echo $route["access-dns"] ? "fa-check" : "fa-times"; ?>"></i> <?php echo RASPI_ACCESS_CHECK_DNS ?> <?php endforeach ?>
</p> <?php endif ?>
</td> </tbody>
</tr> </table>
<?php endforeach ?>
<?php endif ?>
</tbody>
</table>
</div>
</div>
</div>
<h4 class="mt-3"><?php echo _("Current settings") ?></h4>
<div class="row">
<?php if (!$bridgedEnabled) : // No interface details when bridged ?>
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<div class="col-md-6 mb-3">
<div class="card">
<div class="card-header"><?php echo $if_quoted ?></div>
<div class="card-body">
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
</div>
</div>
</div>
<?php endforeach ?>
<?php endif ?>
</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>
</div>
</div> </div>
</div> </div>
</div> </div>
<h4 class="card-title mt-3"><?php echo _("Current settings") ?></h4>
<div class="row">
<?php if (!$bridgedEnabled): // No interface details when bridged ?>
<?php foreach ($interfaces as $if): ?>
<?php $if_quoted = htmlspecialchars($if, ENT_QUOTES) ?>
<div class="col-md-6 mb-3">
<div class="card">
<div class="card-header"><?php echo $if_quoted ?></div>
<div class="card-body">
<pre class="unstyled" id="<?php echo $if_quoted ?>-summary"></pre>
</div>
</div>
</div>
<?php endforeach ?>
<?php endif ?>
</div><!-- /.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>
</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 -->
</div><!-- /.row --> </div><!-- /.row -->