Skip to content

Apache Lucene open-source search software

SOLR-4289: Admin UI - JVM memory bar - dark grey "used" width is too small

Stefan Matheis44597fa29090
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b3937fd1a07..148986c2ab2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -1691,6 +1691,8 @@ Bug Fixes
* SOLR-1958: When using the MailEntityProcessor, import would fail if
fetchMailsSince was not specified. (Max Lynch via James Dyer)
+* SOLR-4289: Admin UI - JVM memory bar - dark grey "used" width is too small
+ (steffkes)
Other Changes
----------------------
diff --git a/solr/webapp/web/js/scripts/index.js b/solr/webapp/web/js/scripts/index.js
index 2c22f5ec71e..a06dc61741d 100644
--- a/solr/webapp/web/js/scripts/index.js
+++ b/solr/webapp/web/js/scripts/index.js
@@ -36,13 +36,15 @@ var generate_bar = function( bar_container, bar_data, convert_label_values )
$( '.bar-max.val', bar_holder ).text( bar_data['max'] );
bar_level++;
- $( '.bar-total.bar', bar_holder ).width( new String( (bar_data['total']/bar_data['max'])*100 ) + '%' );
+ var total_calc = bar_data['total']/bar_data['max'];
+ $( '.bar-total.bar', bar_holder ).width( new String( total_calc*100 ) + '%' );
$( '.bar-total.val', bar_holder ).text( bar_data['total'] );
if( bar_data['used'] )
{
bar_level++;
- $( '.bar-used.bar', bar_holder ).width( new String( (bar_data['used']/bar_data['max'])*100 ) + '%' );
+ var used_calc = (bar_data['used']/bar_data['max'])/total_calc;
+ $( '.bar-used.bar', bar_holder ).width( new String( used_calc*100 ) + '%' );
$( '.bar-used.val', bar_holder ).text( bar_data['used'] );
}