You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rw...@apache.org on 2011/08/10 03:40:59 UTC
svn commit: r1155995 - in
/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main:
java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
webapp/WEB-INF/view/monitoringAddServer.jsp
webapp/WEB-INF/view/monitoringEditServer.jsp
Author: rwonly
Date: Wed Aug 10 01:40:59 2011
New Revision: 1155995
URL: http://svn.apache.org/viewvc?rev=1155995&view=rev
Log:
GERONIMO-6095 Info displayed incomplete of Default Server in Monitoring on admin console (thanks Fang shenghao for the patch!)
Modified:
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java?rev=1155995&r1=1155994&r2=1155995&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/java/org/apache/geronimo/monitoring/console/MonitoringPortlet.java Wed Aug 10 01:40:59 2011
@@ -1159,7 +1159,7 @@ public class MonitoringPortlet extends B
node.setUserName("");
node.setPassword("");
node.setPort(1099);
- node.setProtocol("jmx");
+ node.setProtocol("JMX");
entityManager.persist(node);
return node;
}
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp?rev=1155995&r1=1155994&r2=1155995&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringAddServer.jsp Wed Aug 10 01:40:59 2011
@@ -68,11 +68,9 @@ function show(x) {
function validate() {
if (! (document.addServer.name.value
&& document.addServer.ip.value
- && document.addServer.username.value
- && document.addServer.password.value
&& document.addServer.port.value ))
{
- alert("Name, Address, Protocol, Port, Username, and Password are all required fields");
+ alert("Name, Address, Protocol and Port are all required fields");
return false;
}
if (document.addServer.password.value != document.addServer.password2.value)
Modified: geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp?rev=1155995&r1=1155994&r2=1155995&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp (original)
+++ geronimo/server/trunk/plugins/monitoring/mconsole-war/src/main/webapp/WEB-INF/view/monitoringEditServer.jsp Wed Aug 10 01:40:59 2011
@@ -47,22 +47,17 @@ boolean isOnline = true;
if (node != null) {
try {
- mrc = new MRCConnector(node);
- } catch (Exception e) {
- // the password supplied by the user doesn't work
- try {
- if(retention.equals("") || snapshot.equals("")) {
- mrc = new MRCConnector(node);
- // get the snapshot on the first call or any subsequent valid connections
- snapshot = snapshot == "" ? "" + mrc.getSnapshotDuration() / 1000 / 60 : snapshot;
- // get the retention on the first call or any subsequent valid connection
- retention = retention == "" ? "" + mrc.getSnapshotRetention() : retention;
- }
- } catch(Exception ee) {
- // the password in the db does not work
- isOnline = false;
+ if(retention.equals("") || snapshot.equals("")) {
+ mrc = new MRCConnector(node);
+ // get the snapshot on the first call or any subsequent valid connections
+ snapshot = snapshot == "" ? "" + mrc.getSnapshotDuration() / 1000 / 60 : snapshot;
+ // get the retention on the first call or any subsequent valid connection
+ retention = retention == "" ? "" + mrc.getSnapshotRetention() : retention;
}
- }finally{
+ } catch(Exception ee) {
+ // the password in the db does not work
+ isOnline = false;
+ } finally{
if(null != mrc)
mrc.dispose();
}
@@ -83,31 +78,12 @@ function show(x) {
}
function validate() {
if (! (document.editServer.name.value
- && document.editServer.ip.value
- && document.editServer.username.value
- && document.editServer.snapshot.value
- && document.editServer.port.value ))
- {
- alert("Name, Address, Protocol, Port, Username, and Snapshot Duration are all required fields.");
- return false;
- }
- if (document.editServer.password.value != document.editServer.password2.value)
- {
- alert("Passwords do not match");
- return false;
- }
- return true;
-}
-
-function validateTest() {
- if (! (document.editServer.name.value
- && document.editServer.ip.value
- && document.editServer.username.value
+ && document.editServer.ip.value
&& document.editServer.snapshot.value
- && document.editServer.password.value
+ && document.editServer.retention.value
&& document.editServer.port.value ))
{
- alert("Name, Address, Protocol, Port, Username, and Snapshot Duration are all required fields.");
+ alert("Name, Address, Protocol, Port, Snapshot Duration and Snapshot Retention are all required fields.");
return false;
}
if (document.editServer.password.value != document.editServer.password2.value)
@@ -296,7 +272,7 @@ function setPort() {
<td bgcolor="#FFFFFF" nowrap>
<br />
<ul>
- <li><a onclick="document.editServer.action.value='testEditServerConnection'; document.editServer.mode.value='edit'; if(validateTest()) document.editServer.submit();" href="#"><fmt:message key="monitor.server.testSetting"/></a></li>
+ <li><a onclick="document.editServer.action.value='testEditServerConnection'; document.editServer.mode.value='edit'; if(validate()) document.editServer.submit();" href="#"><fmt:message key="monitor.server.testSetting"/></a></li>
<%
if(node.isEnabled()) {
%>