import React from 'react'; import PropTypes from 'prop-types'; import { Grid, DonutChart } from 'patternfly-react'; import { translate as __ } from 'foremanReact/common/I18n'; import './statusChart.scss'; const StatusChart = ({ completed }) => { const donutConfigData = { columns: [ [__('Completed'), completed], [__('Remain'), 100 - completed], ], order: null, }; const pfGetUtilizationDonutTooltipContents = d => { const { 0: { name, value }, } = d; return `${value}% ${name}`; }; const donutConfigTooltip = { contents: pfGetUtilizationDonutTooltipContents, }; return (
); }; StatusChart.propTypes = { completed: PropTypes.number, }; StatusChart.defaultProps = { completed: 0, }; export default StatusChart;