index.jsp 25.9 KB
Newer Older
1
<%--
Bill Lynch's avatar
Bill Lynch committed
2 3 4 5
<%--
  -	$Revision$
  -	$Date$
  -
6
  - Copyright (C) 2004-2008 Jive Software. All rights reserved.
Bill Lynch's avatar
Bill Lynch committed
7
  -
8 9 10 11 12 13 14 15 16 17 18
  - Licensed under the Apache License, Version 2.0 (the "License");
  - you may not use this file except in compliance with the License.
  - You may obtain a copy of the License at
  -
  -     http://www.apache.org/licenses/LICENSE-2.0
  -
  - Unless required by applicable law or agreed to in writing, software
  - distributed under the License is distributed on an "AS IS" BASIS,
  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - See the License for the specific language governing permissions and
  - limitations under the License.
Bill Lynch's avatar
Bill Lynch committed
19 20
--%>

Gaston Dombiak's avatar
Gaston Dombiak committed
21 22 23
<%@ page import="com.sun.syndication.feed.synd.SyndEntry,
                 com.sun.syndication.feed.synd.SyndFeed,
                 com.sun.syndication.fetcher.FeedFetcher"
Bill Lynch's avatar
Bill Lynch committed
24
%>
Gaston Dombiak's avatar
Gaston Dombiak committed
25 26 27
<%@ page import="com.sun.syndication.fetcher.impl.FeedFetcherCache"%>
<%@ page import="com.sun.syndication.fetcher.impl.HashMapFeedInfoCache"%>
<%@ page import="org.jivesoftware.admin.AdminConsole"%>
28 29 30 31
<%@ page import="org.jivesoftware.openfire.Connection"%>
<%@ page import="org.jivesoftware.openfire.FlashCrossDomainHandler" %>
<%@ page import="org.jivesoftware.openfire.JMXManager" %>
<%@ page import="org.jivesoftware.openfire.XMPPServer" %>
Gaston Dombiak's avatar
Gaston Dombiak committed
32 33
<%@ page import="org.jivesoftware.openfire.container.AdminConsolePlugin" %>
<%@ page import="org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy" %>
34
<%@ page import="org.jivesoftware.openfire.http.HttpBindManager" %>
35
<%@ page import="org.jivesoftware.openfire.keystore.IdentityStore" %>
36
<%@ page import="org.jivesoftware.openfire.mediaproxy.MediaProxyService" %>
37
<%@ page import="org.jivesoftware.openfire.spi.ConnectionListener" %>
38
<%@ page import="org.jivesoftware.openfire.spi.ConnectionManagerImpl" %>
39
<%@ page import="org.jivesoftware.openfire.spi.ConnectionType" %>
40 41
<%@ page import="org.jivesoftware.openfire.update.Update" %>
<%@ page import="org.jivesoftware.openfire.update.UpdateManager" %>
42 43 44 45 46
<%@ page import="org.jivesoftware.util.HttpClientWithTimeoutFeedFetcher" %>
<%@ page import="org.jivesoftware.util.JiveGlobals" %>
<%@ page import="org.jivesoftware.util.LocaleUtils" %>
<%@ page import="org.jivesoftware.util.StringUtils" %>
<%@ page import="org.slf4j.LoggerFactory" %>
Gaston Dombiak's avatar
Gaston Dombiak committed
47
<%@ page import="java.net.URL" %>
Gaston Dombiak's avatar
Gaston Dombiak committed
48
<%@ page import="java.text.DecimalFormat" %>
49
<%@ page import="java.util.Arrays" %>
Gaston Dombiak's avatar
Gaston Dombiak committed
50
<%@ page import="java.util.List" %>
Bill Lynch's avatar
Bill Lynch committed
51

52 53
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
Bill Lynch's avatar
Bill Lynch committed
54 55 56 57

<%-- Define page bean for header and sidebar --%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />

Bill Lynch's avatar
Bill Lynch committed
58 59 60 61 62 63 64 65
<%  // Simple logout code
    if ("true".equals(request.getParameter("logout"))) {
        session.removeAttribute("jive.admin.authToken");
        response.sendRedirect("index.jsp");
        return;
    }
