[pdm-devel] [PATCH proxmox-datacenter-manager 3/4] ui: pve: move node overview to a new overview tab
Stefan Hanreich
s.hanreich at proxmox.com
Wed Sep 3 11:52:05 CEST 2025
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.
More information about the pdm-devel
mailing list