mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
E.g. greying out the bottom 2/3 visual nodes if the stack actually only has a single node. - Server returns "node_count" for agg nodes.
23 lines
590 B
JavaScript
23 lines
590 B
JavaScript
import React from 'react';
|
|
|
|
export default function NodeShapeCircle({onlyHighlight, highlighted, size, color}) {
|
|
const hightlightNode = <circle r={size * 0.7} className="highlighted" />;
|
|
|
|
if (onlyHighlight) {
|
|
return (
|
|
<g className="shape">
|
|
{highlighted && hightlightNode}
|
|
</g>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<g className="shape">
|
|
{highlighted && hightlightNode}
|
|
<circle r={size * 0.5} className="border" stroke={color} />
|
|
<circle r={size * 0.45} className="shadow" />
|
|
<circle r={Math.max(2, size * 0.125)} className="node" />
|
|
</g>
|
|
);
|
|
}
|