%>

Bill Lynch's avatar
Bill Lynch committed
66
<%-- Define Administration Bean --%>
67 68
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"  />
<% webManager.init(request, response, session, application, out); %>
Bill Lynch's avatar
Bill Lynch committed
69

70
<%! long lastRSSFetch = 0;
Gaston Dombiak's avatar
Gaston Dombiak committed
71 72
    SyndFeed lastBlogFeed = null;
    SyndFeed lastReleaseFeed = null;
73 74
    String blogFeedRSS = "https://community.igniterealtime.org/blogs/ignite/feeds/posts";
    String releaseFeedRSS = "https://community.igniterealtime.org/community/feeds/messages?community=2017";
Gaston Dombiak's avatar
Gaston Dombiak committed
75 76

%>
77
<% // Get parameters //
78
    boolean serverOn = (webManager.getXMPPServer() != null);
79

80
    ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
81 82

    // Network interface (if any) is configured for all ports on the server
83 84 85
    AdminConsolePlugin adminConsolePlugin =
            (AdminConsolePlugin) XMPPServer.getInstance().getPluginManager().getPlugin("admin");

86 87 88
    FileTransferProxy fileTransferProxy = XMPPServer.getInstance().getFileTransferProxy();
    HttpBindManager httpBindManager = HttpBindManager.getInstance();
    MediaProxyService mediaProxyService = XMPPServer.getInstance().getMediaProxyService();
89
    FlashCrossDomainHandler flashCrossDomainHandler = XMPPServer.getInstance().getFlashCrossDomainHandler();
90

91
    boolean rssEnabled = JiveGlobals.getBooleanProperty("rss.enabled", true);
92 93
%>

94 95 96 97 98 99 100
<html>
    <head>
        <title><fmt:message key="index.title"/></title>
        <meta name="pageID" content="server-settings"/>
        <meta name="helpPage" content="about_the_server.html"/>
    </head>
    <body>
Bill Lynch's avatar
Bill Lynch committed
101

102 103 104
<%
    UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
    Update serverUpdate = updateManager.getServerUpdate();
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
    pageContext.setAttribute( "serverUpdate", serverUpdate ); %>

    <c:if test="${not empty serverUpdate}">
        <div class="warning">
            <table cellpadding="0" cellspacing="0" border="0" >
                <tbody>
                <tr>
                    <td class="jive-icon-label">
                        <b><fmt:message key="index.update.alert" /></b><br/><br/>
                    </td>
                </tr>
                <td valign="top" align="left" colspan="2">
                    <span><fmt:message key="index.update.info">
                        <fmt:param value="${serverUpdate.latestVersion}" />
                        <fmt:param value="<a href=\"${serverUpdate.URL}\">" />
                        <fmt:param value="</a>"/>
                        <fmt:param value="<a href=\"${serverUpdate.changelog}\">"/>
                        <fmt:param value="</a>"/>
                    </fmt:message></span>
                </td>
                </tbody>
            </table>
        </div>
        <br>
    </c:if>
130

131 132
<style type="text/css">
.bar TD {
133
    padding : 0;
134
}
Gaston Dombiak's avatar
Gaston Dombiak committed
135 136 137 138 139 140
#jive-latest-activity .jive-bottom-line {
	padding-top: 10px;
    border-bottom : 1px #e8a400 solid;
	}
#jive-latest-activity {
    border: 1px #E8A400 solid;
141
    background-color: #FFFBE2;
Gaston Dombiak's avatar
Gaston Dombiak committed
142 143 144 145 146 147
	font-family: Lucida Grande, Arial, Helvetica, sans-serif;
	font-size: 9pt;
    padding: 0 10px 10px 10px;
    margin-bottom: 10px;
    min-height: 280px;
    -moz-border-radius: 4px;
148 149
    width: 95%;
    margin-right: 20px;
Gaston Dombiak's avatar
Gaston Dombiak committed
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
	}
