Skip to content

Commit

Permalink
Cat api: added node id column to _cat/plugins response
Browse files Browse the repository at this point in the history
relates to elastic#10226
  • Loading branch information
Leonardo Menezes authored and javanna committed Mar 25, 2015
1 parent d086648 commit 5feaa48
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions rest-api-spec/test/cat.plugins/10_basic.yaml
@@ -0,0 +1,16 @@
---
"Help":
- do:
cat.plugins:
help: true

- match:
$body: |
/^ id .+ \n
name .+ \n
component .+ \n
version .+ \n
type .+ \n
url .+ \n
description .+ \n
$/
Expand Up @@ -77,6 +77,7 @@ public RestResponse buildResponse(final NodesInfoResponse nodesInfoResponse) thr
Table getTableWithHeader(final RestRequest request) {
Table table = new Table();
table.startHeaders();
table.addCell("id", "default:false;desc:unique node id");
table.addCell("name", "alias:n;desc:node name");
table.addCell("component", "alias:c;desc:component");
table.addCell("version", "alias:v;desc:component version");
Expand All @@ -96,6 +97,7 @@ private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoR

for (PluginInfo pluginInfo : info.getPlugins().getInfos()) {
table.startRow();
table.addCell(node.id());
table.addCell(node.name());
table.addCell(pluginInfo.getName());
table.addCell(pluginInfo.getVersion());
Expand Down
Expand Up @@ -88,7 +88,7 @@ Table getTableWithHeader(RestRequest request) {
table.addCell("shard", "default:true;alias:s,sh;desc:shard name");
table.addCell("prirep", "alias:p,pr,primaryOrReplica;default:true;desc:primary or replica");
table.addCell("ip", "default:true;desc:ip of node where it lives");
table.addCell("id", "default:false;desc:unique id node where it lives");
table.addCell("id", "default:false;desc:unique id of node where it lives");
table.addCell("segment", "default:true;alias:seg;desc:segment name");
table.addCell("generation", "default:true;alias:g,gen;text-align:right;desc:segment generation");
table.addCell("docs.count", "default:true;alias:dc,docsCount;text-align:right;desc:number of docs in segment");
Expand Down

0 comments on commit 5feaa48

Please sign in to comment.