blob: 731df663a8e1ce45a8ca42a8a960b574f36b37c0 [file] [log] [blame]
<!--
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/loggerLevels.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.LogLevelsPageTitle}" >
<!define name="content">
<event>
<!beforeCreate
setSessionAttribute(key="loggingTabs" value="loggerLevels");
setSessionAttribute(key="loggingTabs" value="loggerLevels");
getRequestValue(key="configName" value=>$page{configName} default="server-config");
createMap(result="#{requestScope.attrsMap}");
mapPut(map="#{requestScope.attrsMap}" key="target" value="#{pageSession.configName}");
gf.restRequest(
endpoint="#{sessionScope.REST_URL}/list-log-levels.json"
attrs="#{requestScope.attrsMap}"
method="GET"
result="#{requestScope.loggerLevels}");
getLoggerLevels(
loggerLevels="#{requestScope.loggerLevels.data.extraProperties.logLevels}"
loggerList="#{requestScope.tableList}");
setPageSessionAttribute(key="levelList" value={"OFF" "FINEST" "FINER" "FINE" "CONFIG" "INFO" "WARNING" "SEVERE" "ALERT" "EMERGENCY"})
gf.isConfigName(configName="#{pageSession.configName}" );
/>
</event>
<sun:form id="form1">
#include "/common/configuration/loggingTabs.inc"
#include "/common/shared/alertMsg.inc"
<sun:title id="title" title="$resource{i18nc.log.LogLevelsPageTitle}" helpText="$resource{i18nc.log.LogLevelsPageTitleHelp}">
#include "/common/configuration/loggerLevelsButtons.jsf"
</sun:title>
#include "/common/shared/configNameSection.inc"
<!-- Table .... -->
<sun:table id="basicTable" style="padding: 10pt" title="$resource{i18nc.log.LoggerLevelTableTitle}"
deselectMultipleButton="$boolean{true}"
deselectMultipleButtonOnClick="setTimeout('changeTwoTableButtons()', 0)"
selectMultipleButton="$boolean{true}"
selectMultipleButtonOnClick="setTimeout('changeTwoTableButtons()', 0)" >
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{tableId});
/>
<!-- Actions (Top) -->
<!facet actionsTop>
<sun:panelGroup id="topActionsGroup1">
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{topActionGroup});
/>
<sun:button id="addSharedTableButton" disabled="#{false}" text="$resource{i18nc.log.addLogger}" >
<!command
getUIComponent(clientId="$pageSession{tableRowGroupId}", component=>$attribute{tableRowGroup});
addRowToTable(TableRowGroup="$attribute{tableRowGroup}", NameList={"loggerName", "level"});
/>
</sun:button>
<sun:button id="button1" text="$resource{i18nc.log.deleteLogger}" disabled="#{true}" primary="#{true}">
<!command
getUIComponent(clientId="$pageSession{tableRowGroupId}", component=>$attribute{trg});
getSelectedTableRowKeys(tableRowGroup="${trg}" rowKeys=>$attribute{rowKeys});
deleteTableRows(tableRowGroup="${trg}" rowKeys="${rowKeys}");
commitTableRowGroup(tableRowGroup="${trg}");
/>
</sun:button>
<sun:dropDown id="change" selected="#{changeValue}" label="$resource{i18nc.log.levelLabel}" submitForm="#{false}" immediate="#{false}" labels="$pageSession{newLevelList}">
<!beforeCreate
addEmptyFirstElement(in="#{pageSession.levelList}" out="#{pageSession.newLevelList}")
/>
</sun:dropDown>
<sun:button id="button2" text="$resource{i18n.button.changeLevel}" disabled="#{true}" primary="#{true}" >
<!command
getUIComponent(clientId="$pageSession{tableRowGroupId}", component=>$attribute{tableRowGroup});
getAllSingleMapRows(TableRowGroup="${tableRowGroup}" Rows=>$attribute{allRows});
changeLoggerLevels( newLogLevel="#{changeValue}" allRows="${allRows}" newList="#{requestScope.tmpList}");
setAttribute(key="tableList" value="#{requestScope.tmpList}")
/>
</sun:button>
</sun:panelGroup>
</facet>
<sun:tableRowGroup id="rowGroup1" selected="#{td.value.selected}" data={"$attribute{tableList}"} sourceVar="td">
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{tableRowGroupId});
/>
<sun:tableColumn headerText="$resource{i18n.common.SelectHeader}" selectId="select" rowHeader="$boolean{false}" id="col1">
<sun:checkbox id="select"
selected="#{td.value.selected}"
selectedValue="$boolean{true}"
onClick="setTimeout('changeTwoTableButtons()', 0);"
/>
</sun:tableColumn>
<sun:tableColumn headerText="$resource{i18nc.log.LoggerNameCol}" sort="loggerName" rowHeader="$boolean{false}" id="col2">
<sun:textField columns="$int{50}" id="col1St" value="#{td.value.loggerName}" />
</sun:tableColumn>
<sun:tableColumn headerText="$resource{i18nc.log.LoggerLeveCol}" sort="level" rowHeader="$boolean{false}" id="col3">
//<sun:textField columns="$int{30}" id="col1St" value="#{td.value.level}" />
<sun:dropDown id="level" selected="#{td.value.level}" labels="$pageSession{levelList}" />
</sun:tableColumn>
"<br/>
</sun:tableRowGroup>
</sun:table>
<sun:title id="title2" >
#include "/common/configuration/loggerLevelsButtons.jsf"
</sun:title>
<sun:hidden id="helpKey" value="$resource{help_common.loggerLevels}" />
</sun:form>
"<br/>
#include "/common/shared/changeButtonsJS.inc"
</define>
</composition>