From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: [pve-devel] applied: [PATCH pve-flutter-frontend] fix #4749: correctly show lxc rrd data
Date: Tue, 4 Jul 2023 17:29:46 +0200 [thread overview]
Message-ID: <07193859-9d37-eb12-a5e2-45f2512ac956@proxmox.com> (raw)
In-Reply-To: <20230704135350.3291371-1-d.csapak@proxmox.com>
Am 04/07/2023 um 15:53 schrieb Dominik Csapak:
> like we do for qemu guest, by multiplying cpu usage by 100
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> lib/bloc/pve_lxc_overview_bloc.dart | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
applied, thanks!
> +
> + Future<List<PveGuestRRDdataModel>> _preProcessRRDdata() async {
> + final rrddata = (await apiClient.getNodeQemuRRDdata(
> + latestState.nodeID, guestID, PveRRDTimeframeType.hour))
> + .map((element) => element.cpu != null
> + ? element.rebuild((e) => e..cpu = e.cpu! * 100)
> + : element)
> + .toList();
> + return rrddata;
> + }
> }
The intermediate await could have been avoided using .then(...), but not really nicer:
Future<List<PveGuestRRDdataModel>> _preProcessRRDdata() async {
return apiClient
.getNodeQemuRRDdata(
latestState.nodeID, guestID, PveRRDTimeframeType.hour)
.then((data) => data
.map((element) => element.cpu != null
? element.rebuild((e) => e..cpu = e.cpu! * 100)
: element)
.toList());
}
prev parent reply other threads:[~2023-07-04 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 13:53 [pve-devel] " Dominik Csapak
2023-07-04 15:29 ` Thomas Lamprecht [this message]
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=07193859-9d37-eb12-a5e2-45f2512ac956@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@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