Apache Solr open-source search software
SOLR-6740: Admin UI - improve Files View
Stefan Matheisb5e953995473
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex b304d9a1e8a..c9af94918c5 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -395,6 +395,8 @@ Other Changes* SOLR-6739: Admin UI - Sort list of command line args (steffkes)+* SOLR-6740: Admin UI - improve Files View (steffkes)+================== 4.10.3 ==================Bug Fixesdiff --git a/solr/webapp/web/css/styles/files.css b/solr/webapp/web/css/styles/files.cssindex ba5991b8298..792cc31fe6f 100644--- a/solr/webapp/web/css/styles/files.css+++ b/solr/webapp/web/css/styles/files.css@@ -23,6 +23,11 @@ limitations under the License.width: 20%;}+#content #files #tree-holder li+{+ overflow: hidden;+}+#content #files form .buttons button{float: right;diff --git a/solr/webapp/web/js/scripts/files.js b/solr/webapp/web/js/scripts/files.jsindex 5d939b8b90e..358412d3e8b 100644--- a/solr/webapp/web/js/scripts/files.js+++ b/solr/webapp/web/js/scripts/files.js@@ -103,6 +103,7 @@ sammy.getdata: {title : file,attr : {+ title : file,href : '#/' + current_core + '/files?file=' + prefix + file}},@@ -161,7 +162,7 @@ sammy.getvar endpoint = file_endpoint + '?file=' + selected_file;- var content_type_map = { xml : 'text/xml', html : 'text/html', js : 'text/javascript' };+ var content_type_map = { xml : 'text/xml', html : 'text/html', js : 'text/javascript', json : 'application/json', 'css' : 'text/css' };var file_ext = selected_file.match( /\.(\w+)$/ );endpoint += '&contentType=' + ( content_type_map[ file_ext[1] || '' ] || 'text/plain' ) + ';charset=utf-8';@@ -209,6 +210,14 @@ sammy.get{highlight = 'javascript';}+ else if( 0 === content_type.indexOf( 'text/css' ) )+ {+ highlight = 'css';+ }+ else if( 0 === content_type.indexOf( 'application/json' ) )+ {+ highlight = 'json';+ }var code = $('<pre class="syntax' + ( highlight ? ' language-' + highlight : '' )+ '"><code>' +