Project

General

Profile

Actions

Feature #2691

closed

Truncate description on service status widget

Added by Steve Allison over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Dashboard
Target version:
Start date:
11/20/2012
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

The service status widget becomes unwieldy when the description of a service is long.

I propose to truncate the description in the widget to a set number of chars to trim the effects of a description length.

pfsense 2.0.1 status widget -- http://i.imgur.com/DzrCO.png
Proposed change (20 chars limit) -- http://i.imgur.com/mzOP1.png

--- services_status.widget.php  2012-11-21 00:58:42.000000000 +0000
+++ services_status.widget.php_proposed 2012-11-21 00:58:36.000000000 +0000
@@ -197,6 +197,9 @@
                        continue;
                if (empty($service['description']))
                        $service['description'] = get_pkg_descr($service['name']);
+               if (strlen($service['description']) > 20) {
+                       $service['description'] = substr($service['description'],0,20)."..";
+               }
                echo '<tr><td class="listlr">' . $service['name'] . '</td>' . "\n";
                echo '<td class="listr">' . $service['description'] . '</td>' . "\n";
                if ($service['name'] == "openvpn")
Actions #1

Updated by Renato Botelho about 11 years ago

  • Category set to Dashboard
  • Status changed from New to Closed
  • Target version set to 2.1

It was changed to just put the first sentence of description in changeset 41af581edd49bb920a783bf5b78f9bbfe2a740c9

Actions

Also available in: Atom PDF