#jive-latest-activity h4 {
	font-size: 13pt;
	margin: 15px 0 4px 0;
	}
#jive-latest-activity h5 {
	font-size: 9pt;
	font-weight: normal;
    margin: 15px 0 5px 5px;
	padding: 0;
	}
#jive-latest-activity .jive-blog-date {
    font-size: 8pt;
    white-space: nowrap;
	}
#jive-latest-activity .jive-feed-icon {
    float: right;
    padding-top: 10px;
	}
169
.info-header {
170
    background-color: #eee;
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
    font-size: 10pt;
}
.info-table {
    margin-right: 12px;
}
.info-table .c1 {
    text-align: right;
    vertical-align: top;
    color: #666;
    font-weight: bold;
    font-size: 9pt;
    white-space: nowrap;
}
.info-table .c2 {
    font-size: 9pt;
    width: 90%;
}
188
</style>
189

Gaston Dombiak's avatar
Gaston Dombiak committed
190 191 192 193 194 195 196
<p>
<fmt:message key="index.title.info" />
</p>
<table border="0" width="100%">
    <td valign="top">

        <!-- <div class="jive-table"> -->
197
        <table border="0" cellpadding="2" cellspacing="2" width="100%" class="info-table">
Gaston Dombiak's avatar
Gaston Dombiak committed
198 199
        <thead>
            <tr>
200
                <th colspan="2" align="left" class="info-header"><fmt:message key="index.properties" /></th>
Gaston Dombiak's avatar
Gaston Dombiak committed
201 202 203 204 205 206 207 208
            </tr>
        </thead>
        <tbody>

            <%  if (serverOn) { %>

                 <tr>
                    <td class="c1"><fmt:message key="index.uptime" /></td>
209
                    <td class="c2">
Gaston Dombiak's avatar
Gaston Dombiak committed
210 211 212 213 214 215 216 217 218 219
                        <%
                            long now = System.currentTimeMillis();
                            long lastStarted = webManager.getXMPPServer().getServerInfo().getLastStarted().getTime();
                            long uptime = now - lastStarted;
                            String uptimeDisplay = StringUtils.getElapsedTime(uptime);
                        %>

                        <%  if (uptimeDisplay != null) { %>
                            <%= uptimeDisplay %> -- started
                        <%  } %>
220

Gaston Dombiak's avatar
Gaston Dombiak committed
221 222 223
                        <%= JiveGlobals.formatDateTime(webManager.getXMPPServer().getServerInfo().getLastStarted()) %>
                    </td>
                </tr>
224

Gaston Dombiak's avatar
Gaston Dombiak committed
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
            <%  } %>

            <tr>
                <td class="c1"><fmt:message key="index.version" /></td>
                <td class="c2">
                    <%= AdminConsole.getAppName() %>
                    <%= AdminConsole.getVersionString() %>
                </td>
            </tr>
            <tr>
                <td class="c1"><fmt:message key="index.home" /></td>
                <td class="c2">
                    <%= JiveGlobals.getHomeDirectory() %>
                </td>
            </tr>
            <tr>
                <td class="c1">
                    <fmt:message key="index.server_name" />
                </td>
                <td class="c2">
245
                    <% final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.SOCKET_C2S ); %>
246
                    <% try { %>
247
                    <% if (!identityStore.containsDomainCertificate( "RSA" )) {%>
248 249 250 251
                    <img src="images/warning-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="index.certificate-warning" />" title="<fmt:message key="index.certificate-warning" />">&nbsp;
                    <% } %>
                    <% } catch (Exception e) { %>
                    <img src="images/error-16x16.gif" width="16" height="16" border="0" alt="<fmt:message key="index.certificate-error" />" title="<fmt:message key="index.certificate-error" />">&nbsp;
Gaston Dombiak's avatar
Gaston Dombiak committed
252
                    <% } %>
Gaston Dombiak's avatar
Gaston Dombiak committed
253
                    ${webManager.serverInfo.XMPPDomain}
Gaston Dombiak's avatar
Gaston Dombiak committed
254 255 256 257 258 259
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
        </tbody>
        <thead>
            <tr>
