geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1155362 - in /geronimo/server/trunk/plugins: debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/ debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/ debugviews/debugviews-portlets/src/main/webapp...
Date Tue, 09 Aug 2011 13:37:13 GMT
Author: rwonly
Date: Tue Aug  9 13:37:12 2011
New Revision: 1155362

URL: http://svn.apache.org/viewvc?rev=1155362&view=rev
Log:
GERONIMO-6103 EJB Server and JNDI Viewer are not displayed correctly on Chrome (Thanks Shenghao
Fang for the patch!)

Modified:
    geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
    geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
    geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
    geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp

Modified: geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp?rev=1155362&r1=1155361&r2=1155362&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
(original)
+++ geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/dependencyview/view.jsp
Tue Aug  9 13:37:12 2011
@@ -46,15 +46,30 @@
 <!--     Page Stuff     -->
 <!------------------------>
 <script type="text/javascript">
-
-    var debugStore = null; 
-    DependencyViewHelper.getTrees({callback:createStore,async:false});
-    function createStore(treeData){    
-    //      var treeData = dojo.fromJson(json);                    
-          debugStore=new dojo.data.ItemFileReadStore({data:treeData});       
-      }
-    var debugModel = new dijit.tree.ForestStoreModel({
-        store:debugStore, rootId:"Dependencies", rootLabel:"Dependencis", childrenAttrs:["children"]});
+    var debugStore = null;
+    var debugModel = null;
+    var debugTree = null;
+    
+    dojo.addOnLoad(
+        function() {
+            DependencyViewHelper.getTrees({callback:createTree,async:false});
+        }
+    );
+    
+    function createTree(treeData){
+        debugStore = new dojo.data.ItemFileReadStore({data:treeData});
+        debugModel = new dijit.tree.ForestStoreModel({
+            store:debugStore, rootId:"Dependencies", rootLabel:"Dependencis", childrenAttrs:["children"]});
+        debugTree = new dijit.Tree({
+            "class": "claro",
+            showRoot: false,
+            model: debugModel,
+            openOnClick: true,
+            style: "width: 100%;overflow: auto;overflow-y: hidden;",
+            _onDblClick: _onDblClick
+            },
+            "treeContainer");
+    }
 
     var lastFoundId = -1;
     var SearchOn = []; //For ignore the fake root it better be a array
@@ -189,9 +204,6 @@
         }
         dojo.stopEvent(e);
     }
-    dojo.addOnLoad(function(){
-        debugTree._onDblClick = _onDblClick;
-    });
 </script>
 <div dojoType="dijit.TitlePane" title="<fmt:message key="debugviews.common.find"/>"
>
     <b><label for="searchText"><fmt:message key="dependencyview.view.searchText"
/></label>: </b>
@@ -210,8 +222,5 @@
     <input type="checkbox" id="inSelected" onChange="javascript:searchReset()" />
 </div>
 <br />
-<div dojoType="dijit.Tree" jsId="debugTree" class="claro" showRoot="false"
-      model="debugModel" openOnClick="true"  style="width: 100%;overflow: auto;overflow-y:
hidden;">
+<div id="treeContainer">
 </div>
-
-

Modified: geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp?rev=1155362&r1=1155361&r2=1155362&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
(original)
+++ geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jmxmanager/viewJMXServer.jsp
Tue Aug  9 13:37:12 2011
@@ -71,15 +71,81 @@
     // tree var
     var treeStore;
     var treeData;
+    var treeModel;
+    var tree;
     
