mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
This commit is contained in:
parent
43dc53f17a
commit
7baa76aa7d
3 changed files with 9 additions and 5 deletions
|
@ -15,8 +15,8 @@ import { EuiMonitoringTable } from '../../table';
|
|||
import { injectI18n } from '@kbn/i18n/react';
|
||||
|
||||
class PipelineListingUI extends Component {
|
||||
tooltipXValueFormatter(xValue) {
|
||||
return moment(xValue).format(this.props.dateFormat);
|
||||
tooltipXValueFormatter(xValue, dateFormat) {
|
||||
return moment(xValue).format(dateFormat);
|
||||
}
|
||||
|
||||
tooltipYValueFormatter(yValue, format, units) {
|
||||
|
@ -24,7 +24,7 @@ class PipelineListingUI extends Component {
|
|||
}
|
||||
|
||||
getColumns() {
|
||||
const { onBrush } = this.props;
|
||||
const { onBrush, dateFormat } = this.props;
|
||||
const { kbnUrl, scope } = this.props.angular;
|
||||
|
||||
return [
|
||||
|
@ -61,7 +61,7 @@ class PipelineListingUI extends Component {
|
|||
series={throughput.data}
|
||||
onBrush={onBrush}
|
||||
tooltip={{
|
||||
xValueFormatter: value => this.tooltipXValueFormatter(value),
|
||||
xValueFormatter: value => this.tooltipXValueFormatter(value, dateFormat),
|
||||
yValueFormatter: partialRight(this.tooltipYValueFormatter, throughput.metric.format, throughput.metric.units)
|
||||
}}
|
||||
options={{ xaxis: throughput.timeRange }}
|
||||
|
@ -93,7 +93,7 @@ class PipelineListingUI extends Component {
|
|||
series={nodesCount.data}
|
||||
onBrush={onBrush}
|
||||
tooltip={{
|
||||
xValueFormatter: this.tooltipXValueFormatter,
|
||||
xValueFormatter: value => this.tooltipXValueFormatter(value, dateFormat),
|
||||
yValueFormatter: partialRight(this.tooltipYValueFormatter, nodesCount.metric.format, nodesCount.metric.units)
|
||||
}}
|
||||
options={{ xaxis: nodesCount.timeRange }}
|
||||
|
|
|
@ -72,6 +72,7 @@ uiRoutes
|
|||
controller: class extends MonitoringViewBaseEuiTableController {
|
||||
constructor($injector, $scope, i18n) {
|
||||
const kbnUrl = $injector.get('kbnUrl');
|
||||
const config = $injector.get('config');
|
||||
|
||||
super({
|
||||
defaultData: {},
|
||||
|
@ -103,6 +104,7 @@ uiRoutes
|
|||
sorting={this.sorting}
|
||||
pagination={this.pagination}
|
||||
onTableChange={this.onTableChange}
|
||||
dateFormat={config.get('dateFormat')}
|
||||
upgradeMessage={makeUpgradeMessage(data.nodeSummary.version, i18n)}
|
||||
angular={{
|
||||
kbnUrl,
|
||||
|
|
|
@ -78,6 +78,7 @@ uiRoutes
|
|||
|
||||
const $route = $injector.get('$route');
|
||||
const kbnUrl = $injector.get('kbnUrl');
|
||||
const config = $injector.get('config');
|
||||
this.data = $route.current.locals.pageData;
|
||||
const globalState = $injector.get('globalState');
|
||||
$scope.cluster = find($route.current.locals.clusters, { cluster_uuid: globalState.cluster_uuid });
|
||||
|
@ -110,6 +111,7 @@ uiRoutes
|
|||
pagination={this.pagination}
|
||||
onTableChange={this.onTableChange}
|
||||
upgradeMessage={upgradeMessage}
|
||||
dateFormat={config.get('dateFormat')}
|
||||
angular={{
|
||||
kbnUrl,
|
||||
scope: $scope,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue