mvc: style sweep

This commit is contained in:
Franco Fichtner 2023-11-27 16:26:59 +01:00
parent 5da37a7fac
commit 7e95b9d133
2 changed files with 5 additions and 5 deletions

View File

@ -116,7 +116,7 @@ class OverviewController extends ApiControllerBase
}
/* map routes to interfaces */
foreach($routes as $route) {
foreach ($routes as $route) {
if (!empty($route['netif']) && !empty($ifinfo[$route['netif']])) {
$ifinfo[$route['netif']]['routes'][] = $route['destination'];
}
@ -144,7 +144,7 @@ class OverviewController extends ApiControllerBase
$tmp['status'] = (!empty($details['flags']) && in_array('up', $details['flags'])) ? 'up' : 'down';
if (!empty($details['status'])) {
if (!(in_array($details['status'] , ['active', 'running']))) {
if (!(in_array($details['status'], ['active', 'running']))) {
/* reflect current ifconfig status, such as 'no carrier' */
$tmp['status'] = $details['status'];
}
@ -179,7 +179,7 @@ class OverviewController extends ApiControllerBase
if (!empty($ip['vhid'])) {
$vhid = $ip['vhid'];
$entry['vhid'] = $vhid;
if (!empty($details['carp'])) {
foreach ($details['carp'] as $carp) {
if ($carp['vhid'] == $vhid) {
@ -198,7 +198,7 @@ class OverviewController extends ApiControllerBase
}
/* gateway(s) */
$gatewayv4 = $gateways->getInterfaceGateway($tmp['identifier'] , 'inet');
$gatewayv4 = $gateways->getInterfaceGateway($tmp['identifier'], 'inet');
$gatewayv6 = $gateways->getInterfaceGateway($tmp['identifier'], 'inet6');
$tmp['gateways'] = array_filter([$gatewayv4, $gatewayv6]);

View File

@ -90,7 +90,7 @@
.text('Expand'));
}
return $elements.prop('outerHTML');
},
"status": function (column, row) {
let connected = row.status == 'up' ? 'text-success' : 'text-danger';