diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-02-09 18:18:39 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-02-09 18:18:39 -0500 |
commit | 40883c55f0cac9ebc489070fd06e774e4db1ba7a (patch) | |
tree | 0937fa78613331cac907e35a086a7a17e525ac7c /src/usr/local/www/widgets | |
parent | 625c4a8b5ba0c1137c639fe7496fbd27b33b984b (diff) | |
download | pfsense-40883c55f0cac9ebc489070fd06e774e4db1ba7a.zip pfsense-40883c55f0cac9ebc489070fd06e774e4db1ba7a.tar.gz |
Revised service hiding
Diffstat (limited to 'src/usr/local/www/widgets')
-rw-r--r-- | src/usr/local/www/widgets/widgets/services_status.widget.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php index ebe5937..6cb4c04 100644 --- a/src/usr/local/www/widgets/widgets/services_status.widget.php +++ b/src/usr/local/www/widgets/widgets/services_status.widget.php @@ -73,7 +73,9 @@ for ($idx=0; $idx < $numsvcs; $idx++) { for ($chk = $idx +1, $sfx=2; $chk <$numsvcs; $chk++) { if ($services[$chk]['name'] == $name) { - $services[$chk]['name'].= '_' . $sfx++; + $services[$chk]['dispname'] = $services[$chk]['name'] .'_' . $sfx++; + } else { + $services[$chk]['dispname'] = $services[$chk]['name']; } } } @@ -113,7 +115,7 @@ $skipservices = explode(",", $config['widgets']['servicestatusfilter']); if (count($services) > 0) { uasort($services, "service_name_compare"); foreach ($services as $service) { - if ((!$service['name']) || (in_array($service['name'], $skipservices)) || (!is_service_enabled($service['name']))) { + if ((!$service['dispname']) || (in_array($service['dispname'], $skipservices)) || (!is_service_enabled($service['dispname']))) { continue; } if (empty($service['description'])) { @@ -123,7 +125,7 @@ if (count($services) > 0) { ?> <tr> <td><i class="fa fa-<?=get_service_status($service) ? 'check-circle text-success' : 'times-circle text-warning'?>"></i></td> - <td><?=$service['name']?></td> + <td><?=$service['dispname']?></td> <td><?=$service_desc[0]?></td> <td><?=get_service_control_GET_links($service)?></td> </tr> |