mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-31 08:11:45 +01:00
add indicator to nodeView state, cap bubble size in roofline
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrNoHostOrMetric is returned when the metric store does not find the host or the metric
|
// ErrNoHostOrMetric is returned when the metric store does not find the host or the metric
|
||||||
ErrNoHostOrMetric error = errors.New("[METRICSTORE]> [METRICSTORE]> metric or host not found")
|
ErrNoHostOrMetric error = errors.New("[METRICSTORE]> metric or host not found")
|
||||||
// ErrInvalidTimeRange is returned when a query has 'from' >= 'to'
|
// ErrInvalidTimeRange is returned when a query has 'from' >= 'to'
|
||||||
ErrInvalidTimeRange = errors.New("[METRICSTORE]> invalid time range: 'from' must be before 'to'")
|
ErrInvalidTimeRange = errors.New("[METRICSTORE]> invalid time range: 'from' must be before 'to'")
|
||||||
// ErrEmptyCluster is returned when a query with ForAllNodes has no cluster specified
|
// ErrEmptyCluster is returned when a query with ForAllNodes has no cluster specified
|
||||||
|
|||||||
@@ -176,7 +176,11 @@
|
|||||||
<InputGroupText><Icon name="clipboard2-pulse" /></InputGroupText>
|
<InputGroupText><Icon name="clipboard2-pulse" /></InputGroupText>
|
||||||
<InputGroupText>Node State</InputGroupText>
|
<InputGroupText>Node State</InputGroupText>
|
||||||
<Button class="flex-grow-1 text-center" color={stateColors[thisNodeState]} disabled>
|
<Button class="flex-grow-1 text-center" color={stateColors[thisNodeState]} disabled>
|
||||||
{thisNodeState}
|
{#if $nodeMetricsData?.data}
|
||||||
|
{thisNodeState}
|
||||||
|
{:else}
|
||||||
|
<span><Spinner size="sm" secondary/></span>
|
||||||
|
{/if}
|
||||||
</Button>
|
</Button>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
/* Const Init */
|
/* Const Init */
|
||||||
const lineWidth = 2 // clusterCockpitConfig.plotConfiguration_lineWidth;
|
const lineWidth = 2 // clusterCockpitConfig.plotConfiguration_lineWidth;
|
||||||
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
const cbmode = clusterCockpitConfig?.plotConfiguration_colorblindMode || false;
|
||||||
|
const bubbleSizeMax = 50;
|
||||||
|
|
||||||
/* Var Init */
|
/* Var Init */
|
||||||
let timeoutId = null;
|
let timeoutId = null;
|
||||||
@@ -317,9 +318,14 @@
|
|||||||
size = sizeBase + scaling
|
size = sizeBase + scaling
|
||||||
// Nodes: Size based on Jobcount
|
// Nodes: Size based on Jobcount
|
||||||
} else if (nodesData) {
|
} else if (nodesData) {
|
||||||
size = sizeBase + (nodesData[i]?.numJobs * 1.5) // Max Jobs Scale: 8 * 1.5 = 12
|
size = sizeBase + (nodesData[i]?.numJobs * 1.5)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Apply Size Capping
|
||||||
|
if (size >= bubbleSizeMax) {
|
||||||
|
size = bubbleSizeMax;
|
||||||
|
}
|
||||||
|
|
||||||
if (xVal >= filtLft && xVal <= filtRgt && yVal >= filtBtm && yVal <= filtTop) {
|
if (xVal >= filtLft && xVal <= filtRgt && yVal >= filtBtm && yVal <= filtTop) {
|
||||||
let cx = valToPosX(xVal, scaleX, xDim, xOff);
|
let cx = valToPosX(xVal, scaleX, xDim, xOff);
|
||||||
let cy = valToPosY(yVal, scaleY, yDim, yOff);
|
let cy = valToPosY(yVal, scaleY, yDim, yOff);
|
||||||
|
|||||||
Reference in New Issue
Block a user