[jboss-svn-commits] JBL Code SVN: r14551 - in labs/jbossesb/trunk/product/tools/console: management-web/src/main/webapp and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Aug 25 10:23:24 EDT 2007
Author: tcunning
Date: 2007-08-25 10:23:23 -0400 (Sat, 25 Aug 2007)
New Revision: 14551
Modified:
labs/jbossesb/trunk/product/tools/console/management-web/src/main/webapp/attribute.jsp
labs/jbossesb/trunk/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/client/DataCollector.java
Log:
bug:JBESB-738
Fix charting, fix hostname to be the hostname and the JNDI port.
Modified: labs/jbossesb/trunk/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/client/DataCollector.java
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/client/DataCollector.java 2007-08-25 14:00:49 UTC (rev 14550)
+++ labs/jbossesb/trunk/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/client/DataCollector.java 2007-08-25 14:23:23 UTC (rev 14551)
@@ -23,6 +23,8 @@
import java.io.IOException;
import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.ArrayList;
@@ -122,13 +124,21 @@
}
public void insertAttributes(ObjectName on) {
+ String serverString = null;
MBeanInfo info = null;
Date date = new Date(System.currentTimeMillis());
InetAddress addr = null;
try {
addr = InetAddress.getLocalHost();
+ String jndiURLString = (String) context.getEnvironment().get(Context.PROVIDER_URL);
+ URL jndiURL = new URL("http://" + jndiURLString);
+ serverString = addr.getHostName() + ":" + jndiURL.getPort();
} catch (UnknownHostException e) {
logger.error("", e);
+ } catch (NamingException e) {
+ logger.error("", e);
+ } catch (MalformedURLException e) {
+ logger.error("", e);
}
try {
@@ -136,7 +146,7 @@
MBeanAttributeInfo[] mai = info.getAttributes();
for (int i = 0; i < mai.length; i++) {
StatisticsBean sb = new StatisticsBean(on.toString(), mai[i].getName(),
- addr.getHostName(), date, mai[i].getType(),
+ serverString, date, mai[i].getType(),
server.getAttribute(on, mai[i].getName()));
if (sb.getData() != null) {
ArrayList<StatisticsBean> list = (ArrayList<StatisticsBean>) data.getList();
Modified: labs/jbossesb/trunk/product/tools/console/management-web/src/main/webapp/attribute.jsp
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management-web/src/main/webapp/attribute.jsp 2007-08-25 14:00:49 UTC (rev 14550)
+++ labs/jbossesb/trunk/product/tools/console/management-web/src/main/webapp/attribute.jsp 2007-08-25 14:23:23 UTC (rev 14551)
@@ -87,7 +87,7 @@
tscp.saveChart(attribute, file);
%>
<center>
-<img src="/management/<%=image%>">
+<img src="/jbossesb/<%=image%>">
</center>
<%
} else {
More information about the jboss-svn-commits
mailing list