diff options
author | jim-p <jimp@pfsense.org> | 2016-03-08 10:41:28 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2016-03-08 11:15:20 -0500 |
commit | 1ce9c03dc3f24f44f6d36a182f45ed0d2ad8ecfe (patch) | |
tree | 2778a5e2b4a7b494b268d1810626b6d97168fa7d | |
parent | 8c333b4dbaf586f6a9f84ac475cfbf50c14e5549 (diff) | |
download | pfsense-1ce9c03dc3f24f44f6d36a182f45ed0d2ad8ecfe.zip pfsense-1ce9c03dc3f24f44f6d36a182f45ed0d2ad8ecfe.tar.gz |
Clean up the CARP status widget. Fixes #5964
-rw-r--r-- | src/usr/local/www/widgets/widgets/carp_status.widget.php | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/usr/local/www/widgets/widgets/carp_status.widget.php b/src/usr/local/www/widgets/widgets/carp_status.widget.php index 2349ede..83f2b65 100644 --- a/src/usr/local/www/widgets/widgets/carp_status.widget.php +++ b/src/usr/local/www/widgets/widgets/carp_status.widget.php @@ -65,7 +65,13 @@ $carp_enabled = get_carp_status(); ?> <div class="content"> -<table> +<table class="table table-striped table-hover"> + <thead> + <th>CARP Interface</th> + <th>IP Address</th> + <th>Status</th> + </thead> + <tbody> <?php if (is_array($config['virtualip']['vip'])) { $carpint=0; @@ -80,36 +86,32 @@ $carp_enabled = get_carp_status(); $advskew = $carp['advskew']; $status = get_carp_interface_status("_vip{$carp['uniqid']}"); ?> -<tr> - <td> - <i class="fa fa-inbox"></i> - <a href="/system_hasync.php"> - <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}");?> - </a> - </td> - <td> -<?php - if ($carp_enabled == false) { + <tr> + <td> + <a href="/system_hasync.php"> + <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}");?> + </a> + </td> +<?php if ($carp_enabled == false) { + $icon = 'times-circle'; $status = "DISABLED"; - echo '<i class="fa fa-ban"></i>'; } else { if ($status == "MASTER") { - echo '<i class="fa fa-arrow-right"></i>'; + $icon = 'check-circle'; } else if ($status == "BACKUP") { - echo '<i class="fa fa-arrow-right"></i>'; + $icon = 'check-circle-o'; } else if ($status == "INIT") { - echo '<i class="fa fa-list-alt"></i>'; + $icon = 'question-circle'; } } if ($ipaddress) { ?> - - <?=htmlspecialchars($status);?> - <?=htmlspecialchars($ipaddress);?> + <td><?=htmlspecialchars($ipaddress);?></td> + <td><i class="fa fa-<?=$icon?>"></i> <?= htmlspecialchars($status) ?></td> <?php } ?> -</td></tr> + </tr> <?php } } else { @@ -118,5 +120,6 @@ $carp_enabled = get_carp_status(); <?php } ?> + </tbody> </table> </div> |