diff --git a/src/admin/parsers.php b/src/admin/parsers.php index 17d4bb9..610b276 100644 --- a/src/admin/parsers.php +++ b/src/admin/parsers.php @@ -288,6 +288,16 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) ) $myParsers['ParserHelpEnabled'] = true; else $myParsers['ParserHelpEnabled'] = false; + + // Find out if we need to INIT something! + if ( isset($myParsers['CustomFieldsList']) && count($myParsers['CustomFieldsList']) > 0 ) + { + // $myParsers['CustomFieldsList']; + + $myParsers['ParserInitEnabled'] = true; + + } + // --- Set CSS Class if ( $i % 2 == 0 ) diff --git a/src/classes/msgparsers/msgparser.wireless.class.php b/src/classes/msgparsers/msgparser.wireless.class.php index 188adbd..6099847 100644 --- a/src/classes/msgparsers/msgparser.wireless.class.php +++ b/src/classes/msgparsers/msgparser.wireless.class.php @@ -73,8 +73,23 @@ class MsgParser_wireless extends MsgParser { // Public Information properties public $_ClassName = 'Custom Wireless Logfiles'; public $_ClassDescription = 'Custom logfile parser for wireless access points.'; - public $_ClassRequiredFields = null; public $_ClassHelpArticle = ""; + public $_ClassRequiredFields = array ( + "net_bytesrecieved" => array ( "FieldID" => "net_bytesrecieved", "FieldDefine" => "SYSLOG_NET_BYTESRECIEVED", "FieldCaption" => "Bytes recieved", "FieldType" => 1, "FieldAlign" => "left", "SearchField" => "net_bytesrecieved", "DefaultWidth" => 50, "SearchOnline" => false, "Trunscate" => false, "Sortable" => false), + "net_bytessend" => array (", ", "FieldID" => "net_bytessend", "FieldDefine" => "SYSLOG_NET_BYTESSEND", "FieldCaption" => "Bytes send", "FieldType" => 1, "FieldAlign" => "left", "SearchField" => "net_bytessend", "DefaultWidth" => 50, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0 ), + "net_interface" => array (", ", "FieldID" => "net_interface", "FieldDefine" => "SYSLOG_NET_INTERFACE", "FieldCaption" => "Interface", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_interface", "DefaultWidth" => 100, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_lastactivity" => array (", ", "FieldID" => "net_lastactivity", "FieldDefine" => "SYSLOG_NET_LASTACTIVITY", "FieldCaption" => "Last Activity", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_lastactivity", "DefaultWidth" => 80, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_lastip" => array (", ", "FieldID" => "net_lastip", "FieldDefine" => "SYSLOG_NET_LASTIP", "FieldCaption" => "Last IP Address", "FieldType" => 0, "FieldAlign" => "left", "SearchField" => "net_lastip", "DefaultWidth" => 100, "SearchOnline" => 1, "Trunscate" => 0, "Sortable" => 0), + "net_mac_address" => array (", ", "FieldID" => "net_mac_address", "FieldDefine" => "SYSLOG_NET_MAC_ADDRESS", "FieldCaption" => "Mac Address", "FieldType" => 0, "FieldAlign" => "left", "SearchField" => "net_mac_address", "DefaultWidth" => 125, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_packetsrecieved" => array (", ", "FieldID" => "net_packetsrecieved", "FieldDefine" => "SYSLOG_NET_PACKETSRECIEVED", "FieldCaption" => "Packets recieved", "FieldType" => 1, "FieldAlign" => "left", "SearchField" => "net_packetsrecieved", "DefaultWidth" => 50, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_packetssend" => array (", ", "FieldID" => "net_packetssend", "FieldDefine" => "SYSLOG_NET_PACKETSSEND", "FieldCaption" => "Packets send", "FieldType" => 1, "FieldAlign" => "left", "SearchField" => "net_packetssend", "DefaultWidth" => 50, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_rxrate" => array (", ", "FieldID" => "net_rxrate", "FieldDefine" => "SYSLOG_NET_RXRATE", "FieldCaption" => "RX Rate", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_rxrate", "DefaultWidth" => 65, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_signalstrength" => array (", ", "FieldID" => "net_signalstrength", "FieldDefine" => "SYSLOG_NET_SIGNALSTRENGTH", "FieldCaption" => "Signal strength", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_signalstrength", "DefaultWidth" => 100, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_signaltonoise" => array (", ", "FieldID" => "net_signaltonoise", "FieldDefine" => "SYSLOG_NET_SIGNALTONOISE", "FieldCaption" => "Signal to noise", "FieldType" => 1, "FieldAlign" => "center", "SearchField" => "net_signaltonoise", "DefaultWidth" => 50, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_uptime" => array (", ", "FieldID" => "net_uptime", "FieldDefine" => "SYSLOG_NET_UPTIME", "FieldCaption" => "System Uptime", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_uptime", "DefaultWidth" => 85, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_txccq" => array (", ", "FieldID" => "net_txccq", "FieldDefine" => "SYSLOG_NET_TXCCQ", "FieldCaption" => "TX CCQ", "FieldType" => 1, "FieldAlign" => "center", "SearchField" => "net_txccq", "DefaultWidth" => 50, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0), + "net_txrate" => array (", ", "FieldID" => "net_txrate", "FieldDefine" => "SYSLOG_NET_TXRATE", "FieldCaption" => "TX Rate", "FieldType" => 0, "FieldAlign" => "center", "SearchField" => "net_txrate", "DefaultWidth" => 65, "SearchOnline" => 0, "Trunscate" => 0, "Sortable" => 0) + ); // Constructor public function MsgParser_wireless() { diff --git a/src/images/icons/gear_delete.png b/src/images/icons/gear_delete.png new file mode 100644 index 0000000..2a0f87e Binary files /dev/null and b/src/images/icons/gear_delete.png differ diff --git a/src/images/icons/gear_new.png b/src/images/icons/gear_new.png new file mode 100644 index 0000000..8935ae6 Binary files /dev/null and b/src/images/icons/gear_new.png differ diff --git a/src/images/icons/information2.png b/src/images/icons/information2.png new file mode 100644 index 0000000..2a26f1e Binary files /dev/null and b/src/images/icons/information2.png differ diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 5a5c9c9..9481060 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -621,6 +621,9 @@ function InitFrontEndVariables() $content['MENU_FIELDS'] = $content['BASEPATH'] . "images/icons/tables.png"; $content['MENU_DELETE_FROMDB'] = $content['BASEPATH'] . "images/icons/data_delete.png"; $content['MENU_DELETE_FROMDB_DISABLED'] = $content['BASEPATH'] . "images/icons/data_delete_disabled.png"; + $content['MENU_INFORMATION'] = $content['BASEPATH'] . "images/icons/information2.png"; + $content['MENU_PARSER_DELETE'] = $content['BASEPATH'] . "images/icons/gear_delete.png"; + $content['MENU_PARSER_INIT'] = $content['BASEPATH'] . "images/icons/gear_new.png"; $content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png"; $content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png"; diff --git a/src/include/functions_config.php b/src/include/functions_config.php index 3758348..e57f543 100644 --- a/src/include/functions_config.php +++ b/src/include/functions_config.php @@ -238,12 +238,13 @@ function InitMessageParsers() if ( $tmpParser->_ClassRequiredFields != null && count($tmpParser->_ClassRequiredFields) > 0 ) { $bCustomFields = true; - $bCustomFieldList = $tmpParser->_ClassRequiredFields; + $aCustomFieldList = $tmpParser->_ClassRequiredFields; +// print_r ( $aCustomFieldList ); } else { $bCustomFields = false; - $bCustomFieldList = null; + $aCustomFieldList = null; } // Add entry to msg parser list! @@ -252,7 +253,7 @@ function InitMessageParsers() "DisplayName" => $szParserName, "Description" => $szParserDescription, "CustomFields" => $bCustomFields, - "CustomFieldsList" => $bCustomFieldList, + "CustomFieldsList" => $aCustomFieldList, "ParserHelpArticle" => $szParserHelpArticle, ); } diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index df19bd2..bad0540 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -304,9 +304,9 @@ $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_INFO'] = "Show more Information for this message parser."; +$content['LN_PARSERS_INIT'] = "Initialize settings for this message parser."; +$content['LN_PARSERS_REMOVE'] = "Remove settings for this message parser."; $content['LN_PARSERS_'] = ""; $content['LN_PARSERS_'] = ""; $content['LN_PARSERS_'] = ""; diff --git a/src/templates/admin/admin_parsers.html b/src/templates/admin/admin_parsers.html index bf1ad51..dcfce79 100644 --- a/src/templates/admin/admin_parsers.html +++ b/src/templates/admin/admin_parsers.html @@ -27,29 +27,35 @@