ServerEditUMA.jsp revision c289b3af72dda73e53e6886c920c198b779ebf37
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ The contents of this file are subject to the terms of the Common Development and
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ Distribution License (the License). You may not use this file except in compliance with the
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ specific language governing permission and limitations under the License.
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ information: "Portions copyright [year] [name of copyright owner]".
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts ~ Copyright 2015 ForgeRock AS.
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts<%@ page info="ServerEditUMA" language="java" %>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts<%@taglib uri="/WEB-INF/jato.tld" prefix="jato" %>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts<%@taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts<jato:useViewBean className="com.sun.identity.console.service.ServerEditUMAViewBean" fireChildDisplayEvents="true" >
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:i18nbundle baseName="amConsole" id="amConsole" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:header name="hdrCommon" pageTitle="webconsole.title" bundleID="amConsole" copyrightYear="2007" fireDisplayEvents="true">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <script language="javascript">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Field names.
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts var fields = {
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts resourcesets: {
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts storeLocationRadioButtonName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-location',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts sslEnableCheckBoxName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-ssl-enabled',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts directoryNameFieldName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-directory-name',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts portFieldName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-port',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts loginIdFieldName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-loginid',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts passwordFieldName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-password',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts maxConnectionsFieldName: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-max-connections',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts heartbeat: 'ServerEditUMA.cscorg-forgerock-services-resourcesets-store-heartbeat'
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts storeLocationRadioButtonName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-location',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts sslEnableCheckBoxName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-ssl-enabled',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts directoryNameFieldName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-directory-name',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts portFieldName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-port',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts loginIdFieldName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-loginid',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts passwordFieldName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-password',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts maxConnectionsFieldName: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-max-connections',
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts heartbeat: 'ServerEditUMA.cscorg-forgerock-services-umaaudit-store-heartbeat'
a6bf4d9e39eae70c6b74d0d91d35704662c84ff7Phill Cunnington pendingrequests: {
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley storeLocationRadioButtonName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-location',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley sslEnableCheckBoxName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-ssl-enabled',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley directoryNameFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-directory-name',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley portFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-port',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley loginIdFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-loginid',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley passwordFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-password',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley maxConnectionsFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-max-connections',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley heartbeat: 'ServerEditUMA.cscorg-forgerock-services-uma-pendingrequests-store-heartbeat'
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley storeLocationRadioButtonName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-location',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley sslEnableCheckBoxName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-ssl-enabled',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley directoryNameFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-directory-name',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley portFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-port',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley loginIdFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-loginid',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley passwordFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-password',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley maxConnectionsFieldName: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-max-connections',
c289b3af72dda73e53e6886c920c198b779ebf37Rich Riley heartbeat: 'ServerEditUMA.cscorg-forgerock-services-uma-labels-store-heartbeat'
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts function setState(fieldset) {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Set the initial state of the fields.
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts var radioBtns = document.getElementsByName(fieldset.storeLocationRadioButtonName);
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Do nothing, there must be two radio buttons.
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleExternalConfig(fieldset, (radioBtns[0].checked) ? radioBtns[0] : radioBtns[1]);
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Retrieves the first element of the given name.
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts function getFirstElementByName(name) {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts var elements = document.getElementsByName(name);
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts return (elements.length > 0) ? elements[0] : null;
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Toggles the status of the external configuration fields.
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts function toggleExternalConfig(fieldset, storeLocationRadioButton) {
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts var readonly = storeLocationRadioButton.value === 'default';
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.sslEnableCheckBoxName, readonly);
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.directoryNameFieldName, readonly);
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.portFieldName, readonly);
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.loginIdFieldName, readonly);
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.passwordFieldName, readonly);
7d395d5d4197d1648464cb3606f69c23f08ffbd6James Phillpotts toggleField(fieldset.heartbeat, readonly);
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts // Toggles the status of a given field.
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts function toggleField(fieldName, readonly) {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts var field = getFirstElementByName(fieldName);
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts if (field != null) {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts if (readonly) {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts field.setAttribute('readonly', 'readonly');
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:form name="ServerEditUMA" method="post" defaultCommandChild="/button1">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <script language="javascript">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts function confirmLogout() {
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts return confirm("<cc:text name="txtLogout" defaultValue="masthead.logoutMessage" bundleID="amConsole"/>");
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:primarymasthead name="mhCommon" bundleID="amConsole" logoutOnClick="return confirmLogout();" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:breadcrumbs name="breadCrumb" bundleID="amConsole" />
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:tabs name="tabCommon" bundleID="amConsole" />
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <table border="0" cellpadding="10" cellspacing="0" width="100%">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:alertinline name="ialertCommon" bundleID="amConsole" />
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <%-- PAGE CONTENT --------------------------------------------------------- --%>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:pagetitle name="pgtitleThreeBtns" bundleID="amConsole" pageTitleText="page.title.server.edit" showPageTitleSeparator="true" viewMenuLabel="" pageTitleHelpMessage="" showPageButtonsTop="true" showPageButtonsBottom="false" />
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <table border="0" cellpadding="10" cellspacing="0" width="100%">
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:button name="btnInherit" bundleID="amConsole" defaultValue="serverconfig.button.inherit" type="primary" />
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts <cc:propertysheet name="propertyAttributes" bundleID="amConsole" showJumpLinks="true"/>
8df974db6a280f05491e26c4f0f59e7568fe5b02James Phillpotts</jato:useViewBean>