260
                <th colspan="2" align="left" class="info-header"><fmt:message key="index.environment" /></th>
Gaston Dombiak's avatar
Gaston Dombiak committed
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class="c1"><fmt:message key="index.jvm" /></td>
                <td class="c2">
                    <%
                        String vmName = System.getProperty("java.vm.name");
                        if (vmName == null) {
                            vmName = "";
                        }
                        else {
                            vmName = " -- " + vmName;
                        }
                    %>
                    <%= System.getProperty("java.version") %> <%= System.getProperty("java.vendor") %><%= vmName %>
                </td>
            </tr>
            <tr>
                <td class="c1"><fmt:message key="index.app" /></td>
                <td class="c2">
                    <%= application.getServerInfo() %>
                </td>
            </tr>
285 286 287 288 289 290 291 292
            <tr>
                <td class="c1">
                    <fmt:message key="index.host_name" />
                </td>
                <td class="c2">
                    ${webManager.serverInfo.hostname}
                </td>
            </tr>
Gaston Dombiak's avatar
Gaston Dombiak committed
293 294 295 296 297 298 299 300 301 302 303 304 305 306
            <tr>
                <td class="c1"><fmt:message key="index.os" /></td>
                <td class="c2">
                    <%= System.getProperty("os.name") %> / <%= System.getProperty("os.arch") %>
                </td>
            </tr>
            <tr>
                <td class="c1"><fmt:message key="index.local" /></td>
                <td class="c2">
                    <%= JiveGlobals.getLocale() %> / <%= JiveGlobals.getTimeZone().getDisplayName(JiveGlobals.getLocale()) %>
                    (<%= (JiveGlobals.getTimeZone().getRawOffset()/1000/60/60) %> GMT)
                </td>
            </tr>
            <tr>
307
                <td class="c1"><fmt:message key="index.memory" /></td>
Gaston Dombiak's avatar
Gaston Dombiak committed
308 309 310 311 312 313 314 315 316 317 318 319 320 321
                <td>
                <%    // The java runtime
                    Runtime runtime = Runtime.getRuntime();

                    double freeMemory = (double)runtime.freeMemory()/(1024*1024);
                    double maxMemory = (double)runtime.maxMemory()/(1024*1024);
                    double totalMemory = (double)runtime.totalMemory()/(1024*1024);
                    double usedMemory = totalMemory - freeMemory;
                    double percentFree = ((maxMemory - usedMemory)/maxMemory)*100.0;
                    double percentUsed = 100 - percentFree;
                    int percent = 100-(int)Math.round(percentFree);

                    DecimalFormat mbFormat = new DecimalFormat("#0.00");
                    DecimalFormat percentFormat = new DecimalFormat("#0.0");
322 323
                %>

Gaston Dombiak's avatar
Gaston Dombiak committed
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
                <table cellpadding="0" cellspacing="0" border="0" width="300">
                <tr valign="middle">
                    <td width="99%" valign="middle">
                        <div class="bar">
                        <table cellpadding="0" cellspacing="0" border="0" width="100%" style="border:1px #666 solid;">
                        <tr>
                            <%  if (percent == 0) { %>

                                <td width="100%"><img src="images/percent-bar-left.gif" width="100%" height="8" border="0" alt=""></td>

                            <%  } else { %>

                                <%  if (percent >= 90) { %>

                                    <td width="<%= percent %>%" background="images/percent-bar-used-high.gif"
                                        ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>

                                <%  } else { %>

                                    <td width="<%= percent %>%" background="images/percent-bar-used-low.gif"
                                        ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>

                                <%  } %>
                                <td width="<%= (100-percent) %>%" background="images/percent-bar-left.gif"
                                    ><img src="images/blank.gif" width="1" height="8" border="0" alt=""></td>
                            <%  } %>
                        </tr>
                        </table>
                        </div>
                    </td>
                    <td width="1%" nowrap>
355
                        <div style="padding-left:6px;" class="c2">
