| <!-- |
| |
| Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!-- grizzly/networkListenerEdit.jsf --> |
| |
| |
| <!initPage |
| setResourceBundle(key="i18n_web" bundle="org.glassfish.web.admingui.Strings"); |
| setResourceBundle(key="help_web" bundle="org.glassfish.web.admingui.Helplinks"); |
| /> |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18n_web.grizzly.networkListenerEditPageTitle}" > |
| <!define name="content"> |
| <event> |
| <!beforeCreate |
| setSessionAttribute(key="listenerTabs" value="generalTab"); |
| getRequestValue(key="configName" value=>$page{configName}); |
| urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); |
| getRequestValue(key="name" value="#{pageSession.Name}"); |
| urlencode(value="#{pageSession.Name}" encoding="UTF-8" result="#{pageSession.encodedName}"); |
| getRequestValue(key="cancelTo" value="#{pageSession.cancelTo}" default="web/grizzly/networkListeners.jsf"); |
| setPageSessionAttribute(key="listenerName" value="#{pageSession.Name}"); |
| urlencode(value="#{pageSession.listenerName}" encoding="UTF-8" result="#{pageSession.encodedListenerName}"); |
| setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/web/grizzly/networkListenerEdit.jsf?name=#{pageSession.encodedName}&cancelTo=#{pageSession.cancelTo}&configName=#{pageSession.configName}"); |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/#{pageSession.cancelTo}"); |
| setPageSessionAttribute(key="childType" value="network-listener"); |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners"); |
| setPageSessionAttribute(key="selfUrl", value="#{pageSession.parentUrl}/#{pageSession.childType}/#{pageSession.Name}"); |
| setPageSessionAttribute(key="rest-api" value="true"); |
| gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}"); |
| setPageSessionAttribute(key="protocolName" value="#{pageSession.valueMap['protocol']}"); |
| if ("#{pageSession.valueMap['protocol']}=$constant{com.sun.enterprise.config.serverbeans.ServerTags.PORT_UNIF_PROTOCOL_NAME}"){ |
| setPageSessionAttribute(key="protocolName" value="$constant{com.sun.enterprise.config.serverbeans.ServerTags.SEC_ADMIN_LISTENER_PROTOCOL_NAME}"); |
| } |
| setPageSessionAttribute(key="convertToFalseList" value={"enabled", "jkEnabled"}); |
| urlencode(value="#{pageSession.protocolName}" encoding="UTF-8" result="#{pageSession.encodedProtocolName}"); |
| setPageSessionAttribute(key="parentUrl2", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/protocols"); |
| setPageSessionAttribute(key="childType2" value="protocol"); |
| setPageSessionAttribute(key="selfUrl2", value="#{pageSession.parentUrl2}/#{pageSession.childType2}/#{pageSession.encodedProtocolName}"); |
| gf.getEntityAttrs(endpoint="#{pageSession.selfUrl2}", valueMap="#{pageSession.valueMap2}"); |
| |
| setPageSessionAttribute(key="convertToFalseList2" value={"securityEnabled"}); |
| |
| //set the following for including buttons.inc |
| setPageSessionAttribute(key="has2Objects" value="#{true}" ); |
| setPageSessionAttribute(key="edit" value="#{true}" ); |
| setPageSessionAttribute(key="showDefaultButton" value="#{true}" ); |
| setPageSessionAttribute(key="showCancelButton" value="#{true}" ); |
| setPageSessionAttribute(key="hasPropertySheet" value="#{true}" ); |
| setPageSessionAttribute(key="hasPropertyTable" value="#{false}" ); |
| |
| setSessionAttribute(key="secureCancelUrl" value="#{pageSession.selfPage}") |
| setPageSessionAttribute(key="readOnly" value="#{false}" ); |
| if ("(#{pageSession.Name}=admin-listener)") { |
| if ("(#{pageSession.configName}=server-config)") { |
| setPageSessionAttribute(key="readOnly" value="#{true}" ); |
| } |
| } |
| |
| //If secure admin is enabled, we will not show the other tabs since GUI doesn't have support for handling low level grizzly config yet. |
| setPageSessionAttribute(key="showSSLTab" value="#{true}"); |
| setPageSessionAttribute(key="showHttpTab" value="#{true}"); |
| setPageSessionAttribute(key="showFileCacheTab" value="#{true}"); |
| if (#{sessionScope.secureAdminEnabled}){ |
| gf.getEntityAttrs(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/http-service/virtual-server/__asadmin" valueMap="#{requestScope.tvp}"); |
| //TODO: do we need to handle the case where more than 1 listener is setup for __asadmin ?? |
| if ("#{requestScope.tvp['networkListeners']}=#{pageSession.listenerName}") { |
| setPageSessionAttribute(key="showSSLTab" value="#{false}"); |
| setPageSessionAttribute(key="showHttpTab" value="#{false}"); |
| setPageSessionAttribute(key="showFileCacheTab" value="#{false}"); |
| } |
| } |
| /> |
| </event> |
| " <script type="text/javascript">admingui.nav.selectTreeNodeById(admingui.nav.TREE_ID+":configurations:#{pageSession.encodedConfigName}:networkConfig:networkListeners:#{pageSession.encodedName}");</script> |
| |
| <sun:form id="propertyForm"> |
| #include "listenerTabs.inc" |
| #include "/common/shared/alertMsg.inc" |
| |
| <!-- Page Title --> |
| <sun:title id="propertyContentPage" title="$resource{i18n_web.grizzly.networkListenerEditPageTitle}" helpText="$resource{i18n_web.grizzly.networkListenerEditPageTitleHelp}"> |
| #include "/common/shared/editPageButtons.inc" |
| </sun:title> |
| <sun:propertySheet id="propertySheet"> |
| #include "/common/shared/configNameSection.inc" |
| <sun:propertySheetSection id="propertSectionTextField"> |
| |
| <sun:property id="name" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.common.name}"> |
| <sun:staticText id="name" text="#{pageSession.Name}" rendered="#{Edit}" /> |
| </sun:property> |
| |
| |
| <sun:property id="protocol" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.protocol}" > |
| //<sun:staticText id="protocol" text="#{pageSession.valueMap['protocol']}" /> |
| <sun:hyperlink id="protocol" text="#{pageSession.protocolName}" url="#{request.contextPath}/web/grizzly/protocolEdit.jsf?name=#{pageSession.protocolName}&configName=#{configName}" /> |
| </sun:property> |
| |
| <sun:property id="http-protocol" rendered="#{pageSession.showHttp}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="HTTP Protocol: " > |
| <sun:staticText id="http-protocol" text="#{pageSession.httpProtocolName}" /> |
| <!beforeCreate |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/network-config/network-listeners/network-listener/#{pageSession.Name}/find-http-protocol.json" method="get" result="#{pageSession.httpProtocol}"); |
| setPageSessionAttribute(key="httpProtocolName" value="#{pageSession.httpProtocol.data.properties.protocol}"); |
| setPageSessionAttribute(key="sameAsProtocol" value="#{false}"); |
| if ("#{pageSession.httpProtocolName}=#{pageSession.protocolName}") |
| setPageSessionAttribute(key="sameAsProtocol" value="#{true}"); |
| if(! #{pageSession.sameAsProtocol}){ |
| setPageSessionAttribute(key="showHttp" value="#{true}") |
| setPageSessionAttribute(key="protocolName" value="#{pageSession.httpProtocolName}") |
| } |
| if(#{pageSession.sameAsProtocol}){ |
| setPageSessionAttribute(key="showHttp" value="#{false}") |
| } |
| /> |
| </sun:property> |
| |
| <sun:property id="status" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.common.status}" > |
| <sun:checkbox selected="#{pageSession.valueMap['enabled']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="securityWithHelp" rendered="#{readOnly}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.security}" helpText="$resource{i18n_web.common.secureAdminHelp}" > |
| <sun:checkbox disabled="#{readOnly}" selected="#{pageSession.valueMap2['securityEnabled']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="security" rendered="#{!readOnly}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.security}" > |
| <sun:checkbox selected="#{pageSession.valueMap2['securityEnabled']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="JkEnabled" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.JkEnabled}" helpText="$resource{i18n_web.grizzly.networkListener.JkEnabledHelp}"> |
| <sun:checkbox selected="#{pageSession.valueMap['jkEnabled']}" selectedValue="true" /> |
| </sun:property> |
| |
| |
| <sun:property id="port" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.port}" helpText="$resource{i18n_web.grizzly.networkListener.portHelp}"> |
| <sun:textField id="port" columns="$int{40}" maxLength="#{sessionScope.fieldLengths['maxLength.grizzly.networkListener.port']}" required="#{true}" styleClass="required port" text="#{pageSession.valueMap['port']}" /> |
| </sun:property> |
| |
| <sun:property id="addr" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.address}" helpText="$resource{i18n_web.grizzly.networkListener.addressHelp}"> |
| <sun:textField id="addr" columns="$int{40}" maxLength="#{sessionScope.fieldLengths['maxLength.grizzly.networkListener.address']}" text="#{pageSession.valueMap['address']}" /> |
| </sun:property> |
| |
| <sun:property id="transport" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.transport}" > |
| <sun:hyperlink id="transport" text="#{pageSession.valueMap['transport']}" url="#{request.contextPath}/web/grizzly/transportEdit.jsf?name=#{pageSession.valueMap['transport']}&configName=#{configName}" /> |
| </sun:property> |
| |
| <sun:property id="threadpool" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.grizzly.networkListener.threadPool}" helpText="$resource{i18n_web.grizzly.networkListener.threadPoolHelp}"> |
| <sun:dropDown id="threadpool" selected="#{pageSession.valueMap['threadPool']}" labels="$pageSession{threadPoolList}" values="$pageSession{threadPoolList}" > |
| <!beforeCreate |
| gf.getChildrenNamesList(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.encodedConfigName}/thread-pools/thread-pool" result="#{pageSession.threadPoolList}"); |
| /> |
| </sun:dropDown> |
| </sun:property> |
| |
| </sun:propertySheetSection> |
| </sun:propertySheet> |
| |
| <sun:hidden id="helpKey" value="$resource{help_web.networkListenerEdit}" /> |
| </sun:form> |
| </define> |
| </composition> |