Commit f3396022 authored by Günther Niess's avatar Günther Niess Committed by niess

OF-61: Display and log the correct admin interface

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11497 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6a9b4a84
...@@ -300,6 +300,9 @@ public class AdminConsolePlugin implements Plugin { ...@@ -300,6 +300,9 @@ public class AdminConsolePlugin implements Plugin {
private void logAdminConsolePorts() { private void logAdminConsolePorts() {
// Log what ports the admin console is running on. // Log what ports the admin console is running on.
String listening = LocaleUtils.getLocalizedString("admin.console.listening"); String listening = LocaleUtils.getLocalizedString("admin.console.listening");
String hostname = getBindInterface() == null ?
XMPPServer.getInstance().getServerInfo().getXMPPDomain() :
getBindInterface();
boolean isPlainStarted = false; boolean isPlainStarted = false;
boolean isSecureStarted = false; boolean isSecureStarted = false;
for (Connector connector : adminServer.getConnectors()) { for (Connector connector : adminServer.getConnectors()) {
...@@ -313,18 +316,16 @@ public class AdminConsolePlugin implements Plugin { ...@@ -313,18 +316,16 @@ public class AdminConsolePlugin implements Plugin {
if (isPlainStarted && isSecureStarted) { if (isPlainStarted && isSecureStarted) {
log(listening + ":" + System.getProperty("line.separator") + log(listening + ":" + System.getProperty("line.separator") +
" http://" + XMPPServer.getInstance().getServerInfo().getXMPPDomain() + ":" + " http://" + hostname + ":" +
adminPort + System.getProperty("line.separator") + adminPort + System.getProperty("line.separator") +
" https://" + XMPPServer.getInstance().getServerInfo().getXMPPDomain() + ":" + " https://" + hostname + ":" +
adminSecurePort); adminSecurePort);
} }
else if (isSecureStarted) { else if (isSecureStarted) {
log(listening + " https://" + log(listening + " https://" + hostname + ":" + adminSecurePort);
XMPPServer.getInstance().getServerInfo().getXMPPDomain() + ":" + adminSecurePort);
} }
else if (isPlainStarted) { else if (isPlainStarted) {
log(listening + " http://" + log(listening + " http://" + hostname + ":" + adminPort);
XMPPServer.getInstance().getServerInfo().getXMPPDomain() + ":" + adminPort);
} }
} }
......
...@@ -534,7 +534,7 @@ ...@@ -534,7 +534,7 @@
</tr> </tr>
<% } %> <% } %>
<tr> <tr>
<td><%= interfaceName == null ? LocaleUtils.getLocalizedString("ports.all_ports") : interfaceName %></td> <td><%= adminConsolePlugin.getBindInterface() == null ? LocaleUtils.getLocalizedString("ports.all_ports") : adminConsolePlugin.getBindInterface() %></td>
<td><%= adminConsolePlugin.getAdminUnsecurePort() %></td> <td><%= adminConsolePlugin.getAdminUnsecurePort() %></td>
<td><img src="images/blank.gif" width="1" height="1" alt=""></td> <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
<td><fmt:message key="ports.admin_console" /></td> <td><fmt:message key="ports.admin_console" /></td>
...@@ -544,7 +544,7 @@ ...@@ -544,7 +544,7 @@
if (adminConsolePlugin.getAdminSecurePort() > 0) { if (adminConsolePlugin.getAdminSecurePort() > 0) {
%> %>
<tr> <tr>
<td><%= interfaceName == null ? LocaleUtils.getLocalizedString("ports.all_ports") : interfaceName %></td> <td><%= adminConsolePlugin.getBindInterface() == null ? LocaleUtils.getLocalizedString("ports.all_ports") : adminConsolePlugin.getBindInterface() %></td>
<td><%= adminConsolePlugin.getAdminSecurePort() %></td> <td><%= adminConsolePlugin.getAdminSecurePort() %></td>
<td><img src="images/lock.gif" width="16" height="16" border="0" alt=""/></td> <td><img src="images/lock.gif" width="16" height="16" border="0" alt=""/></td>
<td><fmt:message key="ports.admin_console" /></td> <td><fmt:message key="ports.admin_console" /></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment