Cat api: added node id column to _cat/plugins response

relates to #10226
This commit is contained in:
Leonardo Menezes 2015-03-24 23:51:09 +01:00 committed by Luca Cavanna
parent d086648cec
commit 5feaa484b5
3 changed files with 19 additions and 1 deletions

View File

@ -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
$/

View File

@ -77,6 +77,7 @@ public class RestPluginsAction extends AbstractCatAction {
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");
@ -96,6 +97,7 @@ public class RestPluginsAction extends AbstractCatAction {
for (PluginInfo pluginInfo : info.getPlugins().getInfos()) {
table.startRow();
table.addCell(node.id());
table.addCell(node.name());
table.addCell(pluginInfo.getName());
table.addCell(pluginInfo.getVersion());

View File

@ -88,7 +88,7 @@ public class RestSegmentsAction extends AbstractCatAction {
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");