| <!-- |
| |
| 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 |
| |
| --> |
| |
| <!-- common/configuration/loggerGeneral.jsf --> |
| |
| <!initPage |
| setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings") |
| setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks"); |
| /> |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18nc.log.LoggingSettings}" > |
| <!define name="content"> |
| |
| <event> |
| <!beforeCreate |
| setSessionAttribute(key="loggingTabs" value="loggerGeneral"); |
| getRequestValue(key="configName" value="#{pageSession.configName}" ); |
| gf.isConfigName(configName="#{pageSession.configName}" exists="#{requestScope.exists}" ); |
| if (! #{requestScope.exists}){ |
| gf.redirect("#{request.contextPath}/common/configuration/configurations.jsf"); |
| } |
| createMap(result="#{requestScope.attrsMap}"); |
| mapPut(map="#{requestScope.attrsMap}" key="target" value="#{pageSession.configName}"); |
| gf.restRequest( |
| endpoint="#{sessionScope.REST_URL}/list-log-attributes" |
| attrs="#{requestScope.attrsMap}" |
| method="GET" |
| result="#{pageSession.valueMap}"); |
| setPageSessionAttribute(key="logAttributes", value="#{pageSession.valueMap.data.extraProperties.logAttributes}"); |
| setPageSessionAttribute(key="defaultLoggingProperties", value="#{pageSession.valueMap.data.extraProperties.defaultLoggingProperties}"); |
| |
| /> |
| </event> |
| |
| <sun:form id="form1"> |
| #include "/common/configuration/loggingTabs.inc" |
| #include "/common/shared/alertMsg.inc" |
| <sun:title id="propertyContentPage" title="$resource{i18nc.log.LoggingSettings}" helpText="$resource{i18nc.log.LoggingSettingsHelp}" > |
| <!facet pageButtonsTop> |
| <sun:panelGroup id="topButtons"> |
| <sun:button id="saveButton" text="$resource{i18n.button.Save}" |
| onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" > |
| <!command |
| gf.isConfigName(configName="#{pageSession.configName}" ); |
| convertArrayToCommaString(array="#{pageSession.excludeFields}" commaString="#{requestScope.tmp}"); |
| mapPut(map="#{pageSession.logAttributes}" key="com.sun.enterprise.server.logging.GFFileHandler.excludeFields" value="#{requestScope.tmp}"); |
| prepareSuccessfulMsg(); |
| saveLoggingAttributes(attrs="#{pageSession.logAttributes}" config="#{pageSession.configName}"); |
| gf.redirect(page="#{request.contextPath}/common/configuration/loggerGeneral.jsf?configName=#{pageSession.configName}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}"); |
| /> |
| </sun:button> |
| </sun:panelGroup> |
| </facet> |
| <sun:button id="loadDefaultsButton" style="margin-left: 8pt" primary="#{false}" text="$resource{i18n.button.LoadDefaults}" |
| onClick="submitAndDisable(this, '$resource{i18n.button.Processing}'); return false;" > |
| <!command |
| gf.isConfigName(configName="#{pageSession.configName}" ); |
| gf.getMapKeys(Map="#{pageSession.logAttributes}" Keys="#{requestScope.attrKeys}"); |
| foreach(var="attrName" list="#{requestScope.attrKeys}") { |
| mapGet(Map="#{pageSession.defaultLoggingProperties}" Key="#{attrName}" Value="#{requestScope.temp}"); |
| if("!(#{requestScope.temp}=#{null})"){ |
| mapPut(map="#{pageSession.logAttributes}", key="#{attrName}", value="#{requestScope.temp}"); |
| } |
| } |
| /> |
| </sun:button> |
| |
| </sun:title> |
| |
| <sun:propertySheet id="general"> |
| #include "/common/shared/configNameSection.inc" |
| <sun:propertySheetSection id="sheetSection"> |
| <sun:property id="writeSystemLogEnabledProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.WriteSystemLog}" helpText="$resource{i18nc.log.WriteSystemlogHelp}"> |
| <sun:checkbox id="writeSystemLogEnabled" selected="#{pageSession.logAttributes['com.sun.enterprise.server.logging.SyslogHandler.useSystemLogging']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="logtoConsole" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.LogtoConsole}" helpText="$resource{i18nc.log.LogtoConsoleHelp}"> |
| <sun:checkbox selected="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.logtoConsole']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="rotationOnDateChange" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.rotationOnDateChange}" helpText="$resource{i18nc.log.rotationOnDateChangeHelp}"> |
| <sun:checkbox selected="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.rotationOnDateChange']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="multiline" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.multiLineMode}" helpText="$resource{i18nc.log.multiLineModeHelp}"> |
| <sun:checkbox selected="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.multiLineMode']}" selectedValue="true" /> |
| </sun:property> |
| |
| <sun:property id="consoleFormat" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.ConsoleLogFormat}" helpText="$resource{i18nc.log.ConsoleLogFormatHelp}"> |
| <sun:dropDown id="consoleFormat" selected="#{pageSession.logAttributes['java.util.logging.ConsoleHandler.formatter']}" |
| labels={ "ULF","ODL"} |
| values={"com.sun.enterprise.server.logging.UniformLogFormatter", "com.sun.enterprise.server.logging.ODLLogFormatter"} /> |
| </sun:property> |
| |
| <sun:property id="logfileFormat" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.FileLogFormat}" helpText="$resource{i18nc.log.FileLogFormatHelp}"> |
| <sun:dropDown id="logfileFormat" selected="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.formatter']}" |
| labels={ "ULF","ODL"} |
| values={"com.sun.enterprise.server.logging.UniformLogFormatter", "com.sun.enterprise.server.logging.ODLLogFormatter"} /> |
| </sun:property> |
| |
| <sun:property id="excludeFields" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.excludeFields}" helpText="$resource{i18nc.log.excludeFieldsHelp}"> |
| <sun:listbox id="excludeFields" immediate="#{true}" rows="$int{6}" multiple="#{true}" |
| labels="#{pageSession.excludeFieldsOptions}" selected="#{pageSession.excludeFields}" > |
| <!beforeCreate |
| getListBoxOptions( |
| availableList={ "tid", "userId", "ecid", "timeMillis", "levelValue" }, |
| selectedCommaString="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.excludeFields']}", |
| availableListResult="#{pageSession.excludeFieldsOptions}", |
| selectedOptions="#{pageSession.excludeFields}" |
| addEmptyFirstChoice="true"); |
| /> |
| </sun:listbox> |
| </sun:property> |
| |
| |
| <sun:property id="FileRotationLimitProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.FileRotationLimit}" helpText="$resource{i18nc.log.FileRotationLimitHelp}"> |
| <sun:textField id="FileRotationLimit" styleClass="integer" columns="$int{30}" maxLength="#{sessionScope.fieldLengths['maxLength.log.FileRotationLimit']}" text="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes']}" /> |
| <sun:staticText id="byte" style="padding: 8pt" text="$resource{i18n.common.Bytes}"/> |
| </sun:property> |
| |
| <sun:property id="FileRotationTimeLimitProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.FileRotationTimeLimit}" helpText="$resource{i18nc.log.FileRotationTimeLimitHelp}"> |
| <sun:textField id="FileRotationTimeLimit" styleClass="integer" columns="$int{30}" maxLength="#{sessionScope.fieldLengths['maxLength.log.FileRotationTimeLimit']}" text="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes']}"/> |
| <sun:staticText id="min" style="padding: 8pt" text="$resource{i18n.common.Minutes}"/> |
| </sun:property> |
| |
| <sun:property id="FlushFrequencyProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.FlushFrequency}" helpText="$resource{i18nc.log.FlushFrequencyHelp}"> |
| <sun:textField id="FlushFrequency" styleClass="integer" columns="$int{30}" maxLength="#{sessionScope.fieldLengths['maxLength.log.FlushFrequency']}" text="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.flushFrequency']}"/> |
| </sun:property> |
| |
| <sun:property id="MaxHistoryFiles" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.MaxHistoryFiles}" helpText="$resource{i18nc.log.MaxHistoryFilesHelp}"> |
| <sun:textField id="MaxHistoryFiles" styleClass="integer" columns="$int{30}" maxLength="#{sessionScope.fieldLengths['maxLength.log.MaxHistoryFiles']}" text="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles']}"/> |
| </sun:property> |
| |
| <sun:property id="logFileProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.LogFile}" helpText="$resource{i18nc.log.LogFileHelp}"> |
| <sun:textField id="LogFile" columns="$int{70}" maxLength="#{sessionScope.fieldLengths['maxLength.log.LogFile']}" text="#{pageSession.logAttributes['com.sun.enterprise.server.logging.GFFileHandler.file']}"/> |
| </sun:property> |
| |
| <sun:property id="logHandlerProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.log.Handler}" helpText="$resource{i18nc.log.HandlerHelp}"> |
| <sun:textField id="LogHandler" columns="$int{70}" maxLength="#{sessionScope.fieldLengths['maxLength.log.Handler']}" text="#{pageSession.logAttributes['handlers']}" /> |
| </sun:property> |
| |
| </sun:propertySheetSection> |
| </sun:propertySheet> |
| |
| <sun:hidden id="helpKey" value="$resource{help_common.serverInstLogging}" /> |
| |
| </sun:form> |
| "<br/> |
| </define> |
| </composition> |