Gaston Dombiak's avatar
Gaston Dombiak committed
356 357 358
                        <%= mbFormat.format(usedMemory) %> MB of <%= mbFormat.format(maxMemory) %> MB (<%= percentFormat.format(percentUsed) %>%) used
                        </div>
                    </td>
359 360
                </tr>
                </table>
Gaston Dombiak's avatar
Gaston Dombiak committed
361 362 363
                </td>
            </tr>
        </tbody>
364
        </table>
Gaston Dombiak's avatar
Gaston Dombiak committed
365 366
        <!-- </div> -->
    </td>
367
    <% if (rssEnabled) { %>
368
    <td valign="top" width="40%"> 
Gaston Dombiak's avatar
Gaston Dombiak committed
369 370 371 372 373
        <div id="jive-latest-activity">

            <a href="<%= blogFeedRSS %>" class="jive-feed-icon"><img src="images/feed-icon-16x16.gif" alt="" style="border:0;" /></a>
            <h4><fmt:message key="index.cs_blog" /></h4>
            <% long nowTime = System.currentTimeMillis();
374
                if (lastBlogFeed == null || lastReleaseFeed == null || nowTime - lastRSSFetch > 21600000) {
Gaston Dombiak's avatar
Gaston Dombiak committed
375 376 377 378 379 380 381 382

                    FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
                    FeedFetcher feedFetcher = new HttpClientWithTimeoutFeedFetcher(feedInfoCache);

                    try {
                        lastBlogFeed = feedFetcher.retrieveFeed(new URL(blogFeedRSS));
                        lastReleaseFeed = feedFetcher.retrieveFeed(new URL(releaseFeedRSS));

383
                        lastRSSFetch = nowTime;
Gaston Dombiak's avatar
Gaston Dombiak committed
384
                    }
385 386
                    catch (Throwable throwable) {
                    	LoggerFactory.getLogger("index.jsp").warn("Failed to fetch RSS feed:", throwable);
Gaston Dombiak's avatar
Gaston Dombiak committed
387 388 389
                    }
                }

390
                %><div class="jive-bottom-line"></div><%
Gaston Dombiak's avatar
Gaston Dombiak committed
391 392 393 394 395
                if (lastBlogFeed != null && !lastBlogFeed.getEntries().isEmpty()) {

                    List entries = lastBlogFeed.getEntries();
                    for (int i = 0; i < entries.size() && i < 3; i++) {
                        SyndEntry entry = (SyndEntry) entries.get(i); %>
Gaston Dombiak's avatar
Gaston Dombiak committed
396
                        <h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>,
397
                        <span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5>
Gaston Dombiak's avatar
Gaston Dombiak committed
398 399 400
                    <% }

                } else { %>
401
                    <fmt:message key="index.cs_blog.unavailable" />
Gaston Dombiak's avatar
Gaston Dombiak committed
402 403
                 <% }

404
                 %><div class="jive-bottom-line"></div><%
Gaston Dombiak's avatar
Gaston Dombiak committed
405 406 407 408 409
                if (lastReleaseFeed != null && !lastReleaseFeed.getEntries().isEmpty()) {

                    List entries = lastReleaseFeed.getEntries();
                    for (int i = 0; i < entries.size() && i < 3; i++) {
                        SyndEntry entry = (SyndEntry) entries.get(i); %>
Gaston Dombiak's avatar
Gaston Dombiak committed
410
                        <h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>,
411
                        <span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5>
Gaston Dombiak's avatar
Gaston Dombiak committed
412 413 414
                    <% }

                } else { %>
415
                    <fmt:message key="index.cs_blog.unavailable" />
Gaston Dombiak's avatar
Gaston Dombiak committed
416 417 418 419 420
                 <% }
            %>

        </div>
    </td>
421
    <% } %>
Bill Lynch's avatar
Bill Lynch committed
422
</table>
423 424 425 426 427 428 429 430

<br>

<div id="jive-title"><fmt:message key="index.server_port" /></div>
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
    <tr>
431
        <th width="100"><fmt:message key="ports.interface" /></th>
