[pdm-devel] [PATCH proxmox-datacenter-manager 3/4] ui: pve: move node overview to a new overview tab

Lukas Wagner l.wagner at proxmox.com
Wed Sep 3 11:55:23 CEST 2025


On Wed Sep 3, 2025 at 11:52 AM CEST, Stefan Hanreich wrote:
> On 9/3/25 11:47 AM, Lukas Wagner wrote:
>> On Wed Sep 3, 2025 at 11:10 AM CEST, Stefan Hanreich wrote:
>>> one small nit inline (pre-existing) I noticed while looking over the changes
>>>
>>>> +impl yew::Component for NodeOverviewPanelComp {
>>>> +    type Message = Msg;
>>>> +    type Properties = NodeOverviewPanel;
>>>> +
>>>> +    fn create(ctx: &yew::Context<Self>) -> Self {
>>>> +        ctx.link().send_message(Msg::ReloadRrd);
>>>> +        ctx.link().send_message(Msg::ReloadStatus);
>>>> +        Self {
>>>> +            time_data: Rc::new(Vec::new()),> +            cpu_data: Rc::new(Series::new("", Vec::new())),
>>>> +            load_data: Rc::new(Series::new("", Vec::new())),
>>>> +            mem_data: Rc::new(Series::new("", Vec::new())),
>>>> +            mem_total_data: Rc::new(Series::new("", Vec::new())),
>>>
>>> pre-existing but this could profit from a Default implementation
>>>
>> 
>> Mhhm, does that make sense though? Default::default is off course
>> public, and it does not really make much sense to offer a second way to
>> instantiate the component that is not `create`... but maybe I'm missing
>> something here.
>
> I meant Series itself, sorry if that wasn't clear. Then we could use
> Default::default here for a lot of the fields.

Ah, got you.
Yes, that would of course make sense. Should be done in a separate
patch, I would suggest.





More information about the pdm-devel mailing list