-    JMXManagerHelper.getJMXInformation({callback:createTreeStore});    
-           
-    function createTreeStore(treeObj){    
-        treeData = {data:""};
-        treeData.data = treeObj;                    
-        treeStore = new dojo.data.ItemFileWriteStore(treeData);       
+    dojo.addOnLoad(
+        function() {
+            JMXManagerHelper.getJMXInformation({callback:createTree,async:false});    
+        }
+    );
+
+    function createTree(treeData){                 
+        treeStore = new dojo.data.ItemFileWriteStore({data:treeData});
+        treeModel = new dijit.tree.ForestStoreModel({
+            store:treeStore, childrenAttrs:["children"]});
+        tree = new dijit.Tree({
+            model: treeModel,
+            showRoot: false,
+            openOnClick: false,
+            onOpen: onOpen,
+            onClick: onClick
+            },
+            "treeContainer");
+    }
+
+    function onOpen(item) {
+        document.body.style.cursor = "wait";
+        _selectItem = item;
+                
+        // if the node has place holder, we will try get its children by type
+        if (checkPlaceholderChild(item)){
+            var type = treeStore.getValue(item,"type");
+            if (type == "JavaEE" || type == "Geronimo") {        //how to use static final
java var?
+                JMXManagerHelper.listByJ2EEType(treeStore.getValue(item,"name"), {callback:updateJMXTree});
+            }
+            if (type == "GeronimoService") {
+                JMXManagerHelper.listBySubstring("ServiceModule="+treeStore.getValue(item,"name"),
{callback:updateJMXTree});
+            }
+            if (type == "All") {
+                // not worked
+                JMXManagerHelper.listByPattern(treeStore.getValue(item,"name")+":*", {callback:updateJMXTree});
+            }
+            if (type == "StatsProvider") {
+                // Get statistics provider MBeans
+                JMXManagerHelper.getStatsProviderMBeans({callback:updateJMXTree});
+            }
+        } 
+        
+        // if item has children, del the place holder. Otherwise keep the place holder
+        dealPlaceholderChild(item);
+
+        document.body.style.cursor = "";
     }
+    
+    function onClick(item) {
+        document.body.style.cursor = "wait";
+        _selectItem = item;
+        
+        var type = treeStore.getValue(item, "type");
+        if (type == "leaf") {
+            // set abstract name
+            var values = treeStore.getValues(item,"values");
+            _abstractName = values[0];
+            JMXManagerHelper.getAttributes(_abstractName, updateAttributesTable);
+            JMXManagerHelper.getOperations(_abstractName, updateOperationsTable);
+            JMXManagerHelper.getMBeanInfo(_abstractName, updateInfoTable);
+            JMXManagerHelper.getMBeanStats(_abstractName, updateStatsTable);
+        } else {
+            // No marker means not an abstract name, clear tables
+            dwr.util.removeAllRows('attributesTableBody');
+            dwr.util.removeAllRows('operationsTableBody');
+            dwr.util.removeAllRows('infoTableBody');
+            dwr.util.removeAllRows('statsTableBody');
+        }
 
+        document.body.style.cursor = "";
+    }
 
     /*
      * Call back: Update JMXTree
@@ -394,9 +460,6 @@
 
 </script>
 
-<!-- Model for tree -->
-<div dojoType="dijit.tree.ForestStoreModel" jsId="treeModel" store="treeStore" childrenAttrs="children"
/>
-
 <!-- Search table -->
 <div dojoType="dijit.TitlePane" title="Search">
        <fmt:message key="jmxmanager.help.objectNamePattern"/>:
@@ -537,65 +600,9 @@
     <div dojoType="dijit.layout.SplitContainer" orientation="horizontal" sizerWidth="1"
activeSizing="true" layoutAlign="client" style="width: 100%; height: 100%;" >
        
         <!-- left pane START -->
-        <div dojoType="dijit.layout.ContentPane" sizeShare="40" layoutAlign="left" style="background-color:white;
overflow: auto;">       
-            
-            <!-- JMX tree START -->
-            <div dojoType="dijit.Tree" model="treeModel" showRoot="false" openOnClick="false">
-                <script type="dojo/method" event="onOpen" args="item">
-                        document.body.style.cursor = "wait";
-                        _selectItem = item;
-                        
-                        // if the node has place holder, we will try get its children by
type
-                        if (checkPlaceholderChild(item)){
-                            var type = treeStore.getValue(item,"type");
-                            if (type == "JavaEE" || type == "Geronimo") {        //how to
use static final java var?
-                                JMXManagerHelper.listByJ2EEType(treeStore.getValue(item,"name"),
{callback:updateJMXTree});
-                            }
-                            if (type == "GeronimoService") {
-                                JMXManagerHelper.listBySubstring("ServiceModule="+treeStore.getValue(item,"name"),
{callback:updateJMXTree});
-                            }
-                            if (type == "All") {
-                                // not worked
-                                JMXManagerHelper.listByPattern(treeStore.getValue(item,"name")+":*",
{callback:updateJMXTree});
-                            }
-                            if (type == "StatsProvider") {
-                                // Get statistics provider MBeans
-                                JMXManagerHelper.getStatsProviderMBeans({callback:updateJMXTree});
-                            }
-                        } 
-                        
-                        // if item has children, del the place holder. Otherwise keep the
place holder
-                        dealPlaceholderChild(item);
-
-                        document.body.style.cursor = "";
-                </script> 
-                <script type="dojo/method" event="onClick" args="item">
-                        document.body.style.cursor = "wait";
-                        _selectItem = item;
-                        
-                        var type = treeStore.getValue(item, "type");
-                        if (type == "leaf") {
-                            // set abstract name
-                            var values = treeStore.getValues(item,"values");
-                            _abstractName = values[0];
-                            JMXManagerHelper.getAttributes(_abstractName, updateAttributesTable);
-                            JMXManagerHelper.getOperations(_abstractName, updateOperationsTable);
-                            JMXManagerHelper.getMBeanInfo(_abstractName, updateInfoTable);
-                            JMXManagerHelper.getMBeanStats(_abstractName, updateStatsTable);
-                        } else {
-                            // No marker means not an abstract name, clear tables
-                            dwr.util.removeAllRows('attributesTableBody');
-                            dwr.util.removeAllRows('operationsTableBody');
-                            dwr.util.removeAllRows('infoTableBody');
-                            dwr.util.removeAllRows('statsTableBody');
-                        }
-
-                        document.body.style.cursor = "";
-                </script>
-            </div>
-            <!-- JMX tree END -->
-            
-        </div> 
+        <div dojoType="dijit.layout.ContentPane" sizeShare="40" layoutAlign="left" style="background-color:white;
overflow: auto;">
+            <div id="treeContainer"></div>
+        </div>
         <!-- left pane END -->
         
         <!-- right pane START -->

Modified: geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp?rev=1155362&r1=1155361&r2=1155362&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
(original)
+++ geronimo/server/trunk/plugins/debugviews/debugviews-portlets/src/main/webapp/WEB-INF/view/jndiview/view.jsp
Tue Aug  9 13:37:12 2011
@@ -46,16 +46,30 @@
 <!--     Page Stuff     -->
 <!------------------------>
 <script type="text/javascript">
-    var debugStore = null; 
+    var debugStore = null;
+    var debugModel = null;
+    var debugTree = null;
+    
+    dojo.addOnLoad(
+        function(){
+            JNDIViewHelper.getTrees({callback:createTree,async:false});
+        }
+    );
+    
+    function createTree(treeData){                    
+        debugStore = new dojo.data.ItemFileReadStore({data:treeData});
+        debugModel = new dijit.tree.ForestStoreModel({
+            store:debugStore, rootId:"JNDI", rootLabel:"JNDI", childrenAttrs:["children"]});
+        debugTree = new dijit.Tree({
+            "class": "claro",
+            showRoot: false,
+            model: debugModel,
+            openOnClick: true,
+            style: "width: 100%;overflow: auto;overflow-y: hidden;"
+            },
+            "treeContainer");
+    }
     
-    JNDIViewHelper.getTrees({callback:createStore,async:false});
-    function createStore(treeData){    
-    //      var treeData = dojo.fromJson(json);                    
-          debugStore=new dojo.data.ItemFileReadStore({data:treeData});       
-      }
-    var debugModel = new dijit.tree.ForestStoreModel({
-        store:debugStore, rootId:"JNDI", rootLabel:"JNDI", childrenAttrs:["children"]});
-
     var lastFoundId = -1;
     var SearchOn = []; //For ignore the fake root it better be a array
     var caseSensitive = true;
@@ -174,7 +188,5 @@
 
 </div>
 <br />
-<div dojoType="dijit.Tree" jsId="debugTree" class="claro" showRoot="false"
-      model="debugModel" openOnClick="true"  style="width: 100%;overflow: auto;overflow-y:
hidden;">
+<div id="treeContainer">
 </div>
-

Modified: geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp?rev=1155362&r1=1155361&r2=1155362&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
(original)
+++ geronimo/server/trunk/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
Tue Aug  9 13:37:12 2011
@@ -43,12 +43,18 @@
     
     var lastFound = '';
     var doCheck = false;
-    var serverStore=null;
+    var serverStore = null;
+    var storeModel = null;
+    var tree = null;
     var data = '';
     var containerPropertyValue = ''; 
 
-    EjbHelper.getEjbInformation({callback:createStore,async:false});    
-        
+    dojo.addOnLoad(
+        function () {
+            EjbHelper.getEjbInformation({callback:createTree,async:false});
+        }
+    );
+
     function check(curr,last) {
         var cr = curr.split(".");
         var ls = last.split(".");
@@ -58,14 +64,32 @@
         return true;
     }
        
-    function createStore(treeDat){    
-        var json = dojo.toJson(treeDat);
-        data = {data:""};
-        data.data = treeDat;                    
-        serverStore=new dojo.data.ItemFileReadStore(data);       
+    function createTree(treeDat){
+        serverStore = new dojo.data.ItemFileReadStore({data: treeDat});
+        storeModel = new dijit.tree.ForestStoreModel({
+            store: serverStore, rootId: "Ejb Containers", rootLabel: "Ejb Containers", childrenAttrs:
["children"]});
+        tree = new dijit.Tree({
+            "class": "claro",
+            model: storeModel,
+            openOnClick: false,
+            onClick: onClick
+            },
+            "treeContainer");
     }
-      
     
+    function onClick(item) {
+        if (item.id!="Ejb Containers") {
+            var ids = serverStore.getValues(item, "values");
+            if (ids[1] != null) {
+                EjbHelper.getDeploymentInfo(ids[0],ids[1],updateEjbInfoTable);
+            } else {
+                EjbHelper.getContainerInfo(ids[0],updateEjbInfoTable);
+            }
+        } else {
+            dwr.util.removeAllRows('ejbInfoTableBody');
+        }
+    }
+
    /**
     * DWR table render option
     */
@@ -80,7 +104,7 @@
                td.style.backgroundColor = '#FFFFFF';
            } else {
                td.style.backgroundColor = '#F2F2F2';
-           }	   
+           }       
            return td;
        },
        escapeHtml:false
