From 362c5ca03246b40fa28b3150bb8b5cd1d64e2374 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 10 Oct 2008 16:11:14 +0200 Subject: [PATCH] Added admin panel for message parsers --- src/admin/parsers.php | 321 ++++++++++++++++++ src/classes/msgparser.class.php | 7 + .../msgparsers/msgparser.apache2.class.php | 7 +- .../msgparser.apache2common.class.php | 7 +- .../msgparsers/msgparser.eventlog.class.php | 7 +- .../msgparsers/msgparser.iis.class.php | 7 +- .../msgparsers/msgparser.wireless.class.php | 7 +- src/include/functions_common.php | 68 ++++ src/include/functions_config.php | 77 +++++ src/include/functions_themes.php | 21 -- src/lang/de/admin.php | 7 +- src/lang/en/admin.php | 34 +- src/lang/pt_BR/admin.php | 7 +- src/templates/admin/admin_menu.html | 7 +- src/templates/admin/admin_parsers.html | 99 ++++++ 15 files changed, 645 insertions(+), 38 deletions(-) create mode 100644 src/admin/parsers.php create mode 100644 src/templates/admin/admin_parsers.html diff --git a/src/admin/parsers.php b/src/admin/parsers.php new file mode 100644 index 0000000..17d4bb9 --- /dev/null +++ b/src/admin/parsers.php @@ -0,0 +1,321 @@ + Helps administrating message parsers + * + * All directives are explained within this file + * + * Copyright (C) 2008 Adiscon GmbH. + * + * This file is part of phpLogCon. + * + * PhpLogCon is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PhpLogCon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with phpLogCon. If not, see . + * + * A copy of the GPL can be found in the file "COPYING" in this + * distribution + ********************************************************************* +*/ + +// *** Default includes and procedures *** // +define('IN_PHPLOGCON', true); +$gl_root_path = './../'; + +// Now include necessary include files! +include($gl_root_path . 'include/functions_common.php'); +include($gl_root_path . 'include/functions_frontendhelpers.php'); +include($gl_root_path . 'include/functions_filters.php'); + +// Set PAGE to be ADMINPAGE! +define('IS_ADMINPAGE', true); +$content['IS_ADMINPAGE'] = true; +InitPhpLogCon(); +InitSourceConfigs(); +InitFrontEndDefaults(); // Only in WebFrontEnd +InitFilterHelpers(); // Helpers for frontend filtering! + +// Init admin langauge file now! +IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' ); +// --- + +// --- BEGIN Custom Code +if ( isset($_GET['op']) ) +{ + if ($_GET['op'] == "add") + { + // Set Mode to add + $content['ISEDITORNEWSEARCH'] = "true"; + $content['SEARCH_FORMACTION'] = "addnewsearch"; + $content['SEARCH_SENDBUTTON'] = $content['LN_SEARCH_ADD']; + + //PreInit these values + $content['DisplayName'] = ""; + $content['SearchQuery'] = ""; + + // General stuff + $content['userid'] = null; + $content['CHECKED_ISUSERONLY'] = ""; + $content['SEARCHID'] = ""; + + // --- Check if groups are available + $content['SUBGROUPS'] = GetGroupsForSelectfield(); + if ( is_array($content['SUBGROUPS']) ) + $content['ISGROUPSAVAILABLE'] = true; + else + $content['ISGROUPSAVAILABLE'] = false; + } + else if ($_GET['op'] == "edit") + { + // Set Mode to edit + $content['ISEDITORNEWSEARCH'] = "true"; + $content['SEARCH_FORMACTION'] = "editsearch"; + $content['SEARCH_SENDBUTTON'] = $content['LN_SEARCH_EDIT']; + + if ( isset($_GET['id']) ) + { + //PreInit these values + $content['SEARCHID'] = DB_RemoveBadChars($_GET['id']); + + $sqlquery = "SELECT * " . + " FROM " . DB_SEARCHES . + " WHERE ID = " . $content['SEARCHID']; + + $result = DB_Query($sqlquery); + $mysearch = DB_GetSingleRow($result, true); + if ( isset($mysearch['DisplayName']) ) + { + $content['SEARCHID'] = $mysearch['ID']; + $content['DisplayName'] = $mysearch['DisplayName']; + $content['SearchQuery'] = $mysearch['SearchQuery']; + if ( $mysearch['userid'] != null ) + $content['CHECKED_ISUSERONLY'] = "checked"; + else + $content['CHECKED_ISUSERONLY'] = ""; + + // --- Check if groups are available + $content['SUBGROUPS'] = GetGroupsForSelectfield(); + if ( is_array($content['SUBGROUPS']) ) + { + // Process All Groups + for($i = 0; $i < count($content['SUBGROUPS']); $i++) + { + if ( $mysearch['groupid'] != null && $content['SUBGROUPS'][$i]['mygroupid'] == $mysearch['groupid'] ) + $content['SUBGROUPS'][$i]['group_selected'] = "selected"; + else + $content['SUBGROUPS'][$i]['group_selected'] = ""; + } + + // Enable Group Selection + $content['ISGROUPSAVAILABLE'] = true; + } + else + $content['ISGROUPSAVAILABLE'] = false; + // --- + } + else + { + $content['ISEDITORNEWSEARCH'] = false; + $content['ISERROR'] = true; + $content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] ); + } + } + else + { + $content['ISEDITORNEWSEARCH'] = false; + $content['ISERROR'] = true; + $content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_INVALIDID']; + } + } + else if ($_GET['op'] == "delete") + { + if ( isset($_GET['id']) ) + { + //PreInit these values + $content['SEARCHID'] = DB_RemoveBadChars($_GET['id']); + + // Get UserInfo + $result = DB_Query("SELECT DisplayName FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID'] ); + $myrow = DB_GetSingleRow($result, true); + if ( !isset($myrow['DisplayName']) ) + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] ); + } + + // --- Ask for deletion first! + if ( (!isset($_GET['verify']) || $_GET['verify'] != "yes") ) + { + // This will print an additional secure check which the user needs to confirm and exit the script execution. + PrintSecureUserCheck( GetAndReplaceLangStr( $content['LN_SEARCH_WARNDELETESEARCH'], $myrow['DisplayName'] ), $content['LN_DELETEYES'], $content['LN_DELETENO'] ); + } + // --- + + // do the delete! + $result = DB_Query( "DELETE FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID'] ); + if ($result == FALSE) + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_DELSEARCH'], $content['SEARCHID'] ); + } + else + DB_FreeQuery($result); + + // Do the final redirect + RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_HASBEENDEL'], $myrow['DisplayName'] ) , "searches.php" ); + } + else + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_INVALIDID']; + } + } +} + +if ( isset($_POST['op']) ) +{ + if ( isset ($_POST['id']) ) { $content['SEARCHID'] = intval(DB_RemoveBadChars($_POST['id'])); } else {$content['SEARCHID'] = -1; } + if ( isset ($_POST['DisplayName']) ) { $content['DisplayName'] = DB_RemoveBadChars($_POST['DisplayName']); } else {$content['DisplayName'] = ""; } + if ( isset ($_POST['SearchQuery']) ) { $content['SearchQuery'] = DB_RemoveBadChars($_POST['SearchQuery']); } else {$content['SearchQuery'] = ""; } + + // User & Group handeled specially + if ( isset ($_POST['isuseronly']) ) + { + $content['userid'] = $content['SESSION_USERID']; + $content['groupid'] = "null"; // Either user or group not both! + } + else + { + $content['userid'] = "null"; + if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 ) + $content['groupid'] = intval($_POST['groupid']); + else + $content['groupid'] = "null"; + } + + // --- Check mandotary values + if ( $content['DisplayName'] == "" ) + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_DISPLAYNAMEEMPTY']; + } + else if ( $content['SearchQuery'] == "" ) + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = $content['LN_SEARCH_ERROR_SEARCHQUERYEMPTY']; + } + // --- + + if ( !isset($content['ISERROR']) ) + { + // Everything was alright, so we go to the next step! + if ( $_POST['op'] == "addnewsearch" ) + { + // Add custom search now! + $sqlquery = "INSERT INTO " . DB_SEARCHES . " (DisplayName, SearchQuery, userid, groupid) + VALUES ('" . $content['DisplayName'] . "', + '" . $content['SearchQuery'] . "', + " . $content['userid'] . ", + " . $content['groupid'] . " + )"; + $result = DB_Query($sqlquery); + DB_FreeQuery($result); + + // Do the final redirect + RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_HASBEENADDED'], $content['DisplayName'] ) , "searches.php" ); + } + else if ( $_POST['op'] == "editsearch" ) + { + $result = DB_Query("SELECT ID FROM " . DB_SEARCHES . " WHERE ID = " . $content['SEARCHID']); + $myrow = DB_GetSingleRow($result, true); + if ( !isset($myrow['ID']) ) + { + $content['ISERROR'] = true; + $content['ERROR_MSG'] = GetAndReplaceLangStr( $content['LN_SEARCH_ERROR_IDNOTFOUND'], $content['SEARCHID'] ); + } + else + { + // Edit the Search Entry now! + $result = DB_Query("UPDATE " . DB_SEARCHES . " SET + DisplayName = '" . $content['DisplayName'] . "', + SearchQuery = '" . $content['SearchQuery'] . "', + userid = " . $content['userid'] . ", + groupid = " . $content['groupid'] . " + WHERE ID = " . $content['SEARCHID']); + DB_FreeQuery($result); + + // Done redirect! + RedirectResult( GetAndReplaceLangStr( $content['LN_SEARCH_HASBEENEDIT'], $content['DisplayName']) , "searches.php" ); + } + } + } +} + +if ( !isset($_POST['op']) && !isset($_GET['op']) ) +{ + // Default Mode = List Searches + $content['LISTPARSERS'] = "true"; + + // Init List of Parsers + InitMessageParsers(); +// $content['PARSERS'] = $content['Search']; + + if ( isset($content['PARSERS']) ) + { + $i = 0; // Help counter! + foreach ($content['PARSERS'] as &$myParsers ) + { + // $mySearch['SearchQuery_Display'] = strlen($mySearch['SearchQuery']) > 25 ? substr($mySearch['SearchQuery'], 0, 25) . " ..." : $mySearch['SearchQuery']; + + // Allow EDIT + // $mySearch['ActionsAllowed'] = true; + + // Set if help link is enabled + if ( strlen($myParsers['ParserHelpArticle']) > 0 ) + $myParsers['ParserHelpEnabled'] = true; + else + $myParsers['ParserHelpEnabled'] = false; + + // --- Set CSS Class + if ( $i % 2 == 0 ) + $myParsers['cssclass'] = "line1"; + else + $myParsers['cssclass'] = "line2"; + $i++; + // --- + } + } + else + { + $content['LISTPARSERS'] = "false"; + $content['ISERROR'] = true; + $content['ERROR_MSG'] = $content['LN_PARSERS_ERROR_NOPARSERS']; + } +} +// --- END Custom Code + +// --- BEGIN CREATE TITLE +$content['TITLE'] = InitPageTitle(); +$content['TITLE'] .= " :: " . $content['LN_ADMINMENU_MSGPARSERSOPT']; +// --- END CREATE TITLE + +// --- Parsen and Output +InitTemplateParser(); +$page -> parser($content, "admin/admin_parsers.html"); +$page -> output(); +// --- + +?> \ No newline at end of file diff --git a/src/classes/msgparser.class.php b/src/classes/msgparser.class.php index f20c78e..a4a7226 100644 --- a/src/classes/msgparser.class.php +++ b/src/classes/msgparser.class.php @@ -45,7 +45,14 @@ require_once($gl_root_path . 'include/constants_logstream.php'); abstract class MsgParser{ + // Public configuration properties public $_MsgNormalize = 0; // If set to one, the msg will be reconstructed if successfully parsed before + + // Public Information properties + public $_ClassName = 'Default Messageparser'; + public $_ClassDescription = 'This is a placeholder for the message parser description!'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/"; /** * ParseLine diff --git a/src/classes/msgparsers/msgparser.apache2.class.php b/src/classes/msgparsers/msgparser.apache2.class.php index dae215a..13810e7 100644 --- a/src/classes/msgparsers/msgparser.apache2.class.php +++ b/src/classes/msgparsers/msgparser.apache2.class.php @@ -48,7 +48,12 @@ require_once($gl_root_path . 'include/constants_logstream.php'); // --- class MsgParser_apache2 extends MsgParser { -// protected $_arrProperties = null; + + // Public Information properties + public $_ClassName = 'Apache 2 Combined Format'; + public $_ClassDescription = 'Parses the combined logfile format from Apache2 webservers.'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = "http://www.monitorware.com/Common/en/Articles/setup_mwagent_webserverlogging_phplogcon_mysql.php"; // Constructor public function MsgParser_apache2() { diff --git a/src/classes/msgparsers/msgparser.apache2common.class.php b/src/classes/msgparsers/msgparser.apache2common.class.php index a8670d5..ad5823b 100644 --- a/src/classes/msgparsers/msgparser.apache2common.class.php +++ b/src/classes/msgparsers/msgparser.apache2common.class.php @@ -48,7 +48,12 @@ require_once($gl_root_path . 'include/constants_logstream.php'); // --- class MsgParser_apache2common extends MsgParser { -// protected $_arrProperties = null; + + // Public Information properties + public $_ClassName = 'Apache 2 Common Format'; + public $_ClassDescription = 'Parses the common logfile format from Apache2 webservers.'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = "http://www.monitorware.com/Common/en/Articles/setup_mwagent_webserverlogging_phplogcon_mysql.php"; // Constructor public function MsgParser_apache2common() { diff --git a/src/classes/msgparsers/msgparser.eventlog.class.php b/src/classes/msgparsers/msgparser.eventlog.class.php index 82e8fd9..f6f45c0 100644 --- a/src/classes/msgparsers/msgparser.eventlog.class.php +++ b/src/classes/msgparsers/msgparser.eventlog.class.php @@ -46,7 +46,12 @@ require_once($gl_root_path . 'include/constants_logstream.php'); // --- class MsgParser_eventlog extends MsgParser { -// protected $_arrProperties = null; + + // Public Information properties + public $_ClassName = 'Adiscon Eventlog Format'; + public $_ClassDescription = 'This is a parser for a special format which can be created with Adiscon Eventreporter or MonitorWare Agent.'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/"; // Constructor public function MsgParser_eventlog() { diff --git a/src/classes/msgparsers/msgparser.iis.class.php b/src/classes/msgparsers/msgparser.iis.class.php index db93956..e01dca8 100644 --- a/src/classes/msgparsers/msgparser.iis.class.php +++ b/src/classes/msgparsers/msgparser.iis.class.php @@ -46,7 +46,12 @@ require_once($gl_root_path . 'include/constants_logstream.php'); // --- class MsgParser_iis extends MsgParser { -// protected $_arrProperties = null; + + // Public Information properties + public $_ClassName = 'Microsoft IIS Weblogs'; + public $_ClassDescription = 'Parses the common weblog format used by the Microsoft IIS webserver.'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = "http://www.monitorware.com/en/Articles/"; // Constructor public function MsgParser_iis() { diff --git a/src/classes/msgparsers/msgparser.wireless.class.php b/src/classes/msgparsers/msgparser.wireless.class.php index 1a3a8b2..188adbd 100644 --- a/src/classes/msgparsers/msgparser.wireless.class.php +++ b/src/classes/msgparsers/msgparser.wireless.class.php @@ -69,7 +69,12 @@ require_once($gl_root_path . 'include/constants_logstream.php'); // --- class MsgParser_wireless extends MsgParser { -// protected $_arrProperties = null; + + // Public Information properties + public $_ClassName = 'Custom Wireless Logfiles'; + public $_ClassDescription = 'Custom logfile parser for wireless access points.'; + public $_ClassRequiredFields = null; + public $_ClassHelpArticle = ""; // Constructor public function MsgParser_wireless() { diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 2a11550..5a5c9c9 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1406,6 +1406,74 @@ function GetConfigSetting($szSettingName, $szDefaultValue = "", $DesiredConfigLe return $szDefaultValue; } +/* +* Helper function to get all directory from a folder +*/ +function list_directories($directory, $failOnError = true) +{ + $result = array(); + if ( !$directoryHandler = @opendir ($directory) ) + { + if ( $failOnError ) + DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!"); + else + return null; + } + + while (false !== ($fileName = @readdir ($directoryHandler))) + { + if ( is_dir( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." )) + @array_push ($result, $fileName); + } + + if ( @count ($result) === 0 ) + { + if ( $failOnError ) + DieWithFriendlyErrorMsg( "list_directories: no directories in \"$directory\" found!"); + else + return null; + } + else + { + sort ($result); + return $result; + } +} + +/* +* Helper function to get all files from a directory +*/ +function list_files($directory, $failOnError = true) +{ + $result = array(); + if ( !$directoryHandler = @opendir ($directory) ) + { + if ( $failOnError ) + DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!"); + else + return null; + } + + while (false !== ($fileName = @readdir ($directoryHandler))) + { + if ( is_file( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." )) + @array_push ($result, $fileName); + } + + if ( @count ($result) === 0 ) + { + if ( $failOnError ) + DieWithFriendlyErrorMsg( "list_directories: no files in \"$directory\" found!"); + else + return null; + } + else + { + sort ($result); + return $result; + } +} + /* * Helper function to get the errorCode */ diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 1a23d18..3758348 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -196,6 +196,83 @@ function InitSource(&$mysource) } } + +/* +* This function reads and generates a list of available message parsers +*/ +function InitMessageParsers() +{ + global $content, $gl_root_path; + + $szDirectory = $gl_root_path . 'classes/msgparsers/'; // msgparser.' . $szParser . '.class.php'; + $aFiles = list_files($szDirectory, true); + if ( isset($aFiles) && count($aFiles) > 0 ) + { + foreach( $aFiles as $myFile ) + { + // Check if file is valid msg parser! + if ( preg_match("/msgparser\.(.*?)\.class\.php$/", $myFile, $out ) ) + { + // Set ParserID! + $myParserID = $out[1]; + + // Check if parser file include exists + $szIncludeFile = $szDirectory . $myFile; + if ( file_exists($szIncludeFile) ) + { + // Try to include + if ( @include_once($szIncludeFile) ) + { + // Set ParserClassName + $szParserClass = "MsgParser_" . $myParserID; +/// echo $szParserClass . "
"; + + // Create Instance and get properties + $tmpParser = new $szParserClass(); // Create an instance + $szParserName = $tmpParser->_ClassName; + $szParserDescription = $tmpParser->_ClassDescription; + $szParserHelpArticle = $tmpParser->_ClassHelpArticle; + + + // check for required fields! + if ( $tmpParser->_ClassRequiredFields != null && count($tmpParser->_ClassRequiredFields) > 0 ) + { + $bCustomFields = true; + $bCustomFieldList = $tmpParser->_ClassRequiredFields; + } + else + { + $bCustomFields = false; + $bCustomFieldList = null; + } + + // Add entry to msg parser list! + $content['PARSERS'][] = array ( + "ID" => $myParserID, + "DisplayName" => $szParserName, + "Description" => $szParserDescription, + "CustomFields" => $bCustomFields, + "CustomFieldsList" => $bCustomFieldList, + "ParserHelpArticle" => $szParserHelpArticle, + ); + } + else + { + // DEBUG ERROR + } + } + else + { + // DEBUG ERROR + } + } + } + } +} + +/* +* Init Source configs +*/ function InitSourceConfigs() { global $CFG, $content, $currentSourceID; diff --git a/src/include/functions_themes.php b/src/include/functions_themes.php index c87a107..998be99 100644 --- a/src/include/functions_themes.php +++ b/src/include/functions_themes.php @@ -93,27 +93,6 @@ function CreateThemesList() } } -function list_directories($directory) -{ - $result = array(); - if (! $directoryHandler = @opendir ($directory)) - DieWithFriendlyErrorMsg( "list_directories: directory \"$directory\" doesn't exist!"); - - while (false !== ($fileName = @readdir ($directoryHandler))) - { - if ( is_dir( $directory . $fileName ) && ( $fileName != "." && $fileName != ".." )) - @array_push ($result, $fileName); - } - - if ( @count ($result) === 0 ) - DieWithFriendlyErrorMsg( "list_directories: no directories in \"$directory\" found!"); - else - { - sort ($result); - return $result; - } -} - function VerifyTheme( $newtheme ) { global $gl_root_path; diff --git a/src/lang/de/admin.php b/src/lang/de/admin.php index e25f76d..de4dbe1 100644 --- a/src/lang/de/admin.php +++ b/src/lang/de/admin.php @@ -29,14 +29,15 @@ global $content; // Global Stuff $content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events"; -$content['LN_ADMINMENU_GENOPT'] = "General Options"; +$content['LN_ADMINMENU_GENOPT'] = "Preferences"; $content['LN_ADMINMENU_SOURCEOPT'] = "Sources"; $content['LN_ADMINMENU_VIEWSOPT'] = "Views"; $content['LN_ADMINMENU_SEARCHOPT'] = "Searches"; -$content['LN_ADMINMENU_USEROPT'] = "User Options"; -$content['LN_ADMINMENU_GROUPOPT'] = "Group Options"; +$content['LN_ADMINMENU_USEROPT'] = "Users"; +$content['LN_ADMINMENU_GROUPOPT'] = "Groups"; $content['LN_ADMINMENU_CHARTOPT'] = "Charts"; $content['LN_ADMINMENU_FIELDOPT'] = "Fields"; +$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers"; $content['LN_ADMIN_CENTER'] = "Admin center"; $content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State"; $content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level."; diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index 7828ac0..df19bd2 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -29,14 +29,15 @@ global $content; // Global Stuff $content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events"; -$content['LN_ADMINMENU_GENOPT'] = "General Options"; +$content['LN_ADMINMENU_GENOPT'] = "Preferences"; $content['LN_ADMINMENU_SOURCEOPT'] = "Sources"; $content['LN_ADMINMENU_VIEWSOPT'] = "Views"; $content['LN_ADMINMENU_SEARCHOPT'] = "Searches"; -$content['LN_ADMINMENU_USEROPT'] = "User Options"; -$content['LN_ADMINMENU_GROUPOPT'] = "Group Options"; +$content['LN_ADMINMENU_USEROPT'] = "Users"; +$content['LN_ADMINMENU_GROUPOPT'] = "Groups"; $content['LN_ADMINMENU_CHARTOPT'] = "Charts"; $content['LN_ADMINMENU_FIELDOPT'] = "Fields"; +$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers"; $content['LN_ADMIN_CENTER'] = "Admin center"; $content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State"; $content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level."; @@ -295,4 +296,31 @@ $content['LN_FILTER_TYPE_STRING'] = "String"; $content['LN_FILTER_TYPE_NUMBER'] = "Number"; $content['LN_FILTER_TYPE_DATE'] = "Date"; +// Parser Options +$content['LN_PARSERS_EDIT'] = "Edit Message Parser"; +$content['LN_PARSERS_DELETE'] = "Delete Message Parser"; +$content['LN_PARSERS_ID'] = "Parser ID"; +$content['LN_PARSERS_NAME'] = "Parser Name"; +$content['LN_PARSERS_DESCRIPTION'] = "Short Description"; +$content['LN_PARSERS_ERROR_NOPARSERS'] = "There were no valid message parsers found in your installation. "; +$content['LN_PARSERS_HELP'] = "Help"; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; +$content['LN_PARSERS_'] = ""; + + ?> \ No newline at end of file diff --git a/src/lang/pt_BR/admin.php b/src/lang/pt_BR/admin.php index e25f76d..de4dbe1 100644 --- a/src/lang/pt_BR/admin.php +++ b/src/lang/pt_BR/admin.php @@ -29,14 +29,15 @@ global $content; // Global Stuff $content['LN_ADMINMENU_HOMEPAGE'] = "Back to Show Events"; -$content['LN_ADMINMENU_GENOPT'] = "General Options"; +$content['LN_ADMINMENU_GENOPT'] = "Preferences"; $content['LN_ADMINMENU_SOURCEOPT'] = "Sources"; $content['LN_ADMINMENU_VIEWSOPT'] = "Views"; $content['LN_ADMINMENU_SEARCHOPT'] = "Searches"; -$content['LN_ADMINMENU_USEROPT'] = "User Options"; -$content['LN_ADMINMENU_GROUPOPT'] = "Group Options"; +$content['LN_ADMINMENU_USEROPT'] = "Users"; +$content['LN_ADMINMENU_GROUPOPT'] = "Groups"; $content['LN_ADMINMENU_CHARTOPT'] = "Charts"; $content['LN_ADMINMENU_FIELDOPT'] = "Fields"; +$content['LN_ADMINMENU_MSGPARSERSOPT'] = "Message Parsers"; $content['LN_ADMIN_CENTER'] = "Admin center"; $content['LN_ADMIN_UNKNOWNSTATE'] = "Unknown State"; $content['LN_ADMIN_ERROR_NOTALLOWED'] = "You are not allowed to access this page with your user level."; diff --git a/src/templates/admin/admin_menu.html b/src/templates/admin/admin_menu.html index fb33459..bb69b32 100644 --- a/src/templates/admin/admin_menu.html +++ b/src/templates/admin/admin_menu.html @@ -3,16 +3,17 @@ - {LN_ADMINMENU_GENOPT} + {LN_ADMINMENU_GENOPT} {LN_ADMINMENU_SOURCEOPT} {LN_ADMINMENU_FIELDOPT} {LN_ADMINMENU_VIEWSOPT} {LN_ADMINMENU_SEARCHOPT} {LN_ADMINMENU_CHARTOPT} + {LN_ADMINMENU_MSGPARSERSOPT} - {LN_ADMINMENU_USEROPT} - {LN_ADMINMENU_GROUPOPT} + {LN_ADMINMENU_USEROPT} + {LN_ADMINMENU_GROUPOPT} diff --git a/src/templates/admin/admin_parsers.html b/src/templates/admin/admin_parsers.html new file mode 100644 index 0000000..bf1ad51 --- /dev/null +++ b/src/templates/admin/admin_parsers.html @@ -0,0 +1,99 @@ + + + +

+
+
+
{LN_GEN_ERRORDETAILS}
+

{ERROR_MSG}

+
+

+ {LN_GEN_ERRORRETURNPREV} +
+

+ + + + + + + + + +
{LN_SEARCH_CENTER}
+

+ + + + + + + + + + + + + + + + + + + +
{LN_PARSERS_ID}{LN_PARSERS_NAME}{LN_PARSERS_DESCRIPTION}{LN_PARSERS_HELP}{LN_GEN_ACTIONS}
{ID}{DisplayName}{Description} + + + + +   +   +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{LN_SEARCH_ADDEDIT}
{LN_SEARCH_NAME}
{LN_GEN_USERONLY}
{LN_GEN_USERONLY}
{LN_GEN_GROUPONLY} + +
+ + + +
+
+ + +

+ +
+ + \ No newline at end of file