also allows to search for tags in the GlobalSearchField where each tag is
treated like a seperate field, so it weighs more if the user searches for
the exact string of a single tag
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
ui: ResourceGrid: render tags
with the 'full' styling
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Single letter variable names really do not help understanding what's
going on, as do overly general names like fields for the split up
words we actually search+filter for.
Using a switch block as map is often also not ideal (way more syntax
noise and style hacks like break on the same line to keep it
compact), rather just use an actual object map.
Some of the improvements where not possible when this was
implemented, as then we ensured < es5 compat for IE 10 support.
With for-of and nullish-chaining a few things to get nicer to
express.
While at it also fix comment text width making them less look like
haikus and improve match calculation comment to avoid implying that
match is either 0, 1 or 2, it can be higher too (if multiple columns
match).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This add a context menu to the entries of the global search field instead of
showing the browsers default one.
This allows to search and easily manage nodes, VMs and CTs similar to the
behaviour in the resource tree.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
some function are now in Proxmox.Utils instead, so we have to use that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the buffered renderer does not work with auto height, and was disabled.
to enable it, we set a fixed height
when nothing is found, display 'none' to indicate nothing was found
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this adds a field, the globalsearchfield
its use is to search across our resources (vm,nodes,storage,pools)
quickly and from everywhere
it filters by taking each word you write, and gives
points to resources based on how often the word matches or
if it is an exact match for a field (details in source), and
sorts after this relevance number
with enter or click on an entry, you go directly to the selected
resource
also supports key up/down selecting of the entries and
toggling the search globally with ctrl+space or ctrl+shift+f
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>