As a user of Mender UI, I would like to be able to filter devices using static search URLs
Description
Affects versions
Environment
Attachments
Checklist
Activity

Manuel ZedelOctober 1, 2020 at 9:23 AM
in that case I would say the solution I implemented in the PR is enough - it should make the creation of links very straight forward...
and if we eventually get an endpoint to retrieve a complete list of attributes directly from the backend the filter creation should be good enough + we can still adjust which attribute takes precedence (identity or inventory)...

Mirza KrakOctober 1, 2020 at 6:23 AM
Primary motivator is to simplify the integration. For external services the "Device ID" is not known, so you would need to integrate using the API's to map a device identifier (e.g to MAC).
If you can use something like:
Then you do not need to integrate using the API's and you can generate these links based on a the device identifier that is known across many services (be it MAC or something else)

eystein.maloy.stenbergSeptember 30, 2020 at 9:32 PM
perhaps you could clarify a bit what the shortcoming of the current feature is?
As I understood it, they wanted to simply have a unique link to a device so they could share it within the team (this has come up several times and is why we have it supported). Why would it be interesting to use a different scope within the link to the device?

Manuel ZedelSeptember 30, 2020 at 12:49 PMEdited
https://github.com/mendersoftware/gui/pull/980 would bring this in - once you create a filter that filter will be added to the url - however it comes with the limitation of only working with equality based filters for now... so e.g. https://localhost/ui/#/devices?image_id=release-2.1&device_type=qemux86-64&status=accepted is possible... but if you want to do `client_version in this, that` it would result in `client_version=this,that` and that would result in `client_version equals "this,that"`...
In addition, if an attribute is listed in BOTH identity and inventory, the inventory listing will take precedence (so in the example: a mac address that is stored in inventory will be searched for - even if it is also an identity attribute)
And furthermore, until gets implemented, the detection of the attribute type is limited to the information the frontend gets - so if you link to a device with an identity attribute that is just found in a few of your 500000 devices, it might well be, that the UI might not know about it yet and tries to search for it as an inventory attribute...
An alternative would similar to the way Jira does it - however this leads to urls that are A LOT more ugly... something like: `https://localhost/ui/#/devices?filters%3D%5B%7Bkey%3D'mac'%2Cscope%3D'identity'%2Cvalue%3D'12%3A34%3A56%3A78'%7D%2C%7Bkey%3D'device_type'%2Cscope%3D'inventory'%2Cvalue%3D'qemux86_64'%7D%5D` ...

Mirza KrakSeptember 30, 2020 at 7:11 AM
> I think this already exists if I understand the question correctly. Please see attached screenshot.
Wow . Never seen that button. This does indeed work for "Device ID", guess other scopes are not supported ? And out of curiosity, how hard would it be to extend this?
Details
Assignee
Manuel ZedelManuel ZedelReporter
Mirza KrakMirza KrakLabels
Priority
(None)Days in progress
0Backlog
yes
Details
Details
Assignee

Reporter

Labels
Priority
Days in progress
Backlog
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

Example:
From user: