| <!-- |
| |
| Copyright (c) 2010, 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 |
| |
| --> |
| |
| <!initPage |
| setResourceBundle(key="i18n" bundle="org.glassfish.admingui.core.Strings") |
| setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks") |
| /> |
| <!composition template="/templates/default.layout" |
| guiTitle="$resource{i18n.lifecycleTargetListing.PageTitle}" |
| guiOnLoad="admingui.nav.selectTreeNodeWithURL('#{request.contextPath}/common/applications/lifecycleEdit.jsf?appName=#{pageSession.encodedName}');" |
| |
| > |
| <!define name="content"> |
| <event> |
| <!beforeCreate |
| setSessionAttribute(key="lcGeneralTabs" value="targetTab"); |
| getRequestValue(key="appName" value="#{pageSession.appName}"); |
| urlencode(value="#{pageSession.appName}" encoding="UTF-8" result="#{pageSession.encodedName}"); |
| setPageSessionAttribute(key="listPageLink" value="/common/applications/lifecycles.jsf"); |
| gf.getTargetListInfo(appName="#{pageSession.appName}" result=>$attribute{listOfRows} ); |
| setPageSessionAttribute(key="targetPageLink" value="#{request.contextPath}/common/applications/lifecycleTargetListing.jsf"); |
| /> |
| </event> |
| <sun:form id="propertyForm"> |
| |
| #include "/common/applications/lifecycleTabs.inc" |
| |
| #include "/common/shared/alertMsg_1.inc" |
| <sun:title id="propertyContentPage" title="$resource{i18n.lifecycleTargetListing.PageTitle}" helpText="$resource{i18n.lifecycleTargetListing.PageTitleHelp}"/> |
| "<br /> |
| |
| <sun:table id="targetTable" title="$resource{i18n.common.TargetTableTitle}" sortPanelToggleButton="#{false}" |
| deselectMultipleButton="$boolean{true}" |
| deselectMultipleButtonOnClick="setTimeout('admingui.table.changeButtonAndDropDown(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)" |
| selectMultipleButton="$boolean{true}" |
| selectMultipleButtonOnClick="setTimeout('admingui.table.changeButtonAndDropDown(\\\\\'#{pageSession.topActionGroup}\\\\\', \\\\\'#{pageSession.tableId}\\\\\');', 0)" > |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{tableId}); |
| /> |
| |
| <!facet actionsTop> |
| <sun:panelGroup id="topActionsGroup1"> |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{topActionGroup}); |
| /> |
| <sun:button id="manageTargetButton" text="$resource{i18n.button.ManageTarget}" > |
| <!command |
| setAttribute(key="name" value="#{name}"); |
| setAttribute(key="targetPage" value="#{targetPage}"); |
| setAttribute(key="targetPageHelp" value="#{targetPageHelp}"); |
| gf.redirect(page="#{request.contextPath}/common/applications/manageTargets.jsf?forApp=false&appName=#{pageSession.encodedName}&listPageLink=#{pageSession.listPageLink}&targetPageLink=#{pageSession.targetPageLink}&highLight=lifecycle"); |
| /> |
| </sun:button> |
| |
| <sun:dropDown id="dropdown1" submitForm="#{true}" disabled="#{false}" |
| labels={ "$resource{i18n.common.moreActionDropDown}" |
| "$resource{i18n.button.Enable}" "$resource{i18n.button.Disable}" |
| } |
| values={"" "enable" "disable" } > |
| |
| <!command |
| getUIComponent(clientId="#{targetTableRowGroupId}", component=>$attribute{tableRowGroup}); |
| getSelectedSingleMapRows(TableRowGroup="$attribute{tableRowGroup}" selectedRows=>$attribute{selectedRows}); |
| setAttribute(key="click" value="$this{component}"); |
| setAttribute(key="actionValue" value="#{click.selected}") |
| createMap(result="#{requestScope.attrsMap}"); |
| if( ${actionValue}=enable){ |
| mapPut(map="#{requestScope.attrsMap}" key="enabled" value="true"); |
| } |
| if( ${actionValue}=disable){ |
| mapPut(map="#{requestScope.attrsMap}" key="enabled" value="false"); |
| } |
| foreach (var="row" list="#{requestScope.selectedRows}") { |
| mapPut(map="#{requestScope.attrsMap}" key="ref" value="#{row['name']}"); |
| gf.restRequest( |
| endpoint="#{row['endpoint']}" |
| attrs="#{requestScope.attrsMap}" |
| method="POST" |
| result="#{requestScope.result}"); |
| } |
| gf.redirect(page="#{request.contextPath}/common/applications/lifecycleTargetListing.jsf?appName=#{pageSession.encodedName}&listPageLink=#{pageSession.listPageLink}"); |
| /> |
| </sun:dropDown> |
| </sun:panelGroup> |
| </facet> |
| |
| <sun:tableRowGroup id="rowGroup1" selected="#{td.value.selected}" data={"$attribute{listOfRows}"} sourceVar="td"> |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{targetTableRowGroupId}); |
| /> |
| |
| <sun:tableColumn headerText="$resource{i18n.common.SelectHeader}" selectId="select" rowHeader="$boolean{false}" id="col0"> |
| <sun:checkbox id="select" |
| selected="#{td.value.selected}" |
| selectedValue="$boolean{true}" |
| onClick="admingui.table.v('#{pageSession.topActionGroup}', '#{pageSession.tableId}'); admingui.table.initAllRows('#{pageSession.tableId}');" |
| /> |
| </sun:tableColumn> |
| |
| <sun:tableColumn headerText="$resource{i18n.targetTable.colTargetName}" sort="targetName" rowHeader="$boolean{true}" id="col1"> |
| <staticText id="nameCol" value="#{td.value.targetName}" /> |
| </sun:tableColumn> |
| |
| <sun:tableColumn headerText="$resource{i18n.deployTable.colEnabled}" sort="enabled" rowHeader="$boolean{true}" id="col2"> |
| <staticText id="typeCol" value="#{td.value.enabled}" /> |
| </sun:tableColumn> |
| |
| <!-- Virtual Server doesn't apply to lifecycle module. refer to issue# 13620 --> |
| |
| </sun:tableRowGroup> |
| </sun:table> |
| |
| <sun:hidden id="helpKey" value="$resource{help_common.lifecycleTargetListing}" /> |
| </sun:form> |
| |
| #include "/common/shared/changeButtonsJS.inc" |
| </define> |
| </composition> |