When the network-get-interfaces API endpoint returns an error, the GUI
currently only displays "No network information" instead of the actual
error message. The reason is that `Ext.String.format` is applied to
`text` to fill in the error message, but the format string `text` does
not contain any tokens. Commit e7f07a2e ("show guest-agent provided ip
address in qemu summary"), which introduced the feature, added a
format string in a variable `msg`, but unintentionally did not use it.
The unused variable `msg` was then removed in 55ee6ba1 ("ui: eslint:
No unused or duplicate variables").
Fix error reporting by re-introducing and actually using the format
string. Also, htmlEncode the error message returned by the backend.
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
So we show the value as they get sent by the backend, and not get
interpolated as html.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reported-by: Jens Krabbenhöft <jens@krabbenhoeft.net>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This makes it possible to select any of the IP addresses listed in the
full view window to copy & paste it.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
[ TL: reworked subject ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
setData on an 'empty' store does not work in extjs debug mode
setting store to '{}' here does create a store on component creation
so the store is not 'empty'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we updated the status from the status store too often, so that
if the guest agent was not running, the message would
change between 'no information' and 'not running'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
so that the user does not get the useless 'no information' or
'not running' message, but the real cause
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this adds a new component 'AgentIPView' which
uses the qemu-agent api call to tries to get the ip information for
the guests
only for vms at the moment, since for containers you already
set it on their network tab
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>