geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r581257 - in /geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main: java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
Date Tue, 02 Oct 2007 14:21:25 GMT
Author: pmcmahan
Date: Tue Oct  2 07:21:25 2007
New Revision: 581257

URL: http://svn.apache.org/viewvc?rev=581257&view=rev
Log:
GERONIMO-3413 fix DWR and dojo usage in the JMX debug portlet

Modified:
    geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
    geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp

Modified: geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java?rev=581257&r1=581256&r2=581257&view=diff
==============================================================================
--- geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
(original)
+++ geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/java/org/apache/geronimo/console/jmxmanager/JMXManagerHelper.java
Tue Oct  2 07:21:25 2007
@@ -486,7 +486,7 @@
             Object[] newArgs = processOperArgs(args, types);
             AbstractName aname = new AbstractName(URI.create(abstractName));
             Object res = kernel.invoke(aname, methodName, newArgs, types);
-            if (result != null) {
+            if (res != null) {
                 result[1] = res.toString();
             } else {
                 result[1] = "<null>";
@@ -509,7 +509,7 @@
         try {
             AbstractName aname = new AbstractName(URI.create(abstractName));
             Object res = kernel.invoke(aname, methodName);
-            if (result != null) {
+            if (res != null) {
                 result[1] = res.toString();
             } else {
                 result[1] = "<null>";

Modified: geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp?rev=581257&r1=581256&r2=581257&view=diff
==============================================================================
--- geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
(original)
+++ geronimo/plugins/debugviews/trunk/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
Tue Oct  2 07:21:25 2007
@@ -229,20 +229,20 @@
         dojo.event.topic.subscribe(
             tree.eventNames.titleClick,
             function(message) {
-                var abstractName = message.source.widgetId;
+                window.aName = message.source.widgetId;
 
-                if (abstractName.indexOf('::') == -1) {
+                if (window.aName.indexOf('::') == -1) {
                     // No marker means not an abstract name, clear tables
-                    DWRUtil.removeAllRows('basicInfoTableBody');
-                    DWRUtil.removeAllRows('attributesTableBody');
-                    DWRUtil.removeAllRows('operationsTableBody');
+                    dwr.util.removeAllRows('basicInfoTableBody');
+                    dwr.util.removeAllRows('attributesTableBody');
+                    dwr.util.removeAllRows('operationsTableBody');
                 } else {
                     // Remove marker to get abstract name
-                    abstractName = abstractName.substring(abstractName.indexOf('::') + 2);
-                    JMXHelper.getMBeanInfo(abstractName, <portlet:namespace/>updateBasicInfoTable);
-                    JMXHelper.getAttributes(abstractName, <portlet:namespace/>updateAttributesTable);
-                    JMXHelper.getOperations(abstractName, <portlet:namespace/>updateOperationsTable);
-                    JMXHelper.getMBeanStats(abstractName, <portlet:namespace/>updateStatsTable);
+                    window.aName = window.aName.substring(window.aName.indexOf('::') + 2);
+                    JMXHelper.getMBeanInfo(window.aName, <portlet:namespace/>updateBasicInfoTable);
+                    JMXHelper.getAttributes(window.aName, <portlet:namespace/>updateAttributesTable);
+                    JMXHelper.getOperations(window.aName, <portlet:namespace/>updateOperationsTable);
+                    JMXHelper.getMBeanStats(window.aName, <portlet:namespace/>updateStatsTable);
                 }
             }
         );
@@ -393,7 +393,7 @@
      * Refresh managed object stats button clicked event handler 
      */
     function refreshStatsBtnClicked() {
-        var abstractName = $('abstractName').value;
+        var abstractName = window.aName;
 
         JMXHelper.getMBeanStats(abstractName, <portlet:namespace/>updateStatsTable);
     }
@@ -446,8 +446,8 @@
  * Update MBean attributes table 
  */
 function <portlet:namespace/>updateAttributesTable(attributes) {
-    DWRUtil.removeAllRows('attributesTableBody');
-    DWRUtil.addRows(
+    dwr.util.removeAllRows('attributesTableBody');
+    dwr.util.addRows(
         'attributesTableBody', 
         attributes,
         [ 
@@ -485,7 +485,7 @@
             },
             function(attribute) { /* AttribSetterName Column */
                 var attribSetterName = attribute['setterName']; 
-                var abstractName = $('abstractName').value;
+                var abstractName = window.aName;
                 var attribName = attribute['name'];
                 var attribType = attribute['type'];
                 var attribValueID = attribSetterName + '_value';
@@ -494,7 +494,7 @@
                     attribSetterName = 
                         "<div align='center'>" +
                         "<input type='button' value='" + attribSetterName + "' " + 
-                        "onclick='setAttribFN(\"" + abstractName + "\", \"" + attribName
+ "\", DWRUtil.getValue(\"" + attribValueID + "\"), \"" + attribValueID + "\", \"" + attribType
+ "\")' " +
+                        "onclick='setAttribFN(\"" + abstractName + "\", \"" + attribName
+ "\", dwr.util.getValue(\"" + attribValueID + "\"), \"" + attribValueID + "\", \"" + attribType
+ "\")' " +
                         "/>&nbsp;" + 
                         "</div>";
                     return attribSetterName;
@@ -539,13 +539,13 @@
  * Update MBean operations table 
  */
 function <portlet:namespace/>updateOperationsTable(operations) {
-    DWRUtil.removeAllRows('operationsTableBody');
-    DWRUtil.addRows(
+    dwr.util.removeAllRows('operationsTableBody');
+    dwr.util.addRows(
         'operationsTableBody', 
         operations,
         [
             function(operation) { /* OperName  Column */
-                var abstractName = $('abstractName').value;
+                var abstractName = window.aName;
                 var opName = operation['name'];
                 var params = operation['parameterList'];
                 var paramSize = params.length;
@@ -587,8 +587,8 @@
  * Update MBean basic info table
  */
 function <portlet:namespace/>updateBasicInfoTable(basicInfo) {
-    DWRUtil.removeAllRows('basicInfoTableBody');
-    DWRUtil.addRows(
+    dwr.util.removeAllRows('basicInfoTableBody');
+    dwr.util.addRows(
         'basicInfoTableBody', 
         basicInfo,
         [
@@ -609,8 +609,8 @@
  * Update MBean stats table
  */
 function <portlet:namespace/>updateStatsTable(stats) {
-    DWRUtil.removeAllRows('statsTableBody');
-    DWRUtil.addRows(
+    dwr.util.removeAllRows('statsTableBody');
+    dwr.util.addRows(
         'statsTableBody', 
         stats,
         [
@@ -723,7 +723,7 @@
             function(result) { /* setAttribFN Callback */
                 if (result[1] == '<SUCCESS>') {
                     alert("Attribute '" + result[0] + "' successfully set."); 
-                    DWRUtil.setValue(_attribValueID, _attribValue); // update table cell
+                    dwr.util.setValue(_attribValueID, _attribValue); // update table cell
                 } else {
                     alert("Failed to set attribute '" + result[0] + "': " + result[1]);
                 }
@@ -752,8 +752,8 @@
         for (var i = 0; i < paramSize; i++) {
             var opParamValueID = opName + '_paramValue' + (i+1) + '.' + paramSize;
             var opParamTypeID = opName + '_paramType' + (i+1) + '.' + paramSize;
-            paramValues[i] = DWRUtil.getValue(opParamValueID);
-            paramTypes[i] = DWRUtil.getValue(opParamTypeID);
+            paramValues[i] = dwr.util.getValue(opParamValueID);
+            paramTypes[i] = dwr.util.getValue(opParamTypeID);
         }
         // Invoke operator with args
         JMXHelper.invokeOperWithArgs(
@@ -769,7 +769,8 @@
  * Prints 'LOADING' message while waiting for DWR method calls 
  */
 function init() {
-    // DWRUtil.useLoadingMessage();
+    // dwr.util.useLoadingMessage();
+    dwr.util.setEscapeHtml(false);
 }
 
 /**



Mime
View raw message