geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecr...@apache.org
Subject svn commit: r650799 - /geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
Date Wed, 23 Apr 2008 09:13:55 GMT
Author: ecraig
Date: Wed Apr 23 02:13:54 2008
New Revision: 650799

URL: http://svn.apache.org/viewvc?rev=650799&view=rev
Log:
GERONIMO-3972
Monitering Graphics failed to represent in IE 6 SP2


Modified:
    geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java

Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java?rev=650799&r1=650798&r2=650799&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
(original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/StatsGraph.java
Wed Apr 23 02:13:54 2008
@@ -77,8 +77,11 @@
         GraphJS += "graph" + graph_id + ".addAxis(\"x\", {labels: [";
         for (int i = 1; i < dataSet1.size(); i++) {
             Date date = new Date((Long) snapshotTimes.get(i));
-            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date)
-                    + "' }, \n";
+            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date);
+            if ((i+1) != dataSet1.size())
+                GraphJS += "' }, \n";
+            else
+            	GraphJS += "' } \n";
         }
         GraphJS += "]});\n";
         GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
@@ -94,7 +97,8 @@
                 // ensure there is not a division by 0
                 GraphJS += appendOperation(operation, (Long) dataSet2.get(i)
                         - (Long) dataSet2.get(i - 1));
-                GraphJS += ",";
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",";
             }
         }
         if (data1operation == 'D' && data2operation != 'D') {
@@ -103,7 +107,8 @@
                         + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1));
                 // ensure there is not a division by 0
                 GraphJS += appendOperation(operation, (Long) dataSet2.get(i));
-                GraphJS += ",";
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",";
             }
         }
         if (data1operation != 'D' && data2operation == 'D') {
@@ -112,7 +117,8 @@
                 // ensure there is not a division by 0
                 GraphJS += appendOperation(operation, (Long) dataSet2.get(i)
                         - (Long) dataSet2.get(i - 1));
-                GraphJS += ",";
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",";
             }
         }
         if (data1operation != 'D' && data2operation != 'D') {
@@ -120,7 +126,8 @@
                 GraphJS = GraphJS + dataSet1.get(i);
                 // ensure there is not a division by 0
                 GraphJS += appendOperation(operation, (Long) dataSet2.get(i));
-                GraphJS += ",";
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",";
             }
         }
 
@@ -172,8 +179,11 @@
         GraphJS += "graph" + graph_id + ".addAxis(\"x\", {labels: [";
         for (int i = 1; i < dataSet1.size(); i++) {
             Date date = new Date((Long) snapshotTimes.get(i));
-            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date)
-                    + "' }, \n";
+            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date);
+            if ((i+1) != dataSet1.size())
+                GraphJS += "' }, \n";
+            else
+            	GraphJS += "' } \n";
         }
         GraphJS += "]});\n";
         GraphJS += "graph" + graph_id + ".addAxis(\"y\", {vertical: true});\n";
@@ -183,12 +193,15 @@
         if (data1operation == 'D')
             for (int i = 1; i < dataSet1.size(); i++) {
                 GraphJS = GraphJS
-                        + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1))
-                        + operation + ",\n";
+                        + ((Long) dataSet1.get(i) - (Long) dataSet1.get(i - 1)) + operation;
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",\n";
             }
         if (data1operation != 'D')
             for (int i = 1; i < dataSet1.size(); i++) {
-                GraphJS = GraphJS + dataSet1.get(i) + operation + ",\n";
+                GraphJS = GraphJS + dataSet1.get(i) + operation;
+                if ((i+1) != dataSet1.size())
+                    GraphJS += ",\n";
             }
 
         GraphJS = GraphJS + "]);\n";



Mime
View raw message