[Monitoring] Use 0 as the default for shard count if the node is not found (#21000)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
This commit is contained in:
Chris Roberson 2018-07-24 12:56:10 -04:00 committed by GitHub
parent 248b124339
commit 92dd341f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -151,7 +151,7 @@ Array [
},
},
"resolver": "_x_V2YzPQU-a9KRRBxUxZQ",
"shardCount": null,
"shardCount": 0,
"transport_address": "127.0.0.1:9300",
"type": "master",
},
@ -260,7 +260,7 @@ Array [
},
},
"resolver": "DAiX7fFjS3Wii7g2HYKrOg",
"shardCount": null,
"shardCount": 0,
"transport_address": "127.0.0.1:9301",
"type": "node",
},

View file

@ -16,7 +16,7 @@ Object {
"name": "node02",
"nodeTypeClass": "fa-server",
"nodeTypeLabel": "Node",
"shardCount": null,
"shardCount": 0,
"transport_address": "127.0.0.1:9301",
"type": "node",
},

View file

@ -35,7 +35,7 @@ export function mapNodesInfo(nodeHits, clusterStats, shardStats) {
isOnline,
nodeTypeLabel: nodeTypeLabel,
nodeTypeClass: nodeTypeClass,
shardCount: get(shardStats, `nodes[${sourceNode.uuid}].shardCount`, null),
shardCount: get(shardStats, `nodes[${sourceNode.uuid}].shardCount`, 0),
}
};
}, {});

View file

@ -109,7 +109,7 @@
"nodeTypeClass": "fa-server",
"nodeTypeLabel": "Node",
"resolver": "1jxg5T33TWub-jJL4qP0Wg",
"shardCount": null,
"shardCount": 0,
"transport_address": "127.0.0.1:9302",
"type": "node"
}