From d8df3a2d5520956a6d9eeed369814de6cd60cb8b Mon Sep 17 00:00:00 2001 From: Stefan Matheis Date: Wed, 27 Mar 2013 08:40:22 +0000 Subject: [PATCH] SOLR-4405: Admin UI - admin-extra files are not rendered into the core-menu git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1461447 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 2 ++ .../solr/collection1/conf/admin-extra.html | 17 ++++--------- .../conf/admin-extra.menu-bottom.html | 24 +++++++++++++++++++ .../conf/admin-extra.menu-top.html | 24 +++++++++++++++++++ solr/webapp/web/js/scripts/dashboard.js | 15 ++++++------ 5 files changed, 62 insertions(+), 20 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 49794c98ce0..952d14193b8 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -99,6 +99,8 @@ Bug Fixes * SOLR-4636: If opening a reader fails for some reason when opening a SolrIndexSearcher, a Directory can be left unreleased. (Mark Miller) +* SOLR-4405: Admin UI - admin-extra files are not rendered into the core-menu (steffkes) + Optimizations ---------------------- diff --git a/solr/example/solr/collection1/conf/admin-extra.html b/solr/example/solr/collection1/conf/admin-extra.html index aa739da862c..fecab20513d 100644 --- a/solr/example/solr/collection1/conf/admin-extra.html +++ b/solr/example/solr/collection1/conf/admin-extra.html @@ -15,17 +15,10 @@ limitations under the License. --> - diff --git a/solr/example/solr/collection1/conf/admin-extra.menu-bottom.html b/solr/example/solr/collection1/conf/admin-extra.menu-bottom.html index 82404aed681..3359a460a48 100644 --- a/solr/example/solr/collection1/conf/admin-extra.menu-bottom.html +++ b/solr/example/solr/collection1/conf/admin-extra.menu-bottom.html @@ -1 +1,25 @@ + + + diff --git a/solr/example/solr/collection1/conf/admin-extra.menu-top.html b/solr/example/solr/collection1/conf/admin-extra.menu-top.html index 980720575f0..0886cee37a4 100644 --- a/solr/example/solr/collection1/conf/admin-extra.menu-top.html +++ b/solr/example/solr/collection1/conf/admin-extra.menu-top.html @@ -1 +1,25 @@ + + + diff --git a/solr/webapp/web/js/scripts/dashboard.js b/solr/webapp/web/js/scripts/dashboard.js index d7d90820b03..53b426cef2d 100644 --- a/solr/webapp/web/js/scripts/dashboard.js +++ b/solr/webapp/web/js/scripts/dashboard.js @@ -48,27 +48,26 @@ sammy.get content_element .removeClass( 'single' ); - var core_menu = this.active_core.closest( 'ul' ); - if( !core_menu.data( 'admin-extra-loaded' ) ) + if( !app.core_menu.data( 'admin-extra-loaded' ) ) { - core_menu.data( 'admin-extra-loaded', new Date() ); + app.core_menu.data( 'admin-extra-loaded', new Date() ); $.get ( - core_basepath + '/admin/file/?file=admin-extra.menu-top.html', + core_basepath + '/admin/file/?file=admin-extra.menu-top.html&contentType=text/html;charset=utf-8', function( menu_extra ) { - core_menu + app.core_menu .prepend( menu_extra ); } ); - + $.get ( - core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html', + core_basepath + '/admin/file/?file=admin-extra.menu-bottom.html&contentType=text/html;charset=utf-8', function( menu_extra ) { - core_menu + app.core_menu .append( menu_extra ); } );