@@ -100,20 +124,20 @@
                        return "<div style='width:100%;display:inline;'><p id='"
+ info.id + "para' style='color: red'>" + info.name + "</p></div>";
                    } else { 
                        return "<div style='width:100%;display:inline;'><p id='"
+ info.id + "para'>" + info.name + "</p></div>";
-                   }		
+                   }        
                },
                function(info) {
-	               var value = info.value;
-		           var name = info.name;
+                   var value = info.value;
+                   var name = info.name;
                    if(info.id == "ContainerId"){
-		               containerId = info.value;  
-                   } 		
+                       containerId = info.value;  
+                   }         
                    if(info.editable == "true"){                                        
                        return "<div style='width:100%;display:inline;'><input type='text'
id="+info.id + " name="+info.name + " value="+info.value+" widgetId="+info.id+" dojoType='Textbox'
/><button dojoType='Button'  onclick=updateValues('"+escape(containerId)+"','"+info.id+"','"+info.value+"')><fmt:message
key="portlet.openejb.view.update"/></button></div> "
                    } else {
-                       return "<div style='width:100%'>" + info.value + "</div>";
	
+                       return "<div style='width:100%'>" + info.value + "</div>";
       
                    } 
-	           }	   
+               }       
            ],
            tableOption
        );
@@ -147,32 +171,14 @@
   </script>
 
 <div id="<portlet:namespace/>CommonMsgContainer"></div><br>
