You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by st...@apache.org on 2013/01/09 22:02:37 UTC

svn commit: r1431073 - in /lucene/dev/trunk/solr: CHANGES.txt webapp/web/js/scripts/index.js

Author: steffkes
Date: Wed Jan  9 21:02:37 2013
New Revision: 1431073

URL: http://svn.apache.org/viewvc?rev=1431073&view=rev
Log:
SOLR-4289: Admin UI - JVM memory bar - dark grey "used" width is too small

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/webapp/web/js/scripts/index.js

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1431073&r1=1431072&r2=1431073&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Jan  9 21:02:37 2013
@@ -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
 ----------------------

Modified: lucene/dev/trunk/solr/webapp/web/js/scripts/index.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/scripts/index.js?rev=1431073&r1=1431072&r2=1431073&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/scripts/index.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/scripts/index.js Wed Jan  9 21:02:37 2013
@@ -36,13 +36,15 @@ var generate_bar = function( bar_contain
   $( '.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'] );
   }