Commit d1c84653 authored by Ad Schellevis's avatar Ad Schellevis

small style fix

parent 922dfa5d
...@@ -75,66 +75,64 @@ include("head.inc"); ...@@ -75,66 +75,64 @@ include("head.inc");
<?php endif; ?> <?php endif; ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid"> <div class="table-responsive">
<div class="table-responsive"> <table class="table table-striped">
<table class="table table-striped"> <thead>
<thead> <tr>
<tr> <td><?=gettext("Name"); ?></td>
<td><?=gettext("Name"); ?></td> <td><?=gettext("Address"); ?></td>
<td><?=gettext("Address"); ?></td> <td><?=gettext("Servers"); ?></td>
<td><?=gettext("Servers"); ?></td> <td><?=gettext("Status"); ?></td>
<td><?=gettext("Status"); ?></td> <td><?=gettext("Description"); ?></td>
<td><?=gettext("Description"); ?></td> </tr>
</tr> </thead>
</thead> <tbody>
<tbody>
<?php <?php
$i = 0; $i = 0;
foreach ($a_vs as $vsent): ?> foreach ($a_vs as $vsent): ?>
<tr> <tr>
<td><?=$vsent['name'];?></td> <td><?=$vsent['name'];?></td>
<td><?=$vsent['ipaddr']." : ".$vsent['port'];?></td> <td><?=$vsent['ipaddr']." : ".$vsent['port'];?></td>
<td> <td>
<?php <?php
foreach ($a_pool as $vipent): foreach ($a_pool as $vipent):
if ($vipent['name'] == $vsent['poolname']):?> if ($vipent['name'] == $vsent['poolname']):?>
<?=implode('<br/>',$vipent['servers']);?> <?=implode('<br/>',$vipent['servers']);?>
<?php <?php
endif; endif;
endforeach;?> endforeach;?>
</td> </td>
<?php <?php
switch (trim($rdr_a[$vsent['name']]['status'])) { switch (trim($rdr_a[$vsent['name']]['status'])) {
case 'active': case 'active':
$bgcolor = "#90EE90"; // lightgreen $bgcolor = "#90EE90"; // lightgreen
$rdr_a[$vsent['name']]['status'] = "Active"; $rdr_a[$vsent['name']]['status'] = "Active";
break; break;
case 'down': case 'down':
$bgcolor = "#F08080"; // lightcoral $bgcolor = "#F08080"; // lightcoral
$rdr_a[$vsent['name']]['status'] = "Down"; $rdr_a[$vsent['name']]['status'] = "Down";
break; break;
default: default:
$bgcolor = "#D3D3D3"; // lightgray $bgcolor = "#D3D3D3"; // lightgray
$rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?'; $rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?';
} }
?> ?>
<td> <td>
<table border="0" cellpadding="3" cellspacing="2" summary="status"> <table border="0" cellpadding="3" cellspacing="2" summary="status">
<tr><td bgcolor="<?=$bgcolor?>"><?=$rdr_a[$vsent['name']]['status']?> </td></tr> <tr><td bgcolor="<?=$bgcolor?>"><?=$rdr_a[$vsent['name']]['status']?> </td></tr>
</table> </table>
<?=!empty($rdr_a[$vsent['name']]['total']) ? "Total Sessions: {$rdr_a[$vsent['name']]['total']}" : "";?> <?=!empty($rdr_a[$vsent['name']]['total']) ? "Total Sessions: {$rdr_a[$vsent['name']]['total']}" : "";?>
<?=!empty($rdr_a[$vsent['name']]['last']) ? "<br />Last: {$rdr_a[$vsent['name']]['last']}" : "";?> <?=!empty($rdr_a[$vsent['name']]['last']) ? "<br />Last: {$rdr_a[$vsent['name']]['last']}" : "";?>
<?=!empty($rdr_a[$vsent['name']]['average']) ? "<br />Average: {$rdr_a[$vsent['name']]['average']}" : "";?> <?=!empty($rdr_a[$vsent['name']]['average']) ? "<br />Average: {$rdr_a[$vsent['name']]['average']}" : "";?>
</td> </td>
<td><?=$vsent['descr'];?></td> <td><?=$vsent['descr'];?></td>
</tr> </tr>
<?php <?php
$i++; $i++;
endforeach; ?> endforeach; ?>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment