Commit 35c45af7 authored by Guus der Kinderen's avatar Guus der Kinderen Committed by GitHub

OF-1244: UI improvements. (#710)

parent 62fef669
......@@ -3198,3 +3198,10 @@ system.dns.srv.check.no-records.one-liner=No DNS SRV records for this host are f
system.dns.srv.check.no-records.description=There appear to be no DNS SRV records at all for this XMPP domain. With the current configuration of Openfire, it is recommended that DNS SRV records are created for this server.
system.dns.srv.check.no-match.one-liner=DNS SRV records do not include this host.
system.dns.srv.check.no-match.description=DNS SRV records for this XMPP domain are found, but none of them match the fully qualified domain name of this server. This typically occurs when the DNS SRV record uses a different identifier for this host than the fully qualified domain name as configured in Openfire. This should be corrected, as it is known to cause problems with certain authentication mechanisms. Another possibility is that this instance of Openfire is part of a cluster, but has not yet been included in the DNS configuration.
system.dns.srv.check.label.client-host=Host (xmpp-client)
system.dns.srv.check.label.server-host=Host (xmpp-server)
system.dns.srv.check.label.port=Port
system.dns.srv.check.label.priority=Priority
system.dns.srv.check.label.weight=Weight
system.dns.srv.check.recordbox.title=DNS SRV records
system.dns.srv.check.recordbox.description=The table below lists all DNS SRV records for the XMPP domain that is services by this instance of Openfire. The first table contains all client-to-server records, the last table all server-to-server records.
......@@ -15,12 +15,22 @@
<%
final String xmppDomain = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
final String hostname = XMPPServer.getInstance().getServerInfo().getHostname();
final List<DNSUtil.WeightedHostAddress> dnsSrvRecords = DNSUtil.srvLookup( "xmpp-client", "tcp", xmppDomain );
final List<DNSUtil.WeightedHostAddress> dnsSrvRecordsClient = DNSUtil.srvLookup( "xmpp-client", "tcp", xmppDomain );
final List<DNSUtil.WeightedHostAddress> dnsSrvRecordsServer = DNSUtil.srvLookup( "xmpp-server", "tcp", xmppDomain );
boolean detectedRecordForHostname = false;
for ( final DNSUtil.WeightedHostAddress dnsSrvRecord : dnsSrvRecords )
for ( final DNSUtil.WeightedHostAddress dnsSrvRecord : dnsSrvRecordsClient )
{
if ( hostname.equalsIgnoreCase( dnsSrvRecord.getHost() ) )
if ( hostname.equalsIgnoreCase( dnsSrvRecord.getHost() ) )
{
detectedRecordForHostname = true;
break;
}
}
for ( final DNSUtil.WeightedHostAddress dnsSrvRecord : dnsSrvRecordsServer )
{
if ( hostname.equalsIgnoreCase( dnsSrvRecord.getHost() ) )
{
detectedRecordForHostname = true;
break;
......@@ -29,7 +39,8 @@
pageContext.setAttribute( "xmppDomain", xmppDomain );
pageContext.setAttribute( "hostname", hostname );
pageContext.setAttribute( "dnsSrvRecords", dnsSrvRecords );
pageContext.setAttribute( "dnsSrvRecordsClient", dnsSrvRecordsClient );
pageContext.setAttribute( "dnsSrvRecordsServer", dnsSrvRecordsServer );
pageContext.setAttribute( "detectedRecordForHostname", detectedRecordForHostname );
%>
......@@ -53,7 +64,7 @@
</admin:infobox>
<fmt:message key="system.dns.srv.check.xmppdomain_equals_hostname.description" var="plaintextboxcontent"/>
</c:when>
<c:when test="${empty dnsSrvRecords}">
<c:when test="${empty dnsSrvRecordsServer and empty dnsSrvRecordsClient}">
<admin:infobox type="warning">
<fmt:message key="system.dns.srv.check.no-records.one-liner" />
</admin:infobox>
......@@ -81,21 +92,26 @@
<c:out value="${plaintextboxcontent}"/>
</admin:contentBox>
<c:if test="${not empty dnsSrvRecords}">
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
<c:if test="${not empty dnsSrvRecordsClient or not empty dnsSrvRecordsServer}">
<fmt:message key="system.dns.srv.check.recordbox.title" var="plaintextboxtitle"/>
<admin:contentBox title="${plaintextboxtitle}">
<p><fmt:message key="system.dns.srv.check.recordbox.description"/></p>
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
<tr>
<th>&nbsp;</th>
<th nowrap><fmt:message key="server.session.label.host" /></th>
<th nowrap colspan="3"><fmt:message key="server.session.label.connection" /></th>
<th nowrap><fmt:message key="server.session.label.creation" /></th>
<th nowrap><fmt:message key="server.session.label.last_active" /></th>
<th nowrap><fmt:message key="server.session.label.close_connect" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.client-host" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.port" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.priority" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.weight" /></th>
</tr>
</thead>
<tbody>
<c:forEach var="dnsSrvRecord" items="${dnsSrvRecords}" varStatus="varStatus">
</thead>
<tbody>
<c:forEach var="dnsSrvRecord" items="${dnsSrvRecordsClient}" varStatus="varStatus">
<c:choose>
<c:when test="${dnsSrvRecord.host.toLowerCase() eq hostname}">
<c:set var="cssClass" value="jive-highlight"/>
......@@ -112,11 +128,50 @@
<td nowrap><c:out value="${dnsSrvRecord.weight}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</tbody>
</table>
</div>
<br/>
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
<tr>
<th>&nbsp;</th>
<th nowrap><fmt:message key="system.dns.srv.check.label.server-host" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.port" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.priority" /></th>
<th nowrap><fmt:message key="system.dns.srv.check.label.weight" /></th>
</tr>
</thead>
<tbody>
<c:forEach var="dnsSrvRecord" items="${dnsSrvRecordsServer}" varStatus="varStatus">
<c:choose>
<c:when test="${dnsSrvRecord.host.toLowerCase() eq hostname}">
<c:set var="cssClass" value="jive-highlight"/>
</c:when>
<c:otherwise>
<c:set var="cssClass" value="${varStatus.count % 2 eq 0 ? 'jive-even' : 'jive-odd' }"/>
</c:otherwise>
</c:choose>
<tr class="${cssClass}">
<td width="1%" nowrap><c:out value="${varStatus.count}"/></td>
<td nowrap><c:out value="${dnsSrvRecord.host}"/></td>
<td nowrap><c:out value="${dnsSrvRecord.port}"/></td>
<td nowrap><c:out value="${dnsSrvRecord.priority}"/></td>
<td nowrap><c:out value="${dnsSrvRecord.weight}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</admin:contentBox>
</c:if>
<br/>
<p>
<fmt:message key="system.dns.srv.check.rationale" />
</p>
......
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