From: Dominik Csapak <d.csapak@proxmox.com>
To: Gabriel Goller <g.goller@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/2] lxc: show IPs in summary view
Date: Fri, 6 Dec 2024 13:45:27 +0100 [thread overview]
Message-ID: <503269dd-5dcf-42a8-bb13-bcaff428463c@proxmox.com> (raw)
In-Reply-To: <fdu4atfpmtwmnr3vpyvo67j2aw5gqid5v7qfudeywl7j3xtklb@mx36vrua4bbi>
On 12/5/24 18:28, Gabriel Goller wrote:
> 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".
>
wouldn't it also be possible to define some callbacks e.g. one for parsing/assigning,
one for privilege checking etc. (depending on what's exactly different)
> 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!
If the amount of if/else or callbacks, etc. is not immensely large,
i'd go for unifying them (and since the widget itself is not much
code to begin with, my guess is that it's just a few differences)
OFC if it turns out that some things must be done fundamentally different
between the two, you can keep it separated.
(Sometimes one has to try some options and look at the result
to see what's the better approach, so it's hard to give
a firm recommendation beforehand)
>
>>> + 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
next prev parent reply other threads:[~2024-12-06 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 10:46 [pve-devel] [PATCH manager 0/2] Show container ip in summary and network tab Gabriel Goller
2024-12-02 10:46 ` [pve-devel] [PATCH manager 1/2] lxc: show dynamically assigned IPs in " Gabriel Goller
2024-12-04 9:17 ` Dominik Csapak
2024-12-04 9:52 ` Gabriel Goller
2024-12-04 10:10 ` Dominik Csapak
2024-12-04 10:45 ` Gabriel Goller
2024-12-02 10:46 ` [pve-devel] [PATCH manager 2/2] lxc: show IPs in summary view Gabriel Goller
2024-12-04 9:25 ` Dominik Csapak
2024-12-05 17:28 ` Gabriel Goller
2024-12-06 12:45 ` Dominik Csapak [this message]
2024-12-06 9:44 ` Gabriel Goller
2024-12-10 15:08 ` [pve-devel] [PATCH manager 0/2] Show container ip in summary and network tab Gabriel Goller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503269dd-5dcf-42a8-bb13-bcaff428463c@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox