import BaseTable from './BaseTable.jsx'; import PropTypes from 'prop-types'; import React from 'react'; import SuccessRateMiniChart from './util/SuccessRateMiniChart.jsx'; import { Trans } from '@lingui/macro'; import { metricToFormatter } from './util/Utils.js'; const routesColumns = [ { title: columnTitleRoute, dataIndex: 'route', filter: d => d.route, sorter: d => d.route, }, { title: columnTitleService, tooltip: 'hostname:port used when communicating with this target', dataIndex: 'authority', filter: d => d.authority, sorter: d => d.authority, }, { title: columnTitleSuccessRate, dataIndex: 'successRate', isNumeric: true, render: d => , sorter: d => d.successRate, }, { title: columnTitleRPS, dataIndex: 'requestRate', isNumeric: true, render: d => metricToFormatter.NO_UNIT(d.requestRate), sorter: d => d.requestRate, }, { title: columnTitleP50Latency, dataIndex: 'latency.P50', isNumeric: true, render: d => metricToFormatter.LATENCY(d.latency.P50), sorter: d => d.latency.P50, }, { title: columnTitleP95Latency, dataIndex: 'latency.P95', isNumeric: true, render: d => metricToFormatter.LATENCY(d.latency.P95), sorter: d => d.latency.P95, }, { title: columnTitleP99Latency, dataIndex: 'latency.P99', isNumeric: true, render: d => metricToFormatter.LATENCY(d.latency.P99), sorter: d => d.latency.P99, }, ]; const TopRoutesTable = ({ rows }) => ( r.route + r.authority} padding="dense" /> ); TopRoutesTable.propTypes = { rows: PropTypes.arrayOf(PropTypes.shape({})), }; TopRoutesTable.defaultProps = { rows: [], }; export default TopRoutesTable;