Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devices Location filter default and list 1.2.11 #3531

Closed
unka65 opened this issue May 3, 2020 · 4 comments
Closed

Devices Location filter default and list 1.2.11 #3531

unka65 opened this issue May 3, 2020 · 4 comments
Labels
unverified Some days we don't have a clue

Comments

@unka65
Copy link

unka65 commented May 3, 2020

I looked thru the related closed issues but I was not sure if this was addressed or if it is a valid issue. I have the latest Devices host.php (1.2.12?) which includes the issue #3424 fix for the Location filter.

On the Management, Devices section, I noticed that the Location filter default value is '' (empty) and all devices are not listed initially (had hosts with null locations). After changing the Location filter default to -1 for All (host.php ~1282), the initial Devices list and the Clear function lists all devices. Would it be good to change the Location filter default to -1/All to prevent unpredictable results including the following?

In testing a mix of device location values, I found that if at least one device has a null location (initially most of mine were null), I noticed that the location filter has a blank entry and is the default filter (without the above default change) so that not all devices are listed initially and Clear does not list all.

When I changed the host.php Location filter list to match that of the devices list SQL Where clause (treat NULL and empty as the same), the Location filter list no longer has the blank entry, just Undefined, which seems logical to me. I do not know how well it will perform with many devices.

host.php ~1558
$locations = db_fetch_assoc("SELECT DISTINCT IF(IFNULL(location,'') = '', '" . __('Undefined') . "', location) AS location
// faster FROM for DISTINCT?
FROM ( SELECT location FROM host $sql_where GROUP BY location ) AS host

I thought I would mention it in case it makes sense and helps. Thanks, devs, for the great product!

@unka65 unka65 added bug Undesired behaviour unverified Some days we don't have a clue labels May 3, 2020
@netniV
Copy link
Member

netniV commented May 4, 2020

Are you saying that 3424 was a fix but on large systems causes a slowness?

@TheWitness
Copy link
Member

I'm at a lost here too...

@TheWitness
Copy link
Member

image

At 485 hosts, it's barely a blip. I imagine at 30k it's just a smidge over a blip, but not that much. And being that location is indexed, I really don't think that much.

@TheWitness TheWitness removed the bug Undesired behaviour label May 5, 2020
@TheWitness
Copy link
Member

No feedback.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

3 participants