mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use allocatable instead of capacity for node resources. (#2098)
This commit is contained in:
1 parent
9b04e611a4
commit
008e516715
8 files changed
+108
-20
No files matched your search
@@ -47,11 +47,14 @@ export const NodeCharts = observer(() => {
|
||||
|
||||
const {
|
||||
memoryUsage,
|
||||
workloadMemoryUsage,
|
||||
memoryRequests,
|
||||
memoryCapacity,
|
||||
memoryAllocatableCapacity,
|
||||
cpuUsage,
|
||||
cpuRequests,
|
||||
cpuCapacity,
|
||||
cpuAllocatableCapacity,
|
||||
podUsage,
|
||||
podCapacity,
|
||||
fsSize,
|
||||
@@ -75,6 +78,13 @@ export const NodeCharts = observer(() => {
|
||||
borderColor: "#30b24d",
|
||||
data: cpuRequests.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: `${id}-cpuAllocatableCapacity`,
|
||||
label: `Allocatable Capacity`,
|
||||
tooltip: `CPU allocatable capacity`,
|
||||
borderColor: "#032b4d",
|
||||
data: cpuAllocatableCapacity.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: `${id}-cpuCapacity`,
|
||||
label: `Capacity`,
|
||||
@@ -92,6 +102,13 @@ export const NodeCharts = observer(() => {
|
||||
borderColor: "#c93dce",
|
||||
data: memoryUsage.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: `${id}-workloadMemoryUsage`,
|
||||
label: `Workload Memory Usage`,
|
||||
tooltip: `Workload memory usage`,
|
||||
borderColor: "#9cd3ce",
|
||||
data: workloadMemoryUsage.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: "memoryRequests",
|
||||
label: `Requests`,
|
||||
@@ -99,6 +116,13 @@ export const NodeCharts = observer(() => {
|
||||
borderColor: "#30b24d",
|
||||
data: memoryRequests.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: `${id}-memoryAllocatableCapacity`,
|
||||
label: `Allocatable Capacity`,
|
||||
tooltip: `Memory allocatable capacity`,
|
||||
borderColor: "#032b4d",
|
||||
data: memoryAllocatableCapacity.map(([x, y]) => ({ x, y }))
|
||||
},
|
||||
{
|
||||
id: `${id}-memoryCapacity`,
|
||||
label: `Capacity`,
|
||||
@@ -148,7 +172,7 @@ export const NodeCharts = observer(() => {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
callback: value => value
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
tooltips: {
|
||||
|
||||
@@ -97,7 +97,7 @@ export class Nodes extends React.Component<Props> {
|
||||
}
|
||||
|
||||
renderMemoryUsage(node: Node) {
|
||||
const metrics = nodesStore.getLastMetricValues(node, ["memoryUsage", "memoryCapacity"]);
|
||||
const metrics = nodesStore.getLastMetricValues(node, ["workloadMemoryUsage", "memoryAllocatableCapacity"]);
|
||||
|
||||
if (!metrics || !metrics[1]) return <LineProgress value={0}/>;
|
||||
const usage = metrics[0];
|
||||
|
||||
Reference in new issue
Block a user