On 04.12.2024 10:25, Dominik Csapak wrote:
high level comments/questions (i know they're not you're patches exactly, but 
still):

* maybe it would be better to integrate this into the AgentIPView for vms?
 AFAICS the code is very similar and probably just needs a few adaptions
 to work there too (url,parsing, etc.)

 I'm not opposed to have two components, but then we should at least have
 a good reason in the commit message why this was not done, e.g.
 the data structures are too different, or something like that

* IMHO we should keep the columns consistent between VMs and Containers,
 So either we change the AgentIPView to name/mac/ipv4/ipv6 too
 or we combine the ipv4/ipv6 here

Hmm I had a quick glance at the AgentIPView and while there is a lot of
the same code, I fear that I will have to do a lot of "if container do
this, otherwise do that".

Although we could make one generic panel for both, removing all the
mentions of "Agent" in the name/title though.

Let me know what you prefer!

+    startIPStore: function(store, records, success) {
+       var me = this;
+       let state = store.getById('status');
+
+       me.running = state && state.data.value === 'running';
+
+       var caps = Ext.state.Manager.get('GuiCap');
+
+       if (!caps.vms['VM.Monitor']) {

the api call for getting the interfaces does not really need this permission?
the api only needs 'vm.audit' for this information, so this check should 
reflect that

Ack.

+           var errorText = gettext("Requires '{0}' Privileges");
+           me.updateStatus(false, Ext.String.format(errorText, 'VM.Monitor'));
+           return;
+       }


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to