432 433 434 435 436 437 438
        <th width="1"><fmt:message key="ports.port" /></th>
        <th width="1">&nbsp;</th>
        <th width="130"><fmt:message key="ports.type" /></th>
        <th><fmt:message key="ports.description" /></th>
    </tr>
</thead>
<tbody>
439

440 441 442 443 444 445 446 447
<%
    for ( ConnectionListener connectionListener : connectionManager.getListeners() )
    {
        if ( !connectionListener.isEnabled() )
        {
            continue;
        }

448 449
        pageContext.setAttribute( "connectionListener", connectionListener );

450 451 452 453 454 455 456 457
        final String interfaceName;
        if (connectionListener.getBindAddress() == null || connectionListener.getBindAddress().isAnyLocalAddress() ) {
            interfaceName = LocaleUtils.getLocalizedString("ports.all_ports");
        } else {
            interfaceName = connectionListener.getBindAddress().getHostName();
        }
%>

458
    <tr>
459 460 461 462 463 464 465 466
        <td><%= interfaceName %></td>
        <td><%= connectionListener.getPort() %></td>
        <td>
            <% if ( connectionListener.getTLSPolicy().equals( Connection.TLSPolicy.disabled ) ) { %>
            <img src="images/blank.gif" width="1" height="1" alt=""/>
            <% } else { %>
            <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" />"/>
            <% } %>
467 468
        </td>
        <td>
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
            <%
                final String typeName;
                switch ( connectionListener.getType() ) {
                    case SOCKET_C2S:
                        typeName = LocaleUtils.getLocalizedString("ports.client_to_server");
                        break;
                    case SOCKET_S2S:
                        typeName = LocaleUtils.getLocalizedString("ports.server_to_server");
                        break;
                    case COMPONENT:
                        typeName = LocaleUtils.getLocalizedString("ports.external_components");
                        break;
                    case CONNECTION_MANAGER:
                        typeName = LocaleUtils.getLocalizedString("ports.connection_manager");
                        break;
484 485 486
                    case WEBADMIN:
                        typeName = LocaleUtils.getLocalizedString("ports.admin_console");
                        break;
Guus der Kinderen's avatar
Guus der Kinderen committed
487 488 489
                    case BOSH_C2S:
                        typeName = LocaleUtils.getLocalizedString("ports.http_bind");
                        break;
490 491 492 493 494 495
                    default:
                        typeName = "(unspecified)";
                        break;
                }
            %>
            <%=typeName%>
496
        </td>
497
        <td>
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
            <c:choose>
                <c:when test="${connectionListener.type eq 'SOCKET_C2S' and connectionListener.TLSPolicy ne 'legacyMode'}">
                    <fmt:message key="ports.client_to_server.desc"/>
                    <fmt:message key="ports.plaintext.desc">
                        <fmt:param><a href='connection-settings-socket-c2s.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'SOCKET_C2S' and connectionListener.TLSPolicy eq 'legacyMode'}">
                    <fmt:message key="ports.client_to_server.desc_old_ssl"/>
                    <fmt:message key="ports.legacymode.desc">
                        <fmt:param><a href='connection-settings-socket-c2s.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'SOCKET_S2S'}">
                    <fmt:message key="ports.server_to_server.desc"/>
                    <fmt:message key="ports.legacymode.desc">
                        <fmt:param><a href='connection-settings-socket-s2s.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'COMPONENT' and connectionListener.TLSPolicy ne 'legacyMode'}">
                    <fmt:message key="ports.external_components.desc"/>
                    <fmt:message key="ports.plaintext.desc">
                        <fmt:param><a href='external-components-settings.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'COMPONENT' and connectionListener.TLSPolicy eq 'legacyMode'}">
                    <fmt:message key="ports.external_components.desc_old_ssl"/>
                    <fmt:message key="ports.legacymode.desc">
                        <fmt:param><a href='external-components-settings.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'CONNECTION_MANAGER' and connectionListener.TLSPolicy ne 'legacyMode'}">
                    <fmt:message key="ports.connection_manager.desc"/>
                    <fmt:message key="ports.plaintext.desc">
                        <fmt:param><a href='connection-managers-settings.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'CONNECTION_MANAGER' and connectionListener.TLSPolicy eq 'legacyMode'}">
                    <fmt:message key="ports.connection_manager.desc_old_ssl"/>
                    <fmt:message key="ports.legacymode.desc">
                        <fmt:param><a href='connection-managers-settings.jsp'></fmt:param>
                        <fmt:param></a></fmt:param>
                    </fmt:message>
                </c:when>
                <c:when test="${connectionListener.type eq 'WEBADMIN' and connectionListener.TLSPolicy ne 'legacyMode'}">
                    <fmt:message key="ports.admin_console.desc_unsecured"/>
                </c:when>
                <c:when test="${connectionListener.type eq 'WEBADMIN' and connectionListener.TLSPolicy eq 'legacyMode'}">
                    <fmt:message key="ports.admin_console.desc_secured"/>
                </c:when>
                <c:when test="${connectionListener.type eq 'BOSH_C2S' and connectionListener.TLSPolicy ne 'legacyMode'}">
                    <fmt:message key="ports.http_bind.desc_unsecured"/>
                </c:when>
                <c:when test="${connectionListener.type eq 'BOSH_C2S' and connectionListener.TLSPolicy eq 'legacyMode'}">
                    <fmt:message key="ports.http_bind.desc_secured"/>
                </c:when>
            </c:choose>
561 562
        </td>
    </tr>
563 564 565 566 567 568 569 570 571 572
<%
    }

    final String interfaceName;
    if (connectionManager.getListenAddress() == null || connectionManager.getListenAddress().isAnyLocalAddress() ) {
        interfaceName = LocaleUtils.getLocalizedString("ports.all_ports");
    } else {
        interfaceName = connectionManager.getListenAddress().getHostName();
    }
