import _ from 'lodash'; import React from 'react'; import { rowGutter } from './util/Utils.js'; import TabbedMetricsTable from './TabbedMetricsTable.jsx'; import { Col, Row } from 'antd'; const maxTsToFetch = 15; export default class UpstreamDownstreamTables extends React.Component { render() { let numUpstreams = _.size(this.props.upstreamMetrics); let numDownstreams = _.size(this.props.downstreamMetrics); return ( { numUpstreams === 0 ? null :
Upstream {this.props.resource}s: {numUpstreams}
maxTsToFetch} lastUpdated={this.props.lastUpdated} metrics={this.props.upstreamMetrics} metricsWindow={this.props.metricsWindow} pathPrefix={this.props.pathPrefix} />
} { numDownstreams === 0 ? null :
Downstream {this.props.resource}s: {numDownstreams}
maxTsToFetch} lastUpdated={this.props.lastUpdated} metrics={this.props.downstreamMetrics} metricsWindow={this.props.metricsWindow} pathPrefix={this.props.pathPrefix} />
}
); } }