Package org.ametys.plugins.core.ui.log
Class ArchivedLogClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.core.ui.log.ArchivedLogClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class ArchivedLogClientSideElement extends StaticClientSideElement
Client side element to display archived logs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected JSONUtils
_jsonUtils
JSON Utils-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description ArchivedLogClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Map<String,Object>
_convertFilters(String filtersJson)
private File
_getLogsDirectory()
Get the logs directory.Map<String,Object>
getLogLines(String logFileName, String filtersJson, Integer limit)
Get the log lines of the given log file.void
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_jsonUtils
protected JSONUtils _jsonUtils
JSON Utils
-
-
Constructor Detail
-
ArchivedLogClientSideElement
public ArchivedLogClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
getLogLines
public Map<String,Object> getLogLines(String logFileName, String filtersJson, Integer limit)
Get the log lines of the given log file.- Parameters:
logFileName
- The log file name.filtersJson
- The filters (received as a JSON object)limit
- Limit of displayed events (can be 0 or -1 for no limit)- Returns:
- A
Map
, in "lines" there are the log lines, in "error" there is the error message if an error occurs.
-
_getLogsDirectory
private File _getLogsDirectory()
Get the logs directory.- Returns:
- The directory where the logs are stored
-
_convertFilters
private Map<String,Object> _convertFilters(String filtersJson)
-
-