%>
573 574 575 576
    <%
        if (fileTransferProxy.isProxyEnabled()) {
    %>
    <tr>
577
        <td><%= interfaceName %></td>
578
        <td><%= fileTransferProxy.getProxyPort() %></td>
579
        <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
580 581 582 583 584 585 586 587
        <td><fmt:message key="ports.file_proxy" /></td>
        <td><fmt:message key="ports.file_proxy.desc" /></td>
    </tr>
    <% } %>
    <%
        if (mediaProxyService.isEnabled()) {
    %>
    <tr>
588
        <td><%= interfaceName %></td>
589
        <td><%= mediaProxyService.getMinPort() %> - <%= mediaProxyService.getMaxPort() %></td>
590
        <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
591 592 593 594
        <td><fmt:message key="ports.media_proxy" /></td>
        <td><fmt:message key="ports.media_proxy.desc" /></td>
    </tr>
    <% } %>
595
    <tr>
596
        <td><%= interfaceName %></td>
597
        <td><%= flashCrossDomainHandler.getPort() %></td>
598
        <td><img src="images/blank.gif" width="1" height="1" alt=""></td>
599 600 601
        <td><fmt:message key="ports.flash_cross_domain" /></td>
        <td><fmt:message key="ports.flash_cross_domain.desc" /></td>
    </tr>
602 603 604 605
    <%
        if (JMXManager.isEnabled()) {
    %>
    <tr>
606
        <td><%= interfaceName %></td>
607 608 609 610 611 612 613 614 615 616
        <td><%= JMXManager.getPort() %></td>
        <td><% if (JMXManager.isSecure()) {
            %><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" />"/><%
        } else {
            %><img src="images/blank.gif" width="1" height="1" alt=""><% }
        %></td>
        <td><fmt:message key="ports.jmx_console" /></td>
        <td><fmt:message key="ports.jmx_console.desc" /></td>
    </tr>
    <% } %>
617 618 619
</tbody>
</table>
</div>
620 621 622
<br>

<form action="server-props.jsp">
623
<input type="submit" value="<fmt:message key="global.edit_properties" />">
624
</form>
Bill Lynch's avatar
Bill Lynch committed
625

626
    </body>
627
</html>