Feature #5554
closedServices Status Widget problem
0%
Description
Click on the spanner and select a service to hide (e.g. vmware-guestd), click save and it's removed from the list
Now click on the spanner and de-select, e.g. vmware-guestd, in other words you want to show all the services, click save and you get taken to https://.../widgets/widgets/services_status.widget.php
An easy fix is to put an <OPTION> tag after the "foreach" statement, but what to call it? I'm sure there's probably a smarter way of doing this.
Files
Updated by Anonymous about 9 years ago
I am unable to reproduce with Firefox or Safari. What OS/Browser are you testing with?
Updated by Colin Fleming about 9 years ago
OS/Browser
Windows 7 Ultimate (Service Pack 1)
Firefox v42.0
Google Chrome v46.0.2490.86 (64-bit)
Iron Portable v46.0.2450.0
Internet Explorer v11.0.9600.18097
OS/Browser
Linux Mint 17.2 (Mate)
Firefox v38.0
pfSense version (up-to-date and GIT synced with master
[2.3-ALPHA][admin@pfSense23A.inteldq77kb.home]/root: uname -a
FreeBSD pfSense23A.inteldq77kb.home 10.2-STABLE FreeBSD 10.2-STABLE #213 2572e1a(devel): Sun Nov 29 23:36:45 CST 2015 root@pfs23-amd64-builder:/usr/home/pfsense/pfsense/tmp/obj/usr/home/pfsense/pfsense/tmp/FreeBSD-src/sys/pfSense amd64
[2.3-ALPHA][admin@pfSense23A.inteldq77kb.home]/root:
Updated by Anonymous about 9 years ago
That's certainly a wide range of test systems :)
I clicked the tools icon, disabled open-vmware and saved. The vmware service no longer displayed.
I clicked the tools icon again, clicked the blank choice at the top of the selector to unselect everything and saved again. All of the services were properly reported.
Can you suggest a better way to reproduce the issue?
Updated by Colin Fleming about 9 years ago
Steve Beaver wrote:
... clicked the blank choice at the top of the selector to unselect everything and saved again. All of the services were properly reported.
I don't have a blank option at the top of the list, I have:
apinger captiveportal miniupnpd ntpd sshd unbound vmware-guestd
So, I created another VM, I have not installed any packages etc., I have only configure WAN and LAN, the services listed in the widget are:
apinger ntpd unbound
There is no blank at the top of the list, looking at the code for services_status.widget.php shows the <OPTION> tag is wrapped in a PHP foreach statement and I cannot see how there could be a blank:
<form action="/widgets/widgets/services_status.widget.php" method="post" class="form-horizontal"> <div class="form-group"> <label for="inputPassword3" class="col-sm-3 control-label">Hidden services</label> <div class="col-sm-6"> <select multiple name="servicestatusfilter[]" class="form-control" height="5"> <?php foreach ($services as $service): ?> <option <?=(in_array($service['name'], $skipservices)?'selected':'')?>><?=$service['name']?></option> <?php endforeach; ?> </select> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-6"> <button type="submit" class="btn btn-default">Save</button> </div> </div> </form>
Any suggestions?
Updated by Anonymous about 9 years ago
- File Services.jpg Services.jpg added
Well that's odd :) This is what my display looks like (Mac OS-X/Firefox 43
I'll look at it again tomorrow.
Updated by Anonymous about 9 years ago
- Tracker changed from Todo to Feature
- Status changed from New to Feedback
I have added some jQuery that allows a user to click to deselect as well as select services, and a button clear all selections.
Would you give this a try please and see if it corrects the issue you have observed?
Updated by Colin Fleming about 9 years ago
Steve, that code update is working perfectly, both my VMs are now able to clear the selection and return to the dashboard as expected, the clear button is a lot more intuitive and elegant solution than selecting a blank option.
Thanks.