
logViewer.logViewer.jsf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of console-common Show documentation
Show all versions of console-common Show documentation
This bundle contains common code that may be shared across plugins.
The newest version!
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings")
setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks");
setResourceBundle(key="i18n" bundle="org.glassfish.admingui.core.Strings");
setAttribute(key="logentries" value=[]);
getRequestValue(key="instanceName" value=>$attribute{instanceName});
getRequestValue(key="logFile" value=>$attribute{reqLogFile});
getRequestValue(key="timestamp" value=>$attribute{timestamp});
getRequestValue(key="onlyLevel" value=>$attribute{reqOnlyLevel});
getRequestValue(key="logLevel" value=>$attribute{reqLogLevel}, default="INFO" );
getRequestValue(key="logger" value=>$attribute{reqCustomLogger});
if($attribute{reqLogFile}) {
setAttribute(key="logFile" value="$attribute{reqLogFile}" );
}
if($attribute{reqCustomLogger}) {
setAttribute(key="customLogger" value="$attribute{reqCustomLogger}" );
}
if($attribute{reqOnlyLevel}) {
setAttribute(key="onlyLevel" value="$attribute{reqOnlyLevel}" );
}
if($attribute{reqLogLevel}) {
setAttribute(key="logLevel" value="$attribute{reqLogLevel}" );
}
if ($session{showAdvanced}=#{null}) {
setSessionAttribute(key="showAdvanced" value="false" );
}
if($attribute{truncate}=#{null}) {
setAttribute(key="truncate" value="true" );
}
if($attribute{dateDisabled}=#{null}) {
setAttribute(key="dateDisabled" value="disabled" );
}
if($attribute{timestamp}) {
setAttribute(key="dateEnabled" value="enabled" );
getFormattedDateTime(Timestamp="#{timestamp}", Time=>$attribute{fromTime}, Date=>$attribute{fromDate});
getFormattedDateTime(Timestamp="#{timestamp}", AddHour="true", Time=>$attribute{toTime}, Date=>$attribute{toDate});
}
createMap(result="#{requestScope.attrs}");
mapPut(map="#{requestScope.attrs}" key="instanceName" value="#{instanceName}");
gf.restRequest(
endpoint="#{sessionScope.REST_URL}/view-log/details/lognames.json"
attrs="#{requestScope.attrs}"
method="GET"
result="#{requestScope.queryResult}");
setPageSessionAttribute(key="logFiles" value="#{requestScope.queryResult.data['InstanceLogFileNames']}");
if(!$attribute{logFile}) {
setAttribute(key="logFile" value="#{pageSession.logFiles[0]}");
}
urlencode(value="#{logFile}" encoding="UTF-8" result="#{pageSession.encodedLogFile}");
/** FIXME **/
//println("LF: #{logFile}");
//println("LFP : #{pageSession.encodedLogFile}");
gf.getLogQueryAttributes(
InstanceName="#{instanceName}",
LogDateSortDirection="false",
FromRecord="#{fromRecord}",
AfterRecord="#{afterRecord}",
LogFileName="#{logFile}",
LogLevel="#{logLevel}",
OnlyLevel="#{requestScope.onlyLevel}",
DateEnabled="#{requestScope.dateEnabled}",
FromDate="#{requestScope.fromDate}",
FromTime="#{requestScope.fromTime}",
ToDate="#{requestScope.toDate}",
ToTime="#{requestScope.toTime}",
Loggers="#{requestScope.logentries}",
CustomLoggers="#{requestScope.customLogger}",
anySearch="#{requestScope.anySearch}",
NumToDisplay="#{requestScope.numToDisplay}",
attributes=>$attribute{attrs});
gf.restRequest(
endpoint="#{sessionScope.REST_URL}/view-log/details.json"
attrs="#{requestScope.attrs}"
method="GET"
result="#{requestScope.queryResult}");
gf.processLogRecords(
logRecords="#{requestScope.queryResult.data.records}"
truncate="#{truncate}"
truncateLength="100"
firstRecord="#{requestScope.firstRecord}"
lastRecord="#{requestScope.lastRecord}"
result="#{requestScope.tableList}"
);
getFirstLastRecord(
FirstRecord="#{firstRecord}",
LastRecord="#{lastRecord}",
First=>$page{first},
Last=>$page{last});
setAttribute(key="hasRecords" value="#{requestScope.queryResult.data.records.size() > 0}" );
#include "/common/shared/alertMsg_1.inc"
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
setAttribute(key="hasResults" value="true" );
setSessionAttribute(key="showAdvanced" value="false" );
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
setAttribute(key="hasResults" value="true" );
setSessionAttribute(key="showAdvanced" value="false" );
setSessionAttribute(key="showAdvanced" value="true");
setAttribute(key="hasResults" value="true" );
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
setAttribute(key="logentries" value="#{null}");
setAttribute(key="customLogger" value="#{null}");
setAttribute(key="numToDisplay" value="#{null}");
setSessionAttribute(key="showAdvanced" value="false");
setAttribute(key="hasResults" value="true" );
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
if ($attribute{fromDate}=#{null}) {
getDate(DateFormat="short", Date=>$attribute{fromDate});
setAttribute(key="toDate" value="#{fromDate}");
getTime(Time=>$attribute{toTime});
}
"
getClientId(component="$this{component}" clientId=>$session{dateDisabledButton});
"
getClientId(component="$this{component}" clientId=>$session{dateEnabledButton});
"
"
"
createMap(result="#{requestScope.attrs}");
mapPut(map="#{requestScope.attrs}" key="target" value="#{instanceName}");
gf.restRequest(
endpoint="#{sessionScope.REST_URL}/list-log-levels.json"
attrs="#{requestScope.attrs}"
method="GET"
result="#{pageSession.loggerData}");
"
/* Get the server list */
gf.restRequest(
endpoint="#{sessionScope.REST_URL}/servers/server.json"
method="GET"
result="#{requestScope.servers}");
gf.getMapKeys(Map="#{requestScope.servers.data.extraProperties.childResources}" Keys="#{requestScope.servers}");
setAttribute(key="logFile", value="#{null}");
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
getClientId(component="$this{component}" clientId=>$page{topActionGroup});
setAttribute(key="showButton1", value="#{hasResults}");
setAttribute(key="button1Text", value="$resource{i18nc.logViewer.RecordsBefore, #{first}}");
if (#{hasRecords}=false) {
setAttribute(key="button1Text", value="$resource{i18nc.logViewer.Prev}");
}
if (#{first}=0) {
setAttribute(key="showButton1", value="#{false}");
}
setAttribute(key="afterRecord" value="false");
setAttribute(key="fromRecord" value="#{first}");
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
"
"
setAttribute(key="button2Text", value="$resource{i18nc.logViewer.RecordsAfter, #{last}}");
if (#{hasRecords}=false) {
setAttribute(key="button2Text", value="$resource{i18nc.logViewer.Next}");
}
setAttribute(key="afterRecord" value="true");
setAttribute(key="fromRecord" value="#{last}");
gf.navigate(page="#{request.contextPath}/common/logViewer/logViewer.jsf");
getClientId(component="$this{component}" clientId=>$page{propertyTableRowGroupId});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy