Sha256: 230cd75add8feadc15f2e89b005c172400e1ed96f3f48fdf1c3d0a0cb18e91bb

Contents?: true

Size: 803 Bytes

Versions: 9

Compression:

Stored size: 803 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';

import { translate as __ } from 'foremanReact/common/I18n';
import ConnectedChartBox from 'foremanReact/components/ChartBox';
import './StatisticsChartsListStyles.scss';

const StatisticsChartsList = ({ data }) => {
  const chartBoxes = Object.values(data).map(chart => (
    <ConnectedChartBox
      key={chart.id}
      type="donut"
      chart={chart}
      noDataMsg={__('No data available')}
      tip={__('Expand the chart')}
    />
  ));

  return (
    <div className="statistics-charts-list-root cards-pf">{chartBoxes}</div>
  );
};

StatisticsChartsList.propTypes = {
  data: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
};

StatisticsChartsList.defaultProps = {
  data: [],
};

export default StatisticsChartsList;

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_statistics-2.1.0 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-2.0.1 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-2.0.0 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-1.2.0 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-1.1.1 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-1.1.0 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-1.0.0 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-0.1.3 webpack/src/Components/StatisticsChartsList/index.js
foreman_statistics-0.1.2 webpack/src/Components/StatisticsChartsList/index.js