Project

General

Profile

Actions

Feature #5554

closed

Services Status Widget problem

Added by Colin Fleming over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Web Interface
Target version:
Start date:
11/30/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

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

ServicesStatusWidget(All).png (20.3 KB) ServicesStatusWidget(All).png All services showing OK Colin Fleming, 11/30/2015 02:18 PM
ServicesStatusWidget(Hide).png (22.5 KB) ServicesStatusWidget(Hide).png "vmware-guestd" hidden and showing OK Colin Fleming, 11/30/2015 02:18 PM
ServicesStatusWidget(Ooops).png (24.9 KB) ServicesStatusWidget(Ooops).png De-select all services, click save and oops! Colin Fleming, 11/30/2015 02:18 PM
Services.jpg (43.2 KB) Services.jpg Anonymous, 11/30/2015 08:35 PM
Actions #1

Updated by Anonymous over 8 years ago

I am unable to reproduce with Firefox or Safari. What OS/Browser are you testing with?

Actions #2

Updated by Colin Fleming over 8 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][]/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][]/root:

Actions #3

Updated by Anonymous over 8 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?

Actions #4

Updated by Colin Fleming over 8 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?

Actions #5

Updated by Anonymous over 8 years ago

Well that's odd :) This is what my display looks like (Mac OS-X/Firefox 43

I'll look at it again tomorrow.

Actions #6

Updated by Anonymous over 8 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?

Actions #7

Updated by Colin Fleming over 8 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.

Actions #8

Updated by Anonymous over 8 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF