SOLR-3326: Link search components to their MBean info

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1324895 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2012-04-11 17:58:31 +00:00
parent d0e07e8f8c
commit 12d826b264
2 changed files with 11 additions and 7 deletions

View File

@ -101,7 +101,6 @@ public abstract class SearchComponent implements SolrInfoMBean, NamedListInitial
}
public NamedList getStatistics() {
NamedList lst = new SimpleOrderedMap();
return lst;
return null;
}
}

View File

@ -211,12 +211,17 @@ var render_plugin_data = function( plugin_data, plugin_sort, types )
if( 'description' === detail_key )
{
// For list of components
// Link component list to their MBeans page
if(detail_value.match(/^Search using components: /)) {
detail_value = detail_value
.replace( /: /, ':<ul><li>' )
.replace( /,/g, '</li><li>' ) +
"</li></ul>";
var idx = detail_value.indexOf(':');
var url = '#/'+active_context.params.splat[0]+'/plugins/other?entry=';
var tmp = 'Search using components:<ul>';
$.each(detail_value.substr(idx+1).split(","), function(index, value) {
value = $.trim(value);
tmp += '<li><a href="'+url+value+'" class="linker">'+value+"</a></li>";
});
tmp += "</ul>";
detail_value = tmp;
}
}