From 41af581edd49bb920a783bf5b78f9bbfe2a740c9 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 4 Mar 2013 15:54:23 +0545 Subject: Services status widget display 1st sentence of description Some packages (e.g. bandwidthd, dansguardian, HAVP, nmap, squid3...) have a very verbose package description. This is displayed in the description column of the services status widget. That makes it take a lot of space on the dashboard. IMHO the first sentence gives a good concise description, so this change just displays the first sentence (text before a "."). Note: I purposely left the "." out of the string, I think it looks neater along with the descriptions of other built-in services - "DHCP Service" "DNS Forwarder"... --- usr/local/www/widgets/widgets/services_status.widget.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr/local/www/widgets/widgets/services_status.widget.php') diff --git a/usr/local/www/widgets/widgets/services_status.widget.php b/usr/local/www/widgets/widgets/services_status.widget.php index 371766d..11ecfcd 100644 --- a/usr/local/www/widgets/widgets/services_status.widget.php +++ b/usr/local/www/widgets/widgets/services_status.widget.php @@ -1,6 +1,6 @@ 0) { continue; if (empty($service['description'])) $service['description'] = get_pkg_descr($service['name']); + $service_desc = explode(".",$service['description']); echo '' . $service['name'] . '' . "\n"; - echo '' . $service['description'] . '' . "\n"; + echo '' . $service_desc[0] . '' . "\n"; echo get_service_status_icon($service, false, true); echo ''; echo get_service_control_links($service); -- cgit v1.1