From ff858a495d97b8b8af29ac2a96e05d70044e81a0 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 28 Aug 2019 17:26:41 +0200 Subject: [PATCH 1/3] - Added new core controller JOB_Controller - Added new webservicetyp_kurzbz "job" to table system.tbl_webservicetyp in system/dbupdate_3.3.php - Added new filter "All jobs viewer" - Added new __construct to LogLib to set properties - Added new public methods logInfoDB, logDebugDB, logWarningDB and logErrorDB to LogLib - Added new private method _logDB to LogLib - Renamed LogLib private method _format to _getPrefix - Added new private method _getDatabaseDescription to LogLib - Changed method _getCaller to use different levels of debug_backtrace - Added new properties and constants to LogLib to log to the database --- application/core/APIv1_Controller.php | 4 +- application/core/Auth_Controller.php | 7 +- application/core/CLI_Controller.php | 5 +- application/core/DB_Model.php | 5 + application/core/FHC_Controller.php | 7 +- application/core/FS_Model.php | 7 +- application/core/JOB_Controller.php | 92 ++++++++ application/libraries/LogLib.php | 210 +++++++++++++++--- .../models/system/Webservicelog_model.php | 3 +- public/css/FilterWidget.css | 16 ++ system/dbupdate_3.3.php | 14 ++ system/filtersupdate.php | 24 +- 12 files changed, 355 insertions(+), 39 deletions(-) create mode 100644 application/core/JOB_Controller.php diff --git a/application/core/APIv1_Controller.php b/application/core/APIv1_Controller.php index 6432c87db..b0c98c6e5 100644 --- a/application/core/APIv1_Controller.php +++ b/application/core/APIv1_Controller.php @@ -1,9 +1,11 @@ load->library('LogLib', array( + 'classIndex' => 5, + 'functionIndex' => 5, + 'lineIndex' => 4, + 'dbLogType' => 'job', // required + 'dbExecuteUser' => 'Cronjob system' + )); + } + + //------------------------------------------------------------------------------------------------------------------ + // Protected methods + + /** + * Writes a cronjob info log + */ + protected function logInfo($response, $parameters = null) + { + $this->_log(LogLib::INFO, 'Cronjob info', $response, $parameters); + } + + /** + * Writes a cronjob debug log + */ + protected function logDebug($response, $parameters = null) + { + $this->_log(LogLib::DEBUG, 'Cronjob debug', $response, $parameters); + } + + /** + * Writes a cronjob warning log + */ + protected function logWarning($response, $parameters = null) + { + $this->_log(LogLib::WARNING, 'Cronjob warning', $response, $parameters); + } + + /** + * Writes a cronjob error log + */ + protected function logError($response, $parameters = null) + { + $this->_log(LogLib::ERROR, 'Cronjob error', $response, $parameters); + } + + //------------------------------------------------------------------------------------------------------------------ + // Private methods + + /** + * Writes a log to database + */ + private function _log($level, $requestId, $response, $parameters) + { + $data = new stdClass(); + + $data->response = $response; + if ($parameters != null) $data->parameters = $parameters; + + switch($level) + { + case LogLib::INFO: + $this->loglib->logInfoDB($requestId, json_encode(success($data, LogLib::INFO))); + break; + case LogLib::DEBUG: + $this->loglib->logDebugDB($requestId, json_encode(success($data, LogLib::DEBUG))); + break; + case LogLib::WARNING: + $this->loglib->logWarningDB($requestId, json_encode(error($data, LogLib::WARNING))); + break; + case LogLib::ERROR: + $this->loglib->logErrorDB($requestId, json_encode(error($data, LogLib::ERROR))); + break; + } + } +} diff --git a/application/libraries/LogLib.php b/application/libraries/LogLib.php index cb0541003..b98575150 100644 --- a/application/libraries/LogLib.php +++ b/application/libraries/LogLib.php @@ -1,102 +1,252 @@ '; const LINE_SEPARATOR = ':'; - // -------------------------------------------------------------------------------------------------------------- - // Public methods + // CodeIgniter configuration log entry name and log debug value + const CI_LOG_THRESHOLD_NAME = 'log_threshold'; + const CI_LOG_THRESHOLD_DEBUG = 2; + + // LogLib parameters names + const P_NAME_CLASS_INDEX = 'classIndex'; + const P_NAME_FUNCTION_INDEX = 'functionIndex'; + const P_NAME_LINE_INDEX = 'lineIndex'; + const P_NAME_DB_LOG_TYPE = 'dbLogType'; + const P_NAME_DB_EXECUTE_USER = 'dbExecuteUser'; + + // Properties used to retrieve caller data + private $_classIndex; + private $_functionIndex; + private $_lineIndex; + + // Properties used when logging to database + private $_dbLogType; + private $_dbExecuteUser; /** - * logDebug + * Set properties to a default value or overwrites them with the given parameters + */ + public function __construct($params = null) + { + // Properties default values + $this->_classIndex = self::CLASS_INDEX; + $this->_functionIndex = self::FUNCTION_INDEX; + $this->_lineIndex = self::LINE_INDEX; + $this->_dbLogType = null; + $this->_dbExecuteUser = self::DB_EXECUTE_USER; + + // If parameters are given then overwrite the default values + if (!isEmptyArray($params)) + { + if (isset($params[self::P_NAME_CLASS_INDEX])) $this->_classIndex = $params[self::P_NAME_CLASS_INDEX]; + if (isset($params[self::P_NAME_FUNCTION_INDEX])) $this->_functionIndex = $params[self::P_NAME_FUNCTION_INDEX]; + if (isset($params[self::P_NAME_LINE_INDEX])) $this->_lineIndex = $params[self::P_NAME_LINE_INDEX]; + if (isset($params[self::P_NAME_DB_LOG_TYPE])) $this->_dbLogType = $params[self::P_NAME_DB_LOG_TYPE]; + if (isset($params[self::P_NAME_DB_EXECUTE_USER])) $this->_dbExecuteUser = $params[self::P_NAME_DB_EXECUTE_USER]; + } + } + + // -------------------------------------------------------------------------------------------------------------- + // Public methods based on CodeIgniter log system + + /** + * Writes a debug log to CodeIgniter log */ public function logDebug($message) { - $this->_log(LogLib::DEBUG, $message); + $this->_log(self::DEBUG, $message); } /** - * logInfo + * Writes an info log to CodeIgniter log */ public function logInfo($message) { - $this->_log(LogLib::INFO, $message); + $this->_log(self::INFO, $message); } /** - * logError + * Writes an error log to CodeIgniter log */ public function logError($message) { - $this->_log(LogLib::ERROR, $message); + $this->_log(self::ERROR, $message); + } + + // -------------------------------------------------------------------------------------------------------------- + // Public methods based on database + + /** + * Writes an info log to database + */ + public function logInfoDB($requestId, $data) + { + $this->_logDB(self::INFO, $requestId, $data); + } + + /** + * Writes a debug log to database + */ + public function logDebugDB($requestId, $data) + { + $this->_logDB(self::DEBUG, $requestId, $data); + } + + /** + * Writes an warning log to database + */ + public function logWarningDB($requestId, $data) + { + $this->_logDB(self::WARNING, $requestId, $data); + } + + /** + * Writes an error log to database + */ + public function logErrorDB($requestId, $data) + { + $this->_logDB(self::ERROR, $requestId, $data); } // -------------------------------------------------------------------------------------------------------------- // Private methods /** - * log + * Writes using CodeIgniter log system (file system) */ private function _log($level, $message) { - log_message($level, $this->_getCaller().$message); + log_message($level, $this->_getPrefix($this->_getCaller()).$message); } /** - * _getCaller + * Writes logs to database + */ + private function _logDB($level, $requestId, $data) + { + // If the _dbLogType parameter was not given when this library was loaded + // NOTE: this message will be displayed only to the developer AND stops the execution + if ($this->_dbLogType == null) + { + show_error('To log to database you need to specify the "'.self::P_NAME_DB_LOG_TYPE.'" parameter when the LogLib is loaded'); + } + + $ci =& get_instance(); // get code igniter instance + + // If only debug log is enabed then is possible to write a debug log, otherwise... + if ($level == self::DEBUG && $ci->config->item(self::CI_LOG_THRESHOLD_NAME) != self::CI_LOG_THRESHOLD_DEBUG) + { + // ...do nothing + } + else + { + // Loads WebservicelogModel + $ci->load->model('system/Webservicelog_model', 'WebservicelogModel'); + + // Get caller data + $callerData = $this->_getCaller(); + + // Writes a log to database + $ci->WebservicelogModel->insert(array( + 'webservicetyp_kurzbz' => $this->_dbLogType, + 'request_id' => $requestId, + 'beschreibung' => $this->_getDatabaseDescription($callerData), + 'request_data' => $data, + 'execute_user' => $this->_dbExecuteUser, + 'execute_time' => 'NOW()' // current time + )); + } + } + + /** + * Retrieves caller's data */ private function _getCaller() { - $classIndex = 3; - $functionIndex = 3; - $lineIndex = 2; $class = ''; $function = ''; $line = ''; $backtrace_arr = debug_backtrace(); - if (isset($backtrace_arr[$classIndex]['class']) && $backtrace_arr[$classIndex]['class'] != '') + + if (isset($backtrace_arr[$this->_classIndex]['class']) && $backtrace_arr[$this->_classIndex]['class'] != '') { - $class = $backtrace_arr[$classIndex]['class']; + $class = $backtrace_arr[$this->_classIndex]['class']; } - if (isset($backtrace_arr[$functionIndex]['function']) && $backtrace_arr[$functionIndex]['function'] != '') + if (isset($backtrace_arr[$this->_functionIndex]['function']) && $backtrace_arr[$this->_functionIndex]['function'] != '') { - $function = $backtrace_arr[$functionIndex]['function']; + $function = $backtrace_arr[$this->_functionIndex]['function']; } - if (isset($backtrace_arr[$lineIndex]['line']) && $backtrace_arr[$lineIndex]['line'] != '') + if (isset($backtrace_arr[$this->_lineIndex]['line']) && $backtrace_arr[$this->_lineIndex]['line'] != '') { - $line = $backtrace_arr[$lineIndex]['line']; + $line = $backtrace_arr[$this->_lineIndex]['line']; } - return $this->_format($class, $function, $line); + return array( + self::CLASS_NAME => $class, + self::FUNCTION_NAME => $function, + self::CODE_LINE => $line + ); } /** - * format + * Formats the log message prefix (file system based) */ - private function _format($class, $function, $line) + private function _getPrefix($callerData) { - $formatted = LogLib::CALLER_PREFIX; + $formatted = self::CALLER_PREFIX; - if (!is_null($class) && $class != '') + if (!isEmptyString($callerData[self::CLASS_NAME])) { - $formatted .= $class.LogLib::CLASS_POSTFIX; + $formatted .= $callerData[self::CLASS_NAME].self::CLASS_POSTFIX; } - $formatted .= $function.LogLib::LINE_SEPARATOR.$line.LogLib::CALLER_POSTFIX.' '; + $formatted .= $callerData[self::FUNCTION_NAME].self::LINE_SEPARATOR.$callerData[self::CODE_LINE].self::CALLER_POSTFIX.' '; + + return $formatted; + } + + /** + * Formats the database description for a log + */ + private function _getDatabaseDescription($callerData) + { + $formatted = $callerData[self::FUNCTION_NAME].self::LINE_SEPARATOR.$callerData[self::CODE_LINE]; + + if (!isEmptyString($callerData[self::CLASS_NAME])) + { + $formatted = $callerData[self::CLASS_NAME].self::CLASS_POSTFIX.$formatted; + } return $formatted; } diff --git a/application/models/system/Webservicelog_model.php b/application/models/system/Webservicelog_model.php index dc45b13a7..a5b23a396 100644 --- a/application/models/system/Webservicelog_model.php +++ b/application/models/system/Webservicelog_model.php @@ -1,13 +1,14 @@ dbTable = 'system.tbl_webservicelog'; $this->pk = 'webservicelog_id'; } diff --git a/public/css/FilterWidget.css b/public/css/FilterWidget.css index 295dff8ec..5254268c7 100644 --- a/public/css/FilterWidget.css +++ b/public/css/FilterWidget.css @@ -113,3 +113,19 @@ #applyFilter, #saveCustomFilterButton { width: 100px; } + +.text-red { + color: red; +} + +.text-orange { + color: orange; +} + +.text-blue { + color: blue; +} + +.text-green { + color: green; +} diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 4e720daef..1947debdb 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -3030,6 +3030,20 @@ if(!$result = @$db->db_query("SELECT stufe FROM public.tbl_dokumentstudiengang L echo '
public.tbl_dokumentstudiengang: Spalte stufe hinzugefuegt'; } +// Add new webservice type in system.tbl_webservicetyp +if ($result = @$db->db_query("SELECT 1 FROM system.tbl_webservicetyp WHERE webservicetyp_kurzbz = 'job';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_webservicetyp(webservicetyp_kurzbz, beschreibung) VALUES('job', 'Cronjob');"; + + if (!$db->db_query($qry)) + echo 'system.tbl_webservicetyp '.$db->db_last_error().'
'; + else + echo ' system.tbl_webservicetyp: Added webservice type "job"
'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 413b821af..2d1789774 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -353,7 +353,7 @@ $filters = array( {"name": "fakultaet"}, {"name": "datum"}, {"name": "uhrzeit"}, - {"name": "anmeldefrist"}, + {"name": "anmeldefrist"}, {"name": "oeffentlich"}, {"name": "studiengaenge"}, {"name": "freie_plaetze"}, @@ -460,6 +460,28 @@ $filters = array( } ', 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'jobslogs', + 'filter_kurzbz' => 'all', + 'description' => '{All logs produced by jobs}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "All jobs viewer", + "columns": [ + {"name": "RequestId"}, + {"name": "ExecutionTime"}, + {"name": "ExecutedBy"}, + {"name": "Description"}, + {"name": "Data"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null, ) ); From bf8b7e0ccd972f83118fc73c065c39d8456dbf0d Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 16 Sep 2019 14:00:51 +0200 Subject: [PATCH 2/3] Added JobsViewer --- application/controllers/system/JobsViewer.php | 44 +++++++++++++ application/views/system/jobs/jobsViewer.php | 47 +++++++++++++ .../views/system/jobs/jobsViewerData.php | 66 +++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 application/controllers/system/JobsViewer.php create mode 100644 application/views/system/jobs/jobsViewer.php create mode 100644 application/views/system/jobs/jobsViewerData.php diff --git a/application/controllers/system/JobsViewer.php b/application/controllers/system/JobsViewer.php new file mode 100644 index 000000000..2fdfa7181 --- /dev/null +++ b/application/controllers/system/JobsViewer.php @@ -0,0 +1,44 @@ + 'admin:r' + ) + ); + + // Loads WidgetLib + $this->load->library('WidgetLib'); + + // Loads phrases system + $this->loadPhrases( + array( + 'global', + 'ui', + 'filter' + ) + ); + } + + // ----------------------------------------------------------------------------------------------------------------- + // Public methods + + /** + * Main page of the InfoCenter tool + */ + public function index() + { + $this->load->view('system/jobs/jobsViewer.php'); + } +} diff --git a/application/views/system/jobs/jobsViewer.php b/application/views/system/jobs/jobsViewer.php new file mode 100644 index 000000000..f7018a272 --- /dev/null +++ b/application/views/system/jobs/jobsViewer.php @@ -0,0 +1,47 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'JobsViewer', + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'sbadmintemplate' => true, + 'tablesorter' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'phrases' => array( + 'global' => array('mailAnXversandt'), + 'ui' => array('bitteEintragWaehlen') + ), + 'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css', + 'customJSs' => array('public/js/bootstrapper.js') + ) + ); +?> + + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/jobs/jobsViewerData.php'); ?> +
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/jobs/jobsViewerData.php b/application/views/system/jobs/jobsViewerData.php new file mode 100644 index 000000000..07815c2f3 --- /dev/null +++ b/application/views/system/jobs/jobsViewerData.php @@ -0,0 +1,66 @@ + ' + SELECT wsl.webservicelog_id AS "LogId", + wsl.request_id AS "RequestId", + wsl.execute_time AS "ExecutionTime", + wsl.execute_user AS "ExecutedBy", + wsl.beschreibung AS "Description", + wsl.request_data AS "Data" + FROM system.tbl_webservicelog wsl + WHERE wsl.webservicetyp_kurzbz = \'job\' + ORDER BY wsl.execute_time DESC + ', + 'requiredPermissions' => 'admin', + 'datasetRepresentation' => 'tablesorter', + 'reloadDataset' => ($this->input->get('reloadDataset') == 'true' ? true : false), + 'columnsAliases' => array( + 'Log id', + 'Request id', + 'Execution time', + 'Executed by', + 'Producer', + 'Data' + ), + 'formatRow' => function($datasetRaw) { + + $datasetRaw->ExecutionTime = date_format(date_create($datasetRaw->ExecutionTime), 'd.m.Y H:i:s'); + + return $datasetRaw; + }, + 'markRow' => function($datasetRaw) { + + $mark = ''; + + if ($datasetRaw->RequestId == 'Cronjob error') + { + $mark = 'text-red'; + } + + if ($datasetRaw->RequestId == 'Cronjob info') + { + $mark = 'text-green'; + } + + if ($datasetRaw->RequestId == 'Cronjob warning') + { + $mark = 'text-orange'; + } + + if ($datasetRaw->RequestId == 'Cronjob debug') + { + $mark = 'text-info'; + } + + return $mark; + } + ); + + $filterWidgetArray['app'] = 'core'; + $filterWidgetArray['datasetName'] = 'jobslogs'; + $filterWidgetArray['filterKurzbz'] = 'all'; + $filterWidgetArray['filter_id'] = $this->input->get('filter_id'); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> From 1273c3241967d311d10676957fd0c13ef92265d3 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 26 Sep 2019 17:40:51 +0200 Subject: [PATCH 3/3] - Renamed controller system/JobsViewer.php to system/LogsViewer.php - Renamed directory views/system/jobs to views/system/logs - Changed FilterWidget query in view system/logs/logsViewerData.php to load all logs - Added more filters in database to load different log types --- .../system/{JobsViewer.php => LogsViewer.php} | 4 +- .../jobsViewer.php => logs/logsViewer.php} | 4 +- .../logsViewerData.php} | 10 +- system/filtersupdate.php | 153 +++++++++++++++++- 4 files changed, 157 insertions(+), 14 deletions(-) rename application/controllers/system/{JobsViewer.php => LogsViewer.php} (87%) rename application/views/system/{jobs/jobsViewer.php => logs/logsViewer.php} (90%) rename application/views/system/{jobs/jobsViewerData.php => logs/logsViewerData.php} (88%) diff --git a/application/controllers/system/JobsViewer.php b/application/controllers/system/LogsViewer.php similarity index 87% rename from application/controllers/system/JobsViewer.php rename to application/controllers/system/LogsViewer.php index 2fdfa7181..55cf38d82 100644 --- a/application/controllers/system/JobsViewer.php +++ b/application/controllers/system/LogsViewer.php @@ -5,7 +5,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** * Overview on cronjob logs */ -class JobsViewer extends Auth_Controller +class LogsViewer extends Auth_Controller { /** * Constructor @@ -39,6 +39,6 @@ class JobsViewer extends Auth_Controller */ public function index() { - $this->load->view('system/jobs/jobsViewer.php'); + $this->load->view('system/logs/logsViewer.php'); } } diff --git a/application/views/system/jobs/jobsViewer.php b/application/views/system/logs/logsViewer.php similarity index 90% rename from application/views/system/jobs/jobsViewer.php rename to application/views/system/logs/logsViewer.php index f7018a272..96790b479 100644 --- a/application/views/system/jobs/jobsViewer.php +++ b/application/views/system/logs/logsViewer.php @@ -2,7 +2,7 @@ $this->load->view( 'templates/FHC-Header', array( - 'title' => 'JobsViewer', + 'title' => 'Logs viewer', 'jquery' => true, 'jqueryui' => true, 'bootstrap' => true, @@ -37,7 +37,7 @@
- load->view('system/jobs/jobsViewerData.php'); ?> + load->view('system/logs/logsViewerData.php'); ?>
diff --git a/application/views/system/jobs/jobsViewerData.php b/application/views/system/logs/logsViewerData.php similarity index 88% rename from application/views/system/jobs/jobsViewerData.php rename to application/views/system/logs/logsViewerData.php index 07815c2f3..2dfcfc9d0 100644 --- a/application/views/system/jobs/jobsViewerData.php +++ b/application/views/system/logs/logsViewerData.php @@ -7,9 +7,9 @@ wsl.execute_time AS "ExecutionTime", wsl.execute_user AS "ExecutedBy", wsl.beschreibung AS "Description", - wsl.request_data AS "Data" + wsl.request_data AS "Data", + wsl.webservicetyp_kurzbz AS "WebserviceType" FROM system.tbl_webservicelog wsl - WHERE wsl.webservicetyp_kurzbz = \'job\' ORDER BY wsl.execute_time DESC ', 'requiredPermissions' => 'admin', @@ -21,7 +21,8 @@ 'Execution time', 'Executed by', 'Producer', - 'Data' + 'Data', + 'Webservice type' ), 'formatRow' => function($datasetRaw) { @@ -58,8 +59,7 @@ ); $filterWidgetArray['app'] = 'core'; - $filterWidgetArray['datasetName'] = 'jobslogs'; - $filterWidgetArray['filterKurzbz'] = 'all'; + $filterWidgetArray['datasetName'] = 'logs'; $filterWidgetArray['filter_id'] = $this->input->get('filter_id'); echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 2d1789774..415b8d442 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -463,14 +463,14 @@ $filters = array( ), array( 'app' => 'core', - 'dataset_name' => 'jobslogs', - 'filter_kurzbz' => 'all', - 'description' => '{All logs produced by jobs}', + 'dataset_name' => 'logs', + 'filter_kurzbz' => 'last7days', + 'description' => '{Last 7 days logs}', 'sort' => 1, 'default_filter' => true, 'filter' => ' { - "name": "All jobs viewer", + "name": "All logs from the last 7 days", "columns": [ {"name": "RequestId"}, {"name": "ExecutionTime"}, @@ -478,7 +478,150 @@ $filters = array( {"name": "Description"}, {"name": "Data"} ], - "filters": [] + "filters": [ + { + "name": "ExecutionTime", + "operation": "lt", + "condition": "7", + "option": "days" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'logs', + 'filter_kurzbz' => 'jobs14days', + 'description' => '{Last 14 days jobs logs}', + 'sort' => 2, + 'default_filter' => false, + 'filter' => ' + { + "name": "All jobs logs from the last 14 days", + "columns": [ + {"name": "RequestId"}, + {"name": "ExecutionTime"}, + {"name": "ExecutedBy"}, + {"name": "Description"}, + {"name": "Data"} + ], + "filters": [ + { + "name": "WebserviceType", + "operation": "contains", + "condition": "job" + }, + { + "name": "ExecutionTime", + "operation": "lt", + "condition": "14", + "option": "days" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'logs', + 'filter_kurzbz' => 'repots14days', + 'description' => '{Last 14 days reports logs}', + 'sort' => 3, + 'default_filter' => false, + 'filter' => ' + { + "name": "All reports logs from the last 14 days", + "columns": [ + {"name": "RequestId"}, + {"name": "ExecutionTime"}, + {"name": "ExecutedBy"}, + {"name": "Description"}, + {"name": "Data"} + ], + "filters": [ + { + "name": "WebserviceType", + "operation": "contains", + "condition": "reports" + }, + { + "name": "ExecutionTime", + "operation": "lt", + "condition": "14", + "option": "days" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'logs', + 'filter_kurzbz' => 'content3days', + 'description' => '{Last 3 days content logs}', + 'sort' => 4, + 'default_filter' => false, + 'filter' => ' + { + "name": "All content logs from the last 3 days", + "columns": [ + {"name": "RequestId"}, + {"name": "ExecutionTime"}, + {"name": "ExecutedBy"}, + {"name": "Description"}, + {"name": "Data"} + ], + "filters": [ + { + "name": "WebserviceType", + "operation": "contains", + "condition": "content" + }, + { + "name": "ExecutionTime", + "operation": "lt", + "condition": "3", + "option": "days" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'logs', + 'filter_kurzbz' => 'wienerlinien7days', + 'description' => '{Last 7 days wiener linien logs}', + 'sort' => 5, + 'default_filter' => false, + 'filter' => ' + { + "name": "All wiener linien logs from the last 7 days", + "columns": [ + {"name": "RequestId"}, + {"name": "ExecutionTime"}, + {"name": "ExecutedBy"}, + {"name": "Description"}, + {"name": "Data"} + ], + "filters": [ + { + "name": "WebserviceType", + "operation": "contains", + "condition": "wienerlinien" + }, + { + "name": "ExecutionTime", + "operation": "lt", + "condition": "7", + "option": "days" + } + ] } ', 'oe_kurzbz' => null,