Commit Graph

17 Commits

Author SHA1 Message Date
Friedrich Weber
adfa98cc88 ui: qemu network IPs: fix error reporting
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>
2024-12-16 17:44:05 +01:00
Dominik Csapak
a44a318b62 ui: qemu network IPs: htmlEncode backend supplied values
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>
2024-12-16 17:44:05 +01:00
Aaron Lauterer
6d336ba433 ui: vm: guest-agent network view: make text in grid selectable
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>
2024-03-21 17:56:42 +01:00
Dominic Jäger
91a47a766f ui: eslint: State equalities more precisely
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
55ee6ba132 ui: eslint: No unused or duplicate variables
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
46d9a35c33 ui: eslint: fix usage of 'me'
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Dominik Csapak
c84c5c9ad7 ui: qemu/AgentIPView: also filter out 0:0:0:0:0:0
it seems that some guest-agents format an non-existant mac adress
differently (e.g. macos, see [0]) so filter that also out

0: https://forum.proxmox.com/threads/macos-vm-optischer-makel.76263/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-09-23 15:09:58 +02:00
Thomas Lamprecht
6386068d0e ui: call more update store functions in the store scope
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-09 16:45:22 +02:00
Thomas Lamprecht
aa85713036 manager: startIPStore: status can be null/undef
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-27 19:09:10 +01:00
Dominik Csapak
3098f188b3 gui: fix debug-mode error
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>
2019-07-17 13:01:31 +02:00
Dominik Csapak
2283cff333 correctly update qemu ip information
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>
2018-05-25 10:44:05 +02:00
Dominik Csapak
203829c718 only show 'more' buttons for ips when there are actually ips to show
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-25 10:43:59 +02:00
Dominik Csapak
5fa6f3205a check for VM.Montior privileges on qemu AgentIPView
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>
2018-05-25 10:43:47 +02:00
Dominik Csapak
e7f07a2efc show guest-agent provided ip address in qemu summary
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>
2018-02-23 11:01:28 +01:00