mirror of https://github.com/apache/lucene.git
SOLR-3312 Remove static reference to schema/solrconfig
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1325268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e166ebdd2c
commit
c23ba0564c
|
@ -809,6 +809,8 @@ public class CoreAdminHandler extends RequestHandlerBase {
|
|||
info.add("name", core.getName());
|
||||
info.add("instanceDir", normalizePath(core.getResourceLoader().getInstanceDir()));
|
||||
info.add("dataDir", normalizePath(core.getDataDir()));
|
||||
info.add("config", core.getConfigResource());
|
||||
info.add("schema", core.getSchemaResource());
|
||||
info.add("startTime", new Date(core.getStartTime()));
|
||||
info.add("uptime", System.currentTimeMillis() - core.getStartTime());
|
||||
RefCounted<SolrIndexSearcher> searcher = core.getSearcher();
|
||||
|
|
|
@ -46,8 +46,6 @@ limitations under the License.
|
|||
|
||||
app_config.solr_path = '${contextPath}';
|
||||
app_config.core_admin_path = '${adminPath}';
|
||||
app_config.schema_path = '/admin/file?file=schema.xml&contentType=text/xml;charset=utf-8';
|
||||
app_config.config_path = '/admin/file?file=solrconfig.xml&contentType=text/xml;charset=utf-8';
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -169,14 +169,16 @@ var solr_admin = function( app_config )
|
|||
}
|
||||
else
|
||||
{
|
||||
self.menu_element
|
||||
self.menu_element
|
||||
.addClass( 'singlecore' );
|
||||
}
|
||||
|
||||
for( var core_name in response.status )
|
||||
{
|
||||
var core_path = config.solr_path + '/' + core_name;
|
||||
|
||||
var schema = response['status'][core_name]['schema'];
|
||||
var solrconfig = response['status'][core_name]['config'];
|
||||
|
||||
if( !core_name )
|
||||
{
|
||||
core_name = 'singlecore';
|
||||
|
@ -188,7 +190,7 @@ var solr_admin = function( app_config )
|
|||
environment_basepath = core_path;
|
||||
}
|
||||
|
||||
var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '">' + "\n"
|
||||
var core_tpl = '<li id="' + core_name + '" data-basepath="' + core_path + '" schema="' + schema + '" config="' + solrconfig + '">' + "\n"
|
||||
+ ' <p><a href="#/' + core_name + '">' + core_name + '</a></p>' + "\n"
|
||||
+ ' <ul>' + "\n"
|
||||
|
||||
|
|
|
@ -22,11 +22,13 @@ sammy.get
|
|||
function( context )
|
||||
{
|
||||
var core_basepath = this.active_core.attr( 'data-basepath' );
|
||||
var filetype = context.params.splat[1]; // either schema or config
|
||||
var filename = this.active_core.attr( filetype );
|
||||
|
||||
$.ajax
|
||||
(
|
||||
{
|
||||
url : core_basepath + app.config[ context.params.splat[1] + '_path' ],
|
||||
url : core_basepath + "/admin/file?file=" + filename + "&contentType=text/xml;charset=utf-8",
|
||||
dataType : 'xml',
|
||||
context : $( '#content' ),
|
||||
beforeSend : function( xhr, settings )
|
||||
|
|
Loading…
Reference in New Issue