| <!-- | |
| Copyright (c) 1997, 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 | |
| --> | |
| <!composition template="/templates/iframe.layout" guiTitle="$resource{i18n.redeploy.pageTitle}" | |
| guiTemplateOnLoad="admingui.deploy.uploadInit('#{dirPathId}','#{dirPathId}','#{dirSelectBtnId}','#{filSelectBtnId}','#{fileuploadId}');" > | |
| <!define name="content"> | |
| <event> | |
| <!beforeCreate | |
| getRequestValue(key="appName" value=>$page{appName}); | |
| urlencode(value="#{pageSession.appName}" encoding="UTF-8" result="#{pageSession.encodedAppName}"); | |
| setPageSessionAttribute(key="selfUrl" value="#{sessionScope.REST_URL}/applications/application/#{pageSession.encodedAppName}"); | |
| //test the app still exists. | |
| gf.checkIfEndPointExist(endpoint="#{pageSession.selfUrl}" exists="#{requestScope.exist}"); | |
| if (! #{requestScope.exist}){ | |
| gf.redirect(page="#{request.contextPath}/common/applications/applications.jsf"); | |
| } | |
| createMap(result="#{pageSession.deployMap}") | |
| mapPut(map="#{pageSession.deployMap}", key="appName", value="#{pageSession.appName}"); | |
| setPageSessionAttribute(key="convertToFalse" value={"precompilejsp", "verify" ,"availabilityEnabled"}) | |
| //we want to show/preserver java-web-start-enabled, and preserveAppsScopedResourcs | |
| //if the jws prop does not exist,it is true by default. GLASSFISH-19109 | |
| mapPut(map="#{pageSession.deployMap}" key="$constant{org.glassfish.admingui.common.deployment.DFDeploymentProperties.DEPLOY_OPTION_JAVA_WEB_START_ENABLED}" value="true") | |
| mapPut(map="#{pageSession.deployMap}" key="implicitCdiEnabled" value="true") | |
| gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json" method="GET" result="#{requestScope.propTable}"); | |
| setPageSessionAttribute(key="listOfProps" value="#{requestScope.propTable.data.extraProperties.properties}"); | |
| foreach(var="oneProp" list="#{pageSession.listOfProps}"){ | |
| if ("#{requestScope.oneProp.name}=preserveAppScopedResources"){ | |
| mapPut(map="#{pageSession.deployMap}" key="preserveAppScopedResources" value="#{requestScope.oneProp.value}") | |
| } | |
| if ("#{requestScope.oneProp.name}=$constant{org.glassfish.admingui.common.deployment.DFDeploymentProperties.DEPLOY_OPTION_JAVA_WEB_START_ENABLED}"){ | |
| mapPut(map="#{pageSession.deployMap}" key="$constant{org.glassfish.admingui.common.deployment.DFDeploymentProperties.DEPLOY_OPTION_JAVA_WEB_START_ENABLED}" value="#{requestScope.oneProp.value}") | |
| } | |
| if ("#{requestScope.oneProp.name}=implicitCdiEnabled"){ | |
| mapPut(map="#{pageSession.deployMap}" key="implicitCdiEnabled" value="#{requestScope.oneProp.value}") | |
| } | |
| } | |
| gf.checkIfEndPointExist(endpoint="#{pageSession.selfUrl}/module/#{pageSession.encodedAppName}/engine/osgi" exists="#{requestScope.osgiExist}"); | |
| if(#{requestScope.osgiExist}){ | |
| mapPut(map="#{pageSession.deployMap}", key="type", value="osgi"); | |
| } | |
| gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}" valueMap="#{pageSession.valueMap}"); | |
| setPageSessionAttribute(key="listPageLink" value="#{gf_application_list_page}"); | |
| setPageSessionAttribute(key="extraArgs" value="#{gf_application_extra_args}"); | |
| setPageSessionAttribute(key="cancelPage" value="#{gf_application_cancel_page}"); | |
| gf.onlyDASExist(onlyDAS="#{pageSession.onlyDASExist}"); | |
| if ("!(#{pageSession.onlyDASExist})"){ | |
| mapPut(map="#{pageSession.deployMap}", key="availabilityEnabled", value="#{pageSession.valueMap['availabilityEnabled']}"); | |
| } | |
| /> | |
| </event> | |
| <sun:form id="form" method="POST" enctype="multipart/form-data"> | |
| #include "/common/shared/alertMsg_1.inc" | |
| <sun:title id="title" title="$resource{i18n.redeploy.pageTitle}" helpText="$resource{i18n.redeploy.pageTitleHelp}"> | |
| <!facet pageButtonsTop> | |
| <sun:panelGroup id="topButtons"> | |
| <sun:button id="uploadButton" text="$resource{i18n.button.OK}" | |
| onClick="javascript: | |
| if(getTextElement('#{pageSession.radioChoosenId}').value=='client') { | |
| result = (admingui.deploy.checkFileInputRequired('#{fileuploadId}', '#{reqMsg}')); | |
| } else { | |
| result = (checkRequired('#{dirPathId}', '#{reqMsg}')); | |
| } | |
| if(result == true) { | |
| if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) | |
| return submitAndDisable(this, '$resource{i18n.button.Processing}', '_self'); | |
| } | |
| return false;" | |
| > | |
| <!command | |
| compare(obj1="#{uploadRdBtn}" obj2="client" objEqual=>$attribute{needUpload}); | |
| if (${needUpload}){ | |
| uploadFileToTempDir(file="#{uploadedFile}" uploadedTempFile=>$attribute{filePath}, origPath=>$attribute{origPath}); | |
| } | |
| if (! ${needUpload}){ | |
| setAttribute(key="origPath", value="#{dirPath}"); | |
| setAttribute(key="filePath", value="#{dirPath}"); | |
| } | |
| gf.redeploy(filePath="$attribute{filePath}", deployMap="#{pageSession.deployMap}" convertToFalse="#{pageSession.convertToFalse}" | |
| valueMap="#{pageSession.valueMap}" ); | |
| if(${needUpload}) { | |
| gf.logger(logString="Deleting the file uploaded to Temp Directory", level="INFO"); | |
| deleteFileFromTempDir(deleteTempFile="$attribute{filePath}"); | |
| } | |
| gf.redirect(page="#{request.contextPath}/common/removeFrame.jsf?#{request.contextPath}/common/applications/applications.jsf&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}&bare=true"); | |
| /> | |
| </sun:button> | |
| <sun:button id="cancelButton" text="$resource{i18n.button.Cancel}" primary="#{false}" immediate="true" | |
| onClick="top.admingui.ajax.loadPage({url:'#{request.contextPath}/#{pageSession.cancelPage}?#{pageSession.extraArgs}'}); return false;"> | |
| // <!command | |
| // println("cancel"); | |
| // gf.navigate(page="{request.contextPath}/common/applications/applications.jsf"); | |
| // /> | |
| </sun:button> | |
| </sun:panelGroup> | |
| </facet> | |
| </sun:title> | |
| <sun:propertySheet id="redeploy" > | |
| #include "/common/applications/fileComponent.jsf" | |
| "<br/><br/> | |
| <sun:propertySheetSection > | |
| <sun:property id="nameProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.application.appName}"> | |
| <sun:staticText id="name" text="#{appName}"/> | |
| </sun:property> | |
| <sun:property> | |
| <sun:staticText text="" /> | |
| </sun:property> | |
| <sun:property id="precmplProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.deploy.precompile}" helpText="$resource{i18n.deploy.PrecompileHelp}"> | |
| <sun:checkbox id="precompileJSP" selected="#{pageSession.deployMap['precompilejsp']}" selectedValue="true" /> | |
| </sun:property> | |
| <sun:property id="v2" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.deploy.run}" helpText="$resource{i18n.deploy.runHelp}"> | |
| <sun:checkbox id="ver2" selected="#{pageSession.deployMap['verify']}" selectedValue="true" /> | |
| </sun:property> | |
| <sun:property id="implicitCdi" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.deploy.implicitCdi}" helpText="$resource{i18n.deploy.implicitCdiHelp}"> | |
| <sun:checkbox id="implicitCdi" selected="#{pageSession.deployMap['implicitCdiEnabled']}" selectedValue="true" /> | |
| </sun:property> | |
| <sun:property id="jws" labelAlign="left" noWrap="#{false}" overlapLabel="#{false}" label="$resource{i18n.deploy.JavaWebStart}" helpText="$resource{i18n.deploy.JavaWebStartHelp}" > | |
| <sun:checkbox selected="#{pageSession.deployMap['$constant{org.glassfish.admingui.common.deployment.DFDeploymentProperties.DEPLOY_OPTION_JAVA_WEB_START_ENABLED}']}" selectedValue="true" label=" " /> | |
| </sun:property> | |
| <sun:property id="availability" rendered="#{!pageSession.onlyDASExist}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.deploy.availability}" helpText="$resource{i18n.deploy.availabilityHelp}"> | |
| <sun:checkbox id="availability" selected="#{pageSession.deployMap['availabilityEnabled']}" selectedValue="true" /> | |
| </sun:property> | |
| <sun:property id="keepStateProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.redeploy.keepState}" helpText="$resource{i18n.redeploy.keepStateHelp}" > | |
| <sun:checkbox selected="#{pageSession.deployMap['keepState']}" selectedValue="true" label=" " /> | |
| </sun:property> | |
| <sun:property id="preserveAppScopedResourcesProp" labelAlign="left" noWrap="#{false}" overlapLabel="#{false}" label="$resource{i18n.redeploy.preserveAppScopedResources}" helpText="$resource{i18n.redeploy.preserveAppScopedResourcesHelp}" > | |
| <sun:checkbox selected="#{pageSession.deployMap['preserveAppScopedResources']}" selectedValue="true" label=" " /> | |
| </sun:property> | |
| </sun:propertySheetSection> | |
| </sun:propertySheet> | |
| "<br /><br /> | |
| </sun:form> | |
| </define> | |
| </composition> |