-
-<div dojoType="dijit.tree.ForestStoreModel" jsId="storeModel" 
-		store="serverStore" 
-		rootId="Ejb Containers" rootLabel="Ejb Containers" childrenAttrs="children"></div>
-
-	
+    
 <div dojoType="dijit.layout.LayoutContainer" id="mainLayout" style="width: 100%; height:
700px;">
     <!-- Horizontal split container -->
     <div dojoType="dijit.layout.SplitContainer" orientation="horizontal" sizerWidth="1"
activeSizing="true" layoutAlign="client" style="width: 100%; height: 100%;" >
-        <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="background-color:white;
overflow: auto;" preload="true" widgetId="ejbcontainerTree" sizeShare="40">       
-            <div class="claro" dojoType="dijit.Tree" model="storeModel" openOnClick="false"
>
-    	        <script type="dojo/method" event="onClick" args="item">
-        			if(item.id!="Ejb Containers") {             	        
-        		        var ids = serverStore.getValues(item, "values");
-        			    if(ids[1] != null) {
-        		            EjbHelper.getDeploymentInfo(ids[0],ids[1],updateEjbInfoTable);		  
    
-        			    } else {
-        			        EjbHelper.getContainerInfo(ids[0],updateEjbInfoTable);
-        			    }
-        			} else {
-        			    dwr.util.removeAllRows('ejbInfoTableBody');
-        			}
-    		    </script> 
-	        </div>
+        <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="background-color:white;
overflow: auto;" preload="true" widgetId="ejbcontainerTree" sizeShare="40">
+            <div id="treeContainer"></div>
         </div> 
-	
+
         <div id="infoTab" dojoType="dijit.layout.ContentPane" title="Ejb Info" label="Info"
sizeShare="60" style="background-color:white; overflow: auto;" layoutAlign="right" class="claro"
>
             <table id="ejbsTable" class="TableLine" width="100%">
                 <thead>



Mime
View raw message