Fixes from the demo (#23922)

This commit is contained in:
Chris Roberson 2018-10-18 09:05:27 -04:00 committed by GitHub
parent 8fc52b4c9e
commit f382ee2d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 43 deletions

View file

@ -27,8 +27,8 @@ exports[`Ccr that it renders normally 1`] = `
"sortable": true,
},
Object {
"field": "opsSynced",
"name": "Ops synced",
"field": "syncLagOps",
"name": "Sync Lag (ops)",
"sortable": true,
},
Object {
@ -38,8 +38,8 @@ exports[`Ccr that it renders normally 1`] = `
"sortable": true,
},
Object {
"field": "syncLagOps",
"name": "Sync Lag (ops)",
"field": "opsSynced",
"name": "Ops synced",
"sortable": true,
},
Object {

View file

@ -66,15 +66,6 @@ export class Ccr extends Component {
{
render: () => null
},
{
field: 'opsSynced',
name: 'Ops synced'
},
{
field: 'syncLagTime',
name: 'Last fetch time',
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'syncLagOps',
name: 'Sync Lag (ops)',
@ -97,6 +88,15 @@ export class Ccr extends Component {
</span>
)
},
{
field: 'syncLagTime',
name: 'Last fetch time',
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'opsSynced',
name: 'Ops synced'
},
{
field: 'error',
name: 'Error',
@ -160,9 +160,9 @@ export class Ccr extends Component {
name: 'Follows'
},
{
field: 'opsSynced',
field: 'syncLagOps',
sortable: true,
name: 'Ops synced'
name: 'Sync Lag (ops)',
},
{
field: 'syncLagTime',
@ -171,9 +171,9 @@ export class Ccr extends Component {
render: syncLagTime => <span>{toSeconds(syncLagTime)}</span>
},
{
field: 'syncLagOps',
field: 'opsSynced',
sortable: true,
name: 'Sync Lag (ops)',
name: 'Ops synced'
},
{
field: 'error',

View file

@ -27,8 +27,8 @@ export class CcrShard extends PureComponent {
renderCharts() {
const { metrics } = this.props;
const seriesToShow = [
metrics.ccr_sync_lag_time,
metrics.ccr_sync_lag_ops
metrics.ccr_sync_lag_ops,
metrics.ccr_sync_lag_time
];
const charts = seriesToShow.map((data, index) => (

View file

@ -37,17 +37,6 @@ function buildRequest(req, config, esIndexPattern) {
field: 'ccr_stats.number_of_operations_indexed'
}
},
last_fetch_time_max: {
max: {
field: 'ccr_stats.time_since_last_fetch_millis'
}
},
last_fetch_time_min: {
min: {
field: 'ccr_stats.time_since_last_fetch_millis'
}
},
lag_ops_leader_max: {
max: {
field: 'ccr_stats.leader_max_seq_no'
@ -79,7 +68,6 @@ function buildRequest(req, config, esIndexPattern) {
}
},
last_fetch_time: getBucketScript('last_fetch_time_max', 'last_fetch_time_min'),
ops_synced: getBucketScript('ops_synced_max', 'ops_synced_min'),
lag_ops_leader: getBucketScript('lag_ops_leader_max', 'lag_ops_leader_min'),
lag_ops_global: getBucketScript('lag_ops_global_max', 'lag_ops_global_min'),
@ -96,10 +84,10 @@ function buildRequest(req, config, esIndexPattern) {
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.fetch_exceptions',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.follower_index',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.shard_id',
'hits.hits.inner_hits.by_shard.hits.hits._source.ccr_stats.time_since_last_fetch_millis',
'aggregations.by_follower_index.buckets.key',
'aggregations.by_follower_index.buckets.leader_index.buckets.key',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.key',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.last_fetch_time.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.ops_synced.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.lag_ops.value',
'aggregations.by_follower_index.buckets.by_shard_id.buckets.leader_lag_ops.value',
@ -231,7 +219,7 @@ export function ccrRoute(server) {
shardId: shardBucket.key,
error: fullStat.fetch_exceptions.length ? fullStat.fetch_exceptions[0].exception.type : null,
opsSynced: get(shardBucket, 'ops_synced.value'),
syncLagTime: get(shardBucket, 'last_fetch_time.value'),
syncLagTime: fullStat.time_since_last_fetch_millis,
syncLagOps: get(shardBucket, 'lag_ops.value'),
syncLagOpsLeader: get(shardBucket, 'leader_lag_ops.value'),
syncLagOpsFollower: get(shardBucket, 'follower_lag_ops.value'),

View file

@ -7,7 +7,7 @@
"shardId": 0,
"error": null,
"opsSynced": 52,
"syncLagTime": 59881,
"syncLagTime": 4900,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -15,7 +15,7 @@
"shardId": 1,
"error": null,
"opsSynced": 47,
"syncLagTime": 59959,
"syncLagTime": 9919,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -23,7 +23,7 @@
"shardId": 2,
"error": null,
"opsSynced": 51,
"syncLagTime": 55229,
"syncLagTime": 14929,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -31,7 +31,7 @@
"shardId": 3,
"error": null,
"opsSynced": 50,
"syncLagTime": 50483,
"syncLagTime": 39933,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -39,13 +39,13 @@
"shardId": 4,
"error": null,
"opsSynced": 55,
"syncLagTime": 55554,
"syncLagTime": 49923,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}],
"opsSynced": 255,
"syncLagTime": 59959,
"syncLagTime": 49923,
"syncLagOps": 0
}, {
"id": "follower",
@ -55,7 +55,7 @@
"shardId": 0,
"error": null,
"opsSynced": 85,
"syncLagTime": 45513,
"syncLagTime": 19886,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -63,7 +63,7 @@
"shardId": 1,
"error": null,
"opsSynced": 94,
"syncLagTime": 55205,
"syncLagTime": 4901,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
@ -71,13 +71,13 @@
"shardId": 2,
"error": null,
"opsSynced": 76,
"syncLagTime": 50003,
"syncLagTime": 14899,
"syncLagOps": 0,
"syncLagOpsLeader": 0,
"syncLagOpsFollower": 0
}],
"opsSynced": 255,
"syncLagTime": 55205,
"syncLagTime": 19886,
"syncLagOps": 0
}]
}