1<%@ page contentType="text/html; charset=UTF-8" %>
2<%--
3<%--
4  -
5  - Copyright (C) 2004-2008 Jive Software. All rights reserved.
6  -
7  - Licensed under the Apache License, Version 2.0 (the "License");
8  - you may not use this file except in compliance with the License.
9  - You may obtain a copy of the License at
10  -
11  -     http://www.apache.org/licenses/LICENSE-2.0
12  -
13  - Unless required by applicable law or agreed to in writing, software
14  - distributed under the License is distributed on an "AS IS" BASIS,
15  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  - See the License for the specific language governing permissions and
17  - limitations under the License.
18--%>
19
20<%@ page import="org.jivesoftware.admin.AdminConsole"%>
21<%@ page import="org.jivesoftware.openfire.Connection"%>
22<%@ page import="org.jivesoftware.openfire.JMXManager" %>
23<%@ page import="org.jivesoftware.openfire.XMPPServer" %>
24<%@ page import="org.jivesoftware.openfire.container.AdminConsolePlugin" %>
25<%@ page import="org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy" %>
26<%@ page import="org.jivesoftware.openfire.http.HttpBindManager" %>
27<%@ page import="org.jivesoftware.openfire.keystore.IdentityStore" %>
28<%@ page import="org.jivesoftware.openfire.mediaproxy.MediaProxyService" %>
29<%@ page import="org.jivesoftware.openfire.spi.ConnectionListener" %>
30<%@ page import="org.jivesoftware.openfire.spi.ConnectionManagerImpl" %>
31<%@ page import="org.jivesoftware.openfire.spi.ConnectionType" %>
32<%@ page import="org.jivesoftware.openfire.update.Update" %>
33<%@ page import="org.jivesoftware.openfire.update.UpdateManager" %>
34<%@ page import="org.jivesoftware.util.JiveGlobals" %>
35<%@ page import="org.jivesoftware.util.LocaleUtils" %>
36<%@ page import="org.jivesoftware.util.StringUtils" %>
37<%@ page import="org.slf4j.LoggerFactory" %>
38<%@ page import="java.net.URL" %>
39<%@ page import="java.text.DecimalFormat" %>
40<%@ page import="java.util.Arrays" %>
41<%@ page import="java.util.List" %>
42<%@ page import="org.jivesoftware.openfire.net.DNSUtil" %>
43<%@ page import="org.xmpp.packet.JID" %>
44<%@ page import="java.io.InputStream" %>
45<%@ page import="org.apache.http.HttpHost" %>
46<%@ page import="org.apache.http.conn.routing.HttpRoutePlanner" %>
47<%@ page import="org.apache.http.impl.conn.DefaultProxyRoutePlanner" %>
48<%@ page import="org.apache.http.impl.conn.DefaultRoutePlanner" %>
49<%@ page import="org.apache.http.impl.client.CloseableHttpClient" %>
50<%@ page import="org.apache.http.impl.client.HttpClients" %>
51<%@ page import="org.apache.http.client.methods.CloseableHttpResponse" %>
52<%@ page import="org.apache.http.client.methods.HttpGet" %>
53<%@ page import="com.rometools.rome.io.SyndFeedInput" %>
54<%@ page import="com.rometools.rome.feed.synd.SyndFeed" %>
55<%@ page import="com.rometools.rome.feed.synd.SyndEntry" %>
56<%@ page import="java.io.InputStreamReader" %>
57
58<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
59<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
60
61<%-- Define page bean for header and sidebar --%>
62<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
63
64<%  // Simple logout code
65    if ("true".equals(request.getParameter("logout"))) {
66        session.removeAttribute("jive.admin.authToken");
67        response.sendRedirect("index.jsp");
68        return;
69    }
70%>
71
72<%-- Define Administration Bean --%>
73<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"  />
74<% webManager.init(request, response, session, application, out); %>
75
76<%! long lastRSSFetch = 0;
77    SyndFeed lastBlogFeed = null;
78    String blogFeedRSS = "https://discourse.igniterealtime.org/c/blogs/ignite-realtime-blogs.rss";
79
80%>
81<% // Get parameters //
82    boolean serverOn = (webManager.getXMPPServer() != null);
83
84    ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
85
86    // Network interface (if any) is configured for all ports on the server
87    AdminConsolePlugin adminConsolePlugin =
88            (AdminConsolePlugin) XMPPServer.getInstance().getPluginManager().getPlugin("admin");
89
90    FileTransferProxy fileTransferProxy = XMPPServer.getInstance().getFileTransferProxy();
91    HttpBindManager httpBindManager = HttpBindManager.getInstance();
92    MediaProxyService mediaProxyService = XMPPServer.getInstance().getMediaProxyService();
93
94    boolean rssEnabled = JiveGlobals.getBooleanProperty("rss.enabled", true);
95%>
96
97<html>
98    <head>
99        <title><fmt:message key="index.title"/></title>
100        <meta name="pageID" content="server-settings"/>
101        <meta name="helpPage" content="about_the_server.html"/>
102    </head>
103    <body>
104
105<%
106    UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
107    Update serverUpdate = updateManager.getServerUpdate();
108    pageContext.setAttribute( "serverUpdate", serverUpdate ); %>
109
110    <c:if test="${not empty serverUpdate}">
111        <div class="warning">
112            <table cellpadding="0" cellspacing="0" border="0" >
113                <tbody>
114                <tr>
115                    <td class="jive-icon-label">
116                        <b><fmt:message key="index.update.alert" /></b><br/><br/>
117                    </td>
118                </tr>
119                <td valign="top" align="left" colspan="2">
120                    <span><fmt:message key="index.update.info">
121                        <fmt:param value="${serverUpdate.latestVersion}" />
122                        <fmt:param value="<a href=\"${serverUpdate.URL}\">" />
123                        <fmt:param value="</a>"/>
124                        <fmt:param value="<a href=\"${serverUpdate.changelog}\">"/>
125                        <fmt:param value="</a>"/>
126                    </fmt:message></span>
127                </td>
128                </tbody>
129            </table>
130        </div>
131        <br>
132    </c:if>
133
134<style type="text/css">
135.bar TD {
136    padding : 0;
137}
138#jive-latest-activity .jive-bottom-line {
139    padding-top: 10px;
140    border-bottom : 1px #e8a400 solid;
141    }
142#jive-latest-activity {
143    border: 1px #E8A400 solid;
144    background-color: #FFFBE2;
145    font-family: Lucida Grande, Arial, Helvetica, sans-serif;
146    font-size: 9pt;
147    padding: 0 10px 10px 10px;
148    margin-bottom: 10px;
149    min-height: 280px;
150    -moz-border-radius: 4px;
151    width: 95%;
152    margin-right: 20px;
153    }
154#jive-latest-activity h4 {
155    font-size: 13pt;
156    margin: 15px 0 4px 0;
157    }
158#jive-latest-activity h5 {
159    font-size: 9pt;
160    font-weight: normal;
161    margin: 15px 0 5px 5px;
162    padding: 0;
163    }
164#jive-latest-activity .jive-blog-date {
165    font-size: 8pt;
166    white-space: nowrap;
167    }
168#jive-latest-activity .jive-feed-icon {
169    float: right;
170    padding-top: 10px;
171    }
172.info-header {
173    background-color: #eee;
174    font-size: 10pt;
175}
176.info-table {
177    margin-right: 12px;
178}
179.info-table .c1 {
180    text-align: right;
181    vertical-align: top;
182    color: #666;
183    font-weight: bold;
184    font-size: 9pt;
185    white-space: nowrap;
186}
187.info-table .c2 {
188    font-size: 9pt;
189    width: 90%;
190}
191</style>
192
193<p>
194<fmt:message key="index.title.info" />
195</p>
196<table border="0" width="100%">
197    <td valign="top">
198
199        <!-- <div class="jive-table"> -->
200        <table border="0" cellpadding="2" cellspacing="2" width="100%" class="info-table">
201        <thead>
202            <tr>
203                <th colspan="2" align="left" class="info-header"><fmt:message key="index.properties" /></th>
204            </tr>
205        </thead>
206        <tbody>
207
208            <%  if (serverOn) { %>
209
210                 <tr>
211                    <td class="c1"><fmt:message key="index.uptime" /></td>
212                    <td class="c2">
213                        <%
214                            long now = System.currentTimeMillis();
215                            long lastStarted = webManager.getXMPPServer().getServerInfo().getLastStarted().getTime();
216                            long uptime = now - lastStarted;
217                            String uptimeDisplay = StringUtils.getElapsedTime(uptime);
218                        %>
219
220                        <%  if (uptimeDisplay != null) { %>
221                            <%= uptimeDisplay %> -- started
222                        <%  } %>
223
224                        <%= JiveGlobals.formatDateTime(webManager.getXMPPServer().getServerInfo().getLastStarted()) %>
225                    </td>
226                </tr>
227
228            <%  } %>
229
230            <tr>
231                <td class="c1"><fmt:message key="index.version" /></td>
232                <td class="c2">
233                    <%= AdminConsole.getAppName() %>
234                    <%= AdminConsole.getVersionString() %>
235                </td>
236            </tr>
237            <tr>
238                <td class="c1"><fmt:message key="index.home" /></td>
239                <td class="c2">
240                    <%= JiveGlobals.getHomeDirectory() %>
241                </td>
242            </tr>
243            <tr>
244                <td class="c1">
245                    <fmt:message key="index.server_name" />
246                </td>
247                <td class="c2">
248                    <% final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.SOCKET_C2S ); %>
249                    <% try { %>
250                    <% if (!identityStore.containsDomainCertificate()) {%>
251                    <img src="images/warning-16x16.gif" width="12" height="12" border="0" alt="<fmt:message key="index.certificate-warning" />" title="<fmt:message key="index.certificate-warning" />">&nbsp;
252                    <% } %>
253                    <% } catch (Exception e) { %>
254                    <img src="images/error-16x16.gif" width="12" height="12" border="0" alt="<fmt:message key="index.certificate-error" />" title="<fmt:message key="index.certificate-error" />">&nbsp;
255                    <% } %>
256                    <c:out value="${webManager.serverInfo.XMPPDomain}"/>
257                    <% try { String whatevs = JID.domainprep(webManager.getXMPPServer().getServerInfo().getXMPPDomain()); } catch (Exception e) { %>
258                    <img src="images/error-16x16.gif" width="12" height="12" border="0" alt="<fmt:message key="index.domain-stringprep-error" />" title="<fmt:message key="index.domain-stringprep-error" />">&nbsp;
259                    <% } %>
260                </td>
261            </tr>
262            <tr><td>&nbsp;</td></tr>
263        </tbody>
264        <thead>
265            <tr>
266                <th colspan="2" align="left" class="info-header"><fmt:message key="index.environment" /></th>
267            </tr>
268        </thead>
269        <tbody>
270            <tr>
271                <td class="c1"><fmt:message key="index.jvm" /></td>
272                <td class="c2">
273                    <%
274                        String vmName = System.getProperty("java.vm.name");
275                        if (vmName == null) {
276                            vmName = "";
277                        }
278                        else {
279                            vmName = " -- " + vmName;
280                        }
281                    %>
282                    <%= System.getProperty("java.version") %> <%= System.getProperty("java.vendor") %><%= vmName %>
283                </td>
284            </tr>
285            <tr>
286                <td class="c1"><fmt:message key="index.app" /></td>
287                <td class="c2">
288                    <%= application.getServerInfo() %>
289                </td>
290            </tr>
291            <tr>
292                <td class="c1">
293                    <fmt:message key="index.host_name" />
294                </td>
295                <td class="c2">
296                    <c:out value="${webManager.serverInfo.hostname}"/>
297                    <% try { String whatevs = JID.domainprep(webManager.getXMPPServer().getServerInfo().getHostname()); } catch (Exception e) { %>
298                    <img src="images/error-16x16.gif" width="12" height="12" border="0" alt="<fmt:message key="index.hostname-stringprep-error" />" title="<fmt:message key="index.hostname-stringprep-error" />">&nbsp;
299                    <% } %>
300                    <%  // Determine if the DNS configuration for this XMPP domain needs to be evaluated.
301                        final String xmppDomain = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
302                        final String hostname = XMPPServer.getInstance().getServerInfo().getHostname();
303                        boolean dnsIssue = false;
304                        if ( !xmppDomain.equalsIgnoreCase( hostname ) )
305                        {
306                            dnsIssue = true;
307                            final List<DNSUtil.WeightedHostAddress> dnsSrvRecords = DNSUtil.srvLookup( "xmpp-client", "tcp", xmppDomain );
308                            for ( final DNSUtil.WeightedHostAddress dnsSrvRecord : dnsSrvRecords )
309                            {
310                                if ( hostname.equalsIgnoreCase( dnsSrvRecord.getHost() ) )
311                                {
312                                    dnsIssue = false;
313                                    break;
314                                }
315                            }
316                        }
317                        if ( dnsIssue ) {
318                        %>
319                        <img src="images/warning-16x16.gif" width="12" height="12" border="0">
320                            <fmt:message key="index.dns-warning">
321                                <fmt:param><a href='dns-check.jsp'></fmt:param>
322                                <fmt:param></a></fmt:param>
323                            </fmt:message>
324                        <%
325                        }
326                    %>
327                </td>
328            </tr>
329            <tr>
330                <td class="c1"><fmt:message key="index.os" /></td>
331                <td class="c2">
332                    <%= System.getProperty("os.name") %> / <%= System.getProperty("os.arch") %>
333                </td>
334            </tr>
335            <tr>
336                <td class="c1"><fmt:message key="index.local" /></td>
337                <td class="c2">
338                    <%= JiveGlobals.getLocale() %> / <%= JiveGlobals.getTimeZone().getDisplayName(JiveGlobals.getLocale()) %>
339                    (<%= (JiveGlobals.getTimeZone().getRawOffset()/1000/60/60) %> GMT)
340                </td>
341            </tr>
342            <tr>
343                <td class="c1"><fmt:message key="index.process_owner" /></td>
344                <td class="c2"><%= System.getProperty("user.name") %></td>
345            </tr>
346            <tr>
347                <td class="c1"><fmt:message key="index.memory" /></td>
348                <td>
349                <%    // The java runtime
350                    Runtime runtime = Runtime.getRuntime();
351
352                    double freeMemory = (double)runtime.freeMemory()/(1024*1024);
353                    double maxMemory = (double)runtime.maxMemory()/(1024*1024);
354                    double totalMemory = (double)runtime.totalMemory()/(1024*1024);
355                    double usedMemory = totalMemory - freeMemory;
356                    double percentFree = ((maxMemory - usedMemory)/maxMemory)*100.0;
357                    double percentUsed = 100 - percentFree;
358                    int percent = 100-(int)Math.round(percentFree);
359
360                    DecimalFormat mbFormat = new DecimalFormat("#0.00");
361                    DecimalFormat percentFormat = new DecimalFormat("#0.0");
362                %>
363
364                <table cellpadding="0" cellspacing="0" border="0" width="300">
365                <tr valign="middle">
366                    <td width="99%" valign="middle">
367                        <div class="bar">
368                        <table cellpadding="0" cellspacing="0" border="0" width="100%" style="border:1px #666 solid;">
369                        <tr>
370                            <%  if (percent == 0) { %>
371
372                                <td width="100%"><img src="images/percent-bar-left.gif" width="100%" height="8" border="0" alt=""></td>
373
374                            <%  } else { %>
375
376                                <%  if (percent >= 90) { %>
377
378                                    <td width="<%= percent %>%" background="images/percent-bar-used-high.gif"
379                                        ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>
380
381                                <%  } else { %>
382
383                                    <td width="<%= percent %>%" background="images/percent-bar-used-low.gif"
384                                        ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>
385
386                                <%  } %>
387                                <td width="<%= (100-percent) %>%" background="images/percent-bar-left.gif"
388                                    ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>
389                            <%  } %>
390                        </tr>
391                        </table>
392                        </div>
393                    </td>
394                    <td width="1%" nowrap>
395                        <div style="padding-left:6px;" class="c2">
396                        <%= mbFormat.format(usedMemory) %> MB of <%= mbFormat.format(maxMemory) %> MB (<%= percentFormat.format(percentUsed) %>%) used
397                        </div>
398                    </td>
399                </tr>
400                </table>
401                </td>
402            </tr>
403        </tbody>
404        </table>
405        <!-- </div> -->
406    </td>
407    <% if (rssEnabled) { %>
408    <td valign="top" width="40%">
409        <div id="jive-latest-activity">
410
411            <a href="<%= blogFeedRSS %>" class="jive-feed-icon"><img src="images/feed-icon-16x16.gif" alt="" style="border:0;" /></a>
412            <h4><fmt:message key="index.cs_blog" /></h4>
413            <% long nowTime = System.currentTimeMillis();
414                if (lastBlogFeed == null || nowTime - lastRSSFetch > 21600000) {
415
416                    final String proxyHost = JiveGlobals.getProperty("update.proxy.host", "").trim();
417                    final int proxyPort = JiveGlobals.getIntProperty("update.proxy.port", -1);
418                    final HttpRoutePlanner routePlanner;
419                    if( !proxyHost.isEmpty() && proxyPort > 0) {
420                        routePlanner = new DefaultProxyRoutePlanner(new HttpHost(proxyHost, proxyPort, "http"));
421                    } else {
422                        routePlanner = new DefaultRoutePlanner(null);
423                    }
424                    final HttpGet httpGet = new HttpGet(blogFeedRSS);
425
426                    try (final CloseableHttpClient client = HttpClients.custom().setRoutePlanner(routePlanner).build();
427                         final CloseableHttpResponse httpResponse = client.execute(httpGet);
428                         final InputStream stream = httpResponse.getEntity().getContent()) {
429                        final SyndFeedInput input = new SyndFeedInput();
430                        lastBlogFeed = input.build(new InputStreamReader(stream));
431                        lastRSSFetch = nowTime;
432                    } catch (final Throwable throwable) {
433                        LoggerFactory.getLogger("index.jsp").warn("Failed to fetch RSS feed:", throwable);
434                    }
435                }
436
437                %><div class="jive-bottom-line"></div><%
438                if (lastBlogFeed != null && !lastBlogFeed.getEntries().isEmpty()) {
439
440                    List entries = lastBlogFeed.getEntries();
441                    for (int i = 0; i < entries.size() && i < 7; i++) {
442                        SyndEntry entry = (SyndEntry) entries.get(i); %>
443                        <h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>,
444                        <span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5>
445                    <% }
446
447                } else { %>
448                    <fmt:message key="index.cs_blog.unavailable" />
449                 <% }
450
451            %>
452
453        </div>
454    </td>
455    <% } %>
456</table>
457
458<br>
459
460<div id="jive-title"><fmt:message key="index.server_port" /></div>
461<div class="jive-table">
462<table cellpadding="0" cellspacing="0" border="0" width="100%">
463<thead>
464    <tr>
465        <th width="100"><fmt:message key="ports.interface" /></th>
466        <th width="1"><fmt:message key="ports.port" /></th>
467        <th width="1">&nbsp;</th>
468        <th width="130"><fmt:message key="ports.type" /></th>
469        <th><fmt:message key="ports.description" /></th>
470    </tr>
471</thead>
472<tbody>
473
474<%
475    for ( ConnectionListener connectionListener : connectionManager.getListeners() )
476    {
477        if ( !connectionListener.isEnabled() )
478        {
479            continue;
480        }
481
482        pageContext.setAttribute( "connectionListener", connectionListener );
483
484        final String interfaceName;
485        if (connectionListener.getBindAddress() == null || connectionListener.getBindAddress().isAnyLocalAddress() ) {
486            interfaceName = LocaleUtils.getLocalizedString("ports.all_ports");
487        } else {
488            interfaceName = connectionListener.getBindAddress().getHostName();
489        }
490%>
491
492    <tr>
493        <td><%= interfaceName %></td>
494        <td><%= connectionListener.getPort() %></td>
495        <td>
496            <% if ( connectionListener.getTLSPolicy().equals( Connection.TLSPolicy.disabled ) ) { %>
497            <img src="images/blank.gif" width="1" height="1" alt=""/>
498            <% } else { %>
499            <img src="images/lock.gif" width="16" height="16" border="0" alt="<fmt:message key="ports.secure.alt" />" title="<fmt:message key="ports.secure.alt" />"/>
500            <% } %>
501        </td>
502        <td>
503            <%
504                final String typeName;
505                switch ( connectionListener.getType() ) {
506                    case SOCKET_C2S:
507                        typeName = LocaleUtils.getLocalizedString("ports.client_to_server");
508                        break;
509                    case SOCKET_S2S:
510                        typeName = LocaleUtils.getLocalizedString("ports.server_to_server");
511                        break;
512                    case COMPONENT:
513                        typeName = LocaleUtils.getLocalizedString("ports.external_components");
514                        break;
515                    case CONNECTION_MANAGER:
516                        typeName = LocaleUtils.getLocalizedString("ports.connection_manager");
517                        break;
518                    case WEBADMIN:
519                        typeName = LocaleUtils.getLocalizedString("ports.admin_console");
520                        break;
521                    case BOSH_C2S:
522                        typeName = LocaleUtils.getLocalizedString("ports.http_bind");
523                        break;
524                    default:
525                        typeName = "(unspecified)";
526                        break;
527                }
528            %>
529            <%=typeName%>
530        </td>
531        <td>
532            <c:choose>
533                <c:when test="${connectionListener.type eq 'SOCKET_C2S' and connectionListener.TLSPolicy ne 'legacyMode'}">
534                    <fmt:message key="ports.client_to_server.desc"/>
535                    <fmt:message key="ports.plaintext.desc">
536                        <fmt:param><a href='connection-settings-socket-c2s.jsp'></fmt:param>
537                        <fmt:param></a></fmt:param>
538                    </fmt:message>
539                </c:when>
540                <c:when test="${connectionListener.type eq 'SOCKET_C2S' and connectionListener.TLSPolicy eq 'legacyMode'}">
541                    <fmt:message key="ports.client_to_server.desc_old_ssl"/>
542                    <fmt:message key="ports.legacymode.desc">
543                        <fmt:param><a href='connection-settings-socket-c2s.jsp'></fmt:param>
544                        <fmt:param></a></fmt:param>
545                    </fmt:message>
546                </c:when>
547                <c:when test="${connectionListener.type eq 'SOCKET_S2S' and connectionListener.TLSPolicy ne 'legacyMode'}" >
548                    <fmt:message key="ports.server_to_server.desc"/>
549                    <fmt:message key="ports.plaintext.desc">
550                        <fmt:param><a href='connection-settings-socket-s2s.jsp'></fmt:param>
551                        <fmt:param></a></fmt:param>
552                    </fmt:message>
553                </c:when>
554                <c:when test="${connectionListener.type eq 'SOCKET_S2S' and connectionListener.TLSPolicy eq 'legacyMode'}" >
555                    <fmt:message key="ports.server_to_server.desc"/>
556                    <fmt:message key="ports.legacymode.desc">
557                        <fmt:param><a href='connection-settings-socket-s2s.jsp'></fmt:param>
558                        <fmt:param></a></fmt:param>
559                    </fmt:message>
560                </c:when>
561                <c:when test="${connectionListener.type eq 'COMPONENT' and connectionListener.TLSPolicy ne 'legacyMode'}">
562                    <fmt:message key="ports.external_components.desc"/>
563                    <fmt:message key="ports.plaintext.desc">
564                        <fmt:param><a href='connection-settings-external-components.jsp'></fmt:param>
565                        <fmt:param></a></fmt:param>
566                    </fmt:message>
567                </c:when>
568                <c:when test="${connectionListener.type eq 'COMPONENT' and connectionListener.TLSPolicy eq 'legacyMode'}">
569                    <fmt:message key="ports.external_components.desc_old_ssl"/>
570                    <fmt:message key="ports.legacymode.desc">
571                        <fmt:param><a href='connection-settings-external-components.jsp'></fmt:param>
572                        <fmt:param></a></fmt:param>
573                    </fmt:message>
574                </c:when>
575                <c:when test="${connectionListener.type eq 'CONNECTION_MANAGER' and connectionListener.TLSPolicy ne 'legacyMode'}">
576                    <fmt:message key="ports.connection_manager.desc"/>
577                    <fmt:message key="ports.plaintext.desc">
578                        <fmt:param><a href='connection-managers-settings.jsp'></fmt:param>
579                        <fmt:param></a></fmt:param>
580                    </fmt:message>
581                </c:when>
582                <c:when test="${connectionListener.type eq 'CONNECTION_MANAGER' and connectionListener.TLSPolicy eq 'legacyMode'}">
583                    <fmt:message key="ports.connection_manager.desc_old_ssl"/>
584                    <fmt:message key="ports.legacymode.desc">
585                        <fmt:param><a href='connection-managers-settings.jsp'></fmt:param>
586                        <fmt:param></a></fmt:param>
587                    </fmt:message>
588                </c:when>
589                <c:when test="${connectionListener.type eq 'WEBADMIN' and connectionListener.TLSPolicy ne 'legacyMode'}">
590                    <fmt:message key="ports.admin_console.desc_unsecured"/>
591                </c:when>
592                <c:when test="${connectionListener.type eq 'WEBADMIN' and connectionListener.TLSPolicy eq 'legacyMode'}">
593                    <fmt:message key="ports.admin_console.desc_secured"/>
594                </c:when>
595                <c:when test="${connectionListener.type eq 'BOSH_C2S' and connectionListener.TLSPolicy ne 'legacyMode'}">
596                    <fmt:message key="ports.http_bind.desc_unsecured"/>
597                </c:when>
598                <c:when test="${connectionListener.type eq 'BOSH_C2S' and connectionListener.TLSPolicy eq 'legacyMode'}">
599                    <fmt:message key="ports.http_bind.desc_secured"/>
600                </c:when>
601            </c:choose>
602        </td>
603    </tr>
604<%
605    }
606
607    final String interfaceName;
608    if (connectionManager.getListenAddress() == null || connectionManager.getListenAddress().isAnyLocalAddress() ) {
609        interfaceName = LocaleUtils.getLocalizedString("ports.all_ports");
610    } else {
611        interfaceName = connectionManager.getListenAddress().getHostName();
612    }
613%>
614    <%
615        if (fileTransferProxy.isProxyEnabled()) {
616    %>
617    <tr>
618        <td><%= interfaceName %></td>
619        <td><%= fileTransferProxy.getProxyPort() %></td>
620        <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
621        <td><fmt:message key="ports.file_proxy" /></td>
622        <td><fmt:message key="ports.file_proxy.desc" /></td>
623    </tr>
624    <% } %>
625    <%
626        if (mediaProxyService.isEnabled()) {
627    %>
628    <tr>
629        <td><%= interfaceName %></td>
630        <td><%= mediaProxyService.getMinPort() %> - <%= mediaProxyService.getMaxPort() %></td>
631        <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
632        <td><fmt:message key="ports.media_proxy" /></td>
633        <td><fmt:message key="ports.media_proxy.desc" /></td>
634    </tr>
635    <% } %>
636    <%
637        if (JMXManager.isEnabled()) {
638    %>
639    <tr>
640        <td><%= interfaceName %></td>
641        <td><%= JMXManager.getPort() %></td>
642        <td><% if (JMXManager.isSecure()) {
643            %><img src="images/user.gif" width="16" height="16" border="0" alt="<fmt:message key="ports.jmx_console.alt" />" title="<fmt:message key="ports.jmx_console.alt" />"/><%
644        } else {
645            %><img src="images/blank.gif" width="1" height="1" alt=""><% }
646        %></td>
647        <td><fmt:message key="ports.jmx_console" /></td>
648        <td><fmt:message key="ports.jmx_console.desc" /></td>
649    </tr>
650    <% } %>
651</tbody>
652</table>
653</div>
654<br>
655
656<form action="server-props.jsp">
657<input type="submit" value="<fmt:message key="global.edit_properties" />">
658</form>
659
660    </body>
661</html>
662