Commit 72247686 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[JM-1241] Applied Guus's patch to provide clear indication of difference...

[JM-1241] Applied Guus's patch to provide clear indication of difference between server host name and XMPP domain.  Likely will work this info into admin interface soon.

Applied Michael's new orangish admin interface look and feel.  Some adjustments pending but a great start!

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9820 b35dd754-fafc-0310-a699-88a17e54d16e
parent 7fdde200
...@@ -59,6 +59,8 @@ import java.sql.ResultSet; ...@@ -59,6 +59,8 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.*; import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.net.InetAddress;
import java.net.UnknownHostException;
/** /**
* The main XMPP server that will load, initialize and start all the server's * The main XMPP server that will load, initialize and start all the server's
...@@ -94,6 +96,7 @@ public class XMPPServer { ...@@ -94,6 +96,7 @@ public class XMPPServer {
private static XMPPServer instance; private static XMPPServer instance;
private String name; private String name;
private String host;
private Version version; private Version version;
private Date startDate; private Date startDate;
private boolean initialized = false; private boolean initialized = false;
...@@ -326,6 +329,13 @@ public class XMPPServer { ...@@ -326,6 +329,13 @@ public class XMPPServer {
name = JiveGlobals.getProperty("xmpp.domain", "127.0.0.1").toLowerCase(); name = JiveGlobals.getProperty("xmpp.domain", "127.0.0.1").toLowerCase();
try {
host = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException ex) {
Log.warn("Unable to determine local hostname.", ex);
}
version = new Version(3, 4, 5, Version.ReleaseStatus.Release, -1); version = new Version(3, 4, 5, Version.ReleaseStatus.Release, -1);
if ("true".equals(JiveGlobals.getXMLProperty("setup"))) { if ("true".equals(JiveGlobals.getXMLProperty("setup"))) {
setupMode = false; setupMode = false;
...@@ -425,7 +435,7 @@ public class XMPPServer { ...@@ -425,7 +435,7 @@ public class XMPPServer {
setupMode = false; setupMode = false;
// Update server info // Update server info
xmppServerInfo = new XMPPServerInfoImpl(name, version, startDate, getConnectionManager()); xmppServerInfo = new XMPPServerInfoImpl(name, host, version, startDate, getConnectionManager());
} }
} }
...@@ -435,7 +445,7 @@ public class XMPPServer { ...@@ -435,7 +445,7 @@ public class XMPPServer {
startDate = new Date(); startDate = new Date();
// Store server info // Store server info
xmppServerInfo = new XMPPServerInfoImpl(name, version, startDate, getConnectionManager()); xmppServerInfo = new XMPPServerInfoImpl(name, host, version, startDate, getConnectionManager());
// Create PluginManager now (but don't start it) so that modules may use it // Create PluginManager now (but don't start it) so that modules may use it
File pluginDir = new File(openfireHome, "plugins"); File pluginDir = new File(openfireHome, "plugins");
......
...@@ -33,20 +33,48 @@ public interface XMPPServerInfo { ...@@ -33,20 +33,48 @@ public interface XMPPServerInfo {
public Version getVersion(); public Version getVersion();
/** /**
* Obtain the server name (ip address or hostname). * Obtain the server name (IP address or hostname).
* *
* @return the server's name as an ip address or host name. * @return the server's name as an IP address or host name.
* @deprecated replaced by {@link #getXmppDomain()}
*/ */
@Deprecated
public String getName(); public String getName();
/** /**
* Set the server name (ip address or hostname). The server * Set the server name (IP address or hostname). The server
* must be restarted for this change to take effect. * must be restarted for this change to take effect.
* *
* @param serverName the server's name as an ip address or host name. * @param serverName the server's name as an IP address or host name.
* @deprecated replaced by {@link #setXmppDomain(String)}
*/ */
@Deprecated
public void setName(String serverName); public void setName(String serverName);
/**
* Obtain the host name (IP address or hostname) of this server node.
*
* @return the server's host name as an IP address or host name.
*/
public String getHostname();
/**
* Obtain the server XMPP domain name. Note that, if unconfigured, the
* returned value will equal the hostname or IP address of the server.
*
* @return the name of the XMPP domain that this server is part of.
*/
public String getXmppDomain();
/**
* Set the server XMPP domain name. The server must be
* restarted for this change to take effect.
*
* @param domainName
* the XMPP domain that this server is part of.
*/
public void setXmppDomain(String domainName);
/** /**
* Obtain the date when the server was last started. * Obtain the date when the server was last started.
* *
......
...@@ -30,21 +30,24 @@ import java.util.Date; ...@@ -30,21 +30,24 @@ import java.util.Date;
public class XMPPServerInfoImpl implements XMPPServerInfo { public class XMPPServerInfoImpl implements XMPPServerInfo {
private Date startDate; private Date startDate;
private String name; private String xmppDomain;
private String hostname;
private Version ver; private Version ver;
private ConnectionManager connectionManager; private ConnectionManager connectionManager;
/** /**
* Simple constructor * Simple constructor
* *
* @param serverName the server's serverName (e.g. example.org). * @param xmppDomain the server's XMPP domain name (e.g. example.org).
* @param hostname the server's host name (e.g. server1.example.org).
* @param version the server's version number. * @param version the server's version number.
* @param startDate the server's last start time (can be null indicating * @param startDate the server's last start time (can be null indicating
* it hasn't been started). * it hasn't been started).
* @param connectionManager the object that keeps track of the active ports. * @param connectionManager the object that keeps track of the active ports.
*/ */
public XMPPServerInfoImpl(String serverName, Version version, Date startDate, ConnectionManager connectionManager) { public XMPPServerInfoImpl(String xmppDomain, String hostname, Version version, Date startDate, ConnectionManager connectionManager) {
this.name = serverName; this.xmppDomain = xmppDomain;
this.hostname = hostname;
this.ver = version; this.ver = version;
this.startDate = startDate; this.startDate = startDate;
this.connectionManager = connectionManager; this.connectionManager = connectionManager;
...@@ -54,17 +57,34 @@ public class XMPPServerInfoImpl implements XMPPServerInfo { ...@@ -54,17 +57,34 @@ public class XMPPServerInfoImpl implements XMPPServerInfo {
return ver; return ver;
} }
@Deprecated
public String getName() { public String getName() {
return name; return getXmppDomain();
} }
@Deprecated
public void setName(String serverName) { public void setName(String serverName) {
name = serverName; setXmppDomain(serverName);
if (serverName == null) { }
public String getHostname()
{
return hostname;
}
public String getXmppDomain()
{
return xmppDomain;
}
public void setXmppDomain(String domainName)
{
this.xmppDomain = domainName;
if (domainName == null) {
JiveGlobals.deleteProperty("xmpp.domain"); JiveGlobals.deleteProperty("xmpp.domain");
} }
else { else {
JiveGlobals.setProperty("xmpp.domain", serverName); JiveGlobals.setProperty("xmpp.domain", domainName);
} }
} }
......
src/web/images/jive-body-bg.gif

82 Bytes | W: | H:

src/web/images/jive-body-bg.gif

82 Bytes | W: | H:

src/web/images/jive-body-bg.gif
src/web/images/jive-body-bg.gif
src/web/images/jive-body-bg.gif
src/web/images/jive-body-bg.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/jive-nav-bg-on.gif

371 Bytes | W: | H:

src/web/images/jive-nav-bg-on.gif

329 Bytes | W: | H:

src/web/images/jive-nav-bg-on.gif
src/web/images/jive-nav-bg-on.gif
src/web/images/jive-nav-bg-on.gif
src/web/images/jive-nav-bg-on.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/jive-subnav-bg.gif

209 Bytes | W: | H:

src/web/images/jive-subnav-bg.gif

208 Bytes | W: | H:

src/web/images/jive-subnav-bg.gif
src/web/images/jive-subnav-bg.gif
src/web/images/jive-subnav-bg.gif
src/web/images/jive-subnav-bg.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/jive-tertnav-arrow.gif

49 Bytes | W: | H:

src/web/images/jive-tertnav-arrow.gif

49 Bytes | W: | H:

src/web/images/jive-tertnav-arrow.gif
src/web/images/jive-tertnav-arrow.gif
src/web/images/jive-tertnav-arrow.gif
src/web/images/jive-tertnav-arrow.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/jive-tertnav-top.gif

157 Bytes | W: | H:

src/web/images/jive-tertnav-top.gif

128 Bytes | W: | H:

src/web/images/jive-tertnav-top.gif
src/web/images/jive-tertnav-top.gif
src/web/images/jive-tertnav-top.gif
src/web/images/jive-tertnav-top.gif
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
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