alias Phoenix.LiveDashboard.PageBuilder
<PageBuilder.shared_usage_card
title="Resource Usage"
hint="Aggregated"
dom_id="shared-usage"
inner_title={:nil}
inner_hint={:nil}
csp_nonces={
%{
style: "nonce"
}
}
total_data={
[
{"user", 35.5, "red", nil},
{"system", 10.2, "blue", "Kernel time"}
]
}
total_formatter={&Phoenix.LiveDashboard.LiveCaptureFactory.total_formatter/1}
total_legend="Total"
total_usage="45.7%"
usages={
[...]
[
%{
data: [
{"user", 35.5, "red", nil},
{"system", 10.2, "blue", "Kernel time"}
],
title: "CPU",
dom_id: "cpu"
}
]
}
/>