Closed Unix4ever closed 4 months ago
Looks cool... I wonder if we shouldn't apply the label to the search (showing "no matches") until it's fully built?
Looks cool... I wonder if we shouldn't apply the label to the search (showing "no matches") until it's fully built?
Well, the thing is that you can both add the label and search by text at the same time.
So when it shows no matches
it means it couldn't find the matching text.
I don't want to drop search by text as it's still useful if you need to find a node with some specific uuid for example.
I don't want to drop search by text as it's still useful if you need to find a node with some specific uuid for example.
That makes sense as well. idk, just looked a bit weird that while I'm typing a label via auto-complete, it shows that nothing is found.
I think I can do it smarter, but I think that might be even more confusing. So I think to leave it as is.
/m
New virtual resource
LabelsCompletion
can now be used to query all labels. And it works for any resources in the default namespace. To get the completions for any resource it is enough to pass the full resource type as the completions ID.Labels input is reusable and can be enabled for any views we need. Both mouse and keyboard control work for the completion selection. Labels now appear as the same boxes as they are displayed in the machines and cluster lists.
Label completion search looks both in keys and values until you add
:
to the line. Then it looks for keys that contain whatever is before:
with values that contain whatever is after:
.Fixes: https://github.com/siderolabs/omni/issues/24