mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Add Kubernetes volumes support in Weave Scope
This will - Add Kubernetes volume resources such as PV, PVC. - Add shapes for Kubernetes PV and PVC - Add `Cylinder` shape for PV and `Dotted Cylinder` shape for PVC. Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import range from 'lodash/range';
|
||||
import { line, curveCardinalClosed } from 'd3-shape';
|
||||
|
||||
import { UNIT_CLOUD_PATH } from '../constants/styles';
|
||||
import { UNIT_CLOUD_PATH, UNIT_CYLINDER_PATH } from '../constants/styles';
|
||||
|
||||
|
||||
export const pathElement = React.createFactory('path');
|
||||
@@ -13,7 +13,6 @@ function curvedUnitPolygonPath(n) {
|
||||
const curve = curveCardinalClosed.tension(0.65);
|
||||
const spline = line().curve(curve);
|
||||
const innerAngle = (2 * Math.PI) / n;
|
||||
|
||||
return spline(range(0, n).map(k => [
|
||||
Math.sin(k * innerAngle),
|
||||
-Math.cos(k * innerAngle),
|
||||
@@ -30,3 +29,5 @@ export const hexagonShapeProps = { d: curvedUnitPolygonPath(6) };
|
||||
export const heptagonShapeProps = { d: curvedUnitPolygonPath(7) };
|
||||
export const octagonShapeProps = { d: curvedUnitPolygonPath(8) };
|
||||
export const cloudShapeProps = { d: UNIT_CLOUD_PATH };
|
||||
export const cylinderShapeProps = { d: UNIT_CYLINDER_PATH };
|
||||
export const dottedCylinderShapeProps = { d: UNIT_CYLINDER_PATH };
|
||||
Reference in New Issue
Block a user