diff --git a/images/icons/navigate_down.png b/images/icons/navigate_down.png
new file mode 100644
index 0000000..3643095
Binary files /dev/null and b/images/icons/navigate_down.png differ
diff --git a/images/icons/navigate_down2.png b/images/icons/navigate_down2.png
new file mode 100644
index 0000000..e693efc
Binary files /dev/null and b/images/icons/navigate_down2.png differ
diff --git a/images/icons/navigate_minus.png b/images/icons/navigate_minus.png
new file mode 100644
index 0000000..6e0ed02
Binary files /dev/null and b/images/icons/navigate_minus.png differ
diff --git a/images/icons/navigate_plus.png b/images/icons/navigate_plus.png
new file mode 100644
index 0000000..a751af1
Binary files /dev/null and b/images/icons/navigate_plus.png differ
diff --git a/include/constants_general.php b/include/constants_general.php
index bebe4ec..6f457cb 100644
--- a/include/constants_general.php
+++ b/include/constants_general.php
@@ -46,8 +46,36 @@ define('SOURCE_MYSQLDB', '2');
// ---
define('UID_UNKNOWN', -1);
-
-
-
// ---
+
+// --- Syslog specific defines!
+define('SYSLOG_KERN', 0);
+define('SYSLOG_USER', 1);
+define('SYSLOG_MAIL', 2);
+define('SYSLOG_DAEMON', 3);
+define('SYSLOG_AUTH', 4);
+define('SYSLOG_SYSLOG', 5);
+define('SYSLOG_LPR', 6);
+define('SYSLOG_NEWS', 7);
+define('SYSLOG_UUCP', 8);
+define('SYSLOG_CRON', 9);
+define('SYSLOG_LOCAL0', 16);
+define('SYSLOG_LOCAL1', 17);
+define('SYSLOG_LOCAL2', 18);
+define('SYSLOG_LOCAL3', 19);
+define('SYSLOG_LOCAL4', 20);
+define('SYSLOG_LOCAL5', 21);
+define('SYSLOG_LOCAL6', 22);
+define('SYSLOG_LOCAL7', 23);
+
+define('SYSLOG_EMERG', 0);
+define('SYSLOG_ALERT', 1);
+define('SYSLOG_CRIT', 2);
+define('SYSLOG_ERR', 3);
+define('SYSLOG_WARNING', 4);
+define('SYSLOG_NOTICE', 5);
+define('SYSLOG_INFO', 6);
+define('SYSLOG_DEBUG', 7);
+// ---
+
?>
\ No newline at end of file
diff --git a/include/constants_logstream.php b/include/constants_logstream.php
index caa6125..fed7ab4 100644
--- a/include/constants_logstream.php
+++ b/include/constants_logstream.php
@@ -62,5 +62,4 @@ define('IUT_SMTPLISTENER', '24');
define('IUT_AliveMonECHO', '1999998');
define('IUT_MIAP_Receiver', '1999999');
-// ---
?>
\ No newline at end of file
diff --git a/include/functions_filters.php b/include/functions_filters.php
index f13a92e..412c937 100644
--- a/include/functions_filters.php
+++ b/include/functions_filters.php
@@ -34,15 +34,15 @@ function InitFilterHelpers()
$filters['filter_datemode'] = DATEMODE_ALL;
// Init TimeFilter Helper Array
-// $content['datemodes'][0]['ID'] = DATEMODE_ALL;
-// $content['datemodes'][0]['DisplayName'] = $content['LN_DATEMODE_ALL'];
-// if ( $filters['filter_datemode'] == DATEMODE_ALL ) { $content['datemodes'][0]['selected'] = "selected"; } else { $content['datemodes'][0]['selected'] = ""; }
- $content['datemodes'][0]['ID'] = DATEMODE_RANGE;
- $content['datemodes'][0]['DisplayName'] = $content['LN_DATEMODE_RANGE'];
- if ( $filters['filter_datemode'] == DATEMODE_RANGE ) { $content['datemodes'][0]['selected'] = "selected"; } else { $content['datemodes'][0]['selected'] = ""; }
- $content['datemodes'][1]['ID'] = DATEMODE_LASTX;
- $content['datemodes'][1]['DisplayName'] = $content['LN_DATEMODE_LASTX'];
- if ( $filters['filter_datemode'] == DATEMODE_LASTX ) { $content['datemodes'][1]['selected'] = "selected"; } else { $content['datemodes'][1]['selected'] = ""; }
+ $content['datemodes'][0]['ID'] = DATEMODE_ALL;
+ $content['datemodes'][0]['DisplayName'] = $content['LN_DATEMODE_ALL'];
+ if ( $filters['filter_datemode'] == DATEMODE_ALL ) { $content['datemodes'][0]['selected'] = "selected"; } else { $content['datemodes'][0]['selected'] = ""; }
+ $content['datemodes'][1]['ID'] = DATEMODE_RANGE;
+ $content['datemodes'][1]['DisplayName'] = $content['LN_DATEMODE_RANGE'];
+ if ( $filters['filter_datemode'] == DATEMODE_RANGE ) { $content['datemodes'][1]['selected'] = "selected"; } else { $content['datemodes'][1]['selected'] = ""; }
+ $content['datemodes'][2]['ID'] = DATEMODE_LASTX;
+ $content['datemodes'][2]['DisplayName'] = $content['LN_DATEMODE_LASTX'];
+ if ( $filters['filter_datemode'] == DATEMODE_LASTX ) { $content['datemodes'][2]['selected'] = "selected"; } else { $content['datemodes'][2]['selected'] = ""; }
// Init Date Range Parameters
$currentTime = time();
@@ -128,6 +128,69 @@ function InitFilterHelpers()
$content['filter_daterange_last_x_list'][4]['DisplayName'] = $content['LN_DATE_LASTX_31DAYS'];
if ( $filters['filter_lastx_default'] == DATE_LASTX_31DAYS ) { $content['filter_daterange_last_x_list'][4]['selected'] = "selected"; } else { $content['filter_daterange_last_x_list'][4]['selected'] = ""; }
// ---
+
+ // Init Default Syslog Facility from SESSION!
+ if ( isset($_SESSION['filter_facility']) )
+ $filters['filter_facility'] = intval($_SESSION['filter_facility']);
+ else
+ $filters['filter_facility'] = array ( SYSLOG_KERN, SYSLOG_USER, SYSLOG_MAIL, SYSLOG_DAEMON, SYSLOG_AUTH, SYSLOG_SYSLOG, SYSLOG_LPR, SYSLOG_NEWS, SYSLOG_UUCP, SYSLOG_CRON, SYSLOG_LOCAL0, SYSLOG_LOCAL1, SYSLOG_LOCAL2, SYSLOG_LOCAL3, SYSLOG_LOCAL4, SYSLOG_LOCAL5, SYSLOG_LOCAL6, SYSLOG_LOCAL7 );
+// $filters['filter_facility'] = SYSLOG_LOCAL0;
+
+
+
+ // Init Facility LIST
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_KERN, "DisplayName" => "SYSLOG_KERN", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_USER, "DisplayName" => "SYSLOG_USER", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_MAIL, "DisplayName" => "SYSLOG_MAIL", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_DAEMON, "DisplayName" => "SYSLOG_DAEMON", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_AUTH, "DisplayName" => "SYSLOG_AUTH", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_SYSLOG, "DisplayName" => "SYSLOG_SYSLOG", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LPR, "DisplayName" => "SYSLOG_LPR", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_NEWS, "DisplayName" => "SYSLOG_NEWS", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_UUCP, "DisplayName" => "SYSLOG_UUCP", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_CRON, "DisplayName" => "SYSLOG_CRON", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL0, "DisplayName" => "SYSLOG_LOCAL0", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL1, "DisplayName" => "SYSLOG_LOCAL1", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL2, "DisplayName" => "SYSLOG_LOCAL2", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL3, "DisplayName" => "SYSLOG_LOCAL3", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL4, "DisplayName" => "SYSLOG_LOCAL4", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL5, "DisplayName" => "SYSLOG_LOCAL5", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL6, "DisplayName" => "SYSLOG_LOCAL6", "selected" => "" );
+ $content['filter_facility_list'][] = array( "ID" => SYSLOG_LOCAL7, "DisplayName" => "SYSLOG_LOCAL7", "selected" => "" );
+
+
+ $iCount = count($content['filter_facility_list']);
+ for ( $i = 0; $i < $iCount; $i++ )
+ {
+// echo $content['filter_facility_list'][$i]["ID"] . "-" . $filters['filter_facility'] . "
";
+ if ( in_array($content['filter_facility_list'][$i]["ID"], $filters['filter_facility']) )
+ $content['filter_facility_list'][$i]["selected"] = "selected";
+ }
+
+ // Init Default Syslog Severity from SESSION!
+ if ( isset($_SESSION['filter_severity']) )
+ $filters['filter_severity'] = intval($_SESSION['filter_severity']);
+ else
+ $filters['filter_severity'] = array ( SYSLOG_EMERG, SYSLOG_ALERT, SYSLOG_CRIT, SYSLOG_ERR, SYSLOG_WARNING, SYSLOG_NOTICE, SYSLOG_INFO, SYSLOG_DEBUG );
+// $filters['filter_severity'] = SYSLOG_NOTICE;
+
+ // Init Severity LIST
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_EMERG, "DisplayName" => "SYSLOG_EMERG", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_ALERT, "DisplayName" => "SYSLOG_ALERT", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_CRIT, "DisplayName" => "SYSLOG_CRIT", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_ERR, "DisplayName" => "SYSLOG_ERR", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_WARNING, "DisplayName" => "SYSLOG_WARNING", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_NOTICE, "DisplayName" => "SYSLOG_NOTICE", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_INFO, "DisplayName" => "SYSLOG_INFO", "selected" => "" );
+ $content['filter_severity_list'][] = array( "ID" => SYSLOG_DEBUG, "DisplayName" => "SYSLOG_DEBUG", "selected" => "" );
+
+ $iCount = count($content['filter_severity_list']);
+ for ( $i = 0; $i < $iCount; $i++ )
+ {
+ if ( in_array( $content['filter_severity_list'][$i]["ID"], $filters['filter_severity']) )
+ $content['filter_severity_list'][$i]["selected"] = "selected";
+ }
+
}
function FillDateRangeArray($sourcearray, $szArrayListName, $szFilterName) // $content['years'], "filter_daterange_from_year_list", "filter_daterange_from_year")
diff --git a/index.php b/index.php
index d9d6a9b..09f6772 100644
--- a/index.php
+++ b/index.php
@@ -64,7 +64,6 @@ if ( isset($content['Sources'][$currentSourceID]) && $content['Sources'][$curren
require_once($gl_root_path . 'include/constants_errors.php');
require_once($gl_root_path . 'include/constants_logstream.php');
-
// Obtain Config Object
$stream_config = $content['Sources'][$currentSourceID]['ObjRef'];
@@ -102,8 +101,6 @@ if ( isset($content['Sources'][$currentSourceID]) && $content['Sources'][$curren
$content['main_pagerenabled'] = "true";
}
-
-
// Close file!
$stream->Close();
}
diff --git a/js/common.js b/js/common.js
index df5b1f5..2e85864 100644
--- a/js/common.js
+++ b/js/common.js
@@ -99,7 +99,12 @@ function hidevisibility(ElementNameToggle, ElementNameButton)
function toggleDatefiltervisibility(FormName)
{
var myform = document.getElementById(FormName);
- if (myform.elements['filter_datemode'].value == DATEMODE_RANGE)
+ if (myform.elements['filter_datemode'].value == DATEMODE_ALL)
+ {
+ hidevisibility('HiddenDateFromOptions');
+ hidevisibility('HiddenDateLastXOptions');
+ }
+ else if (myform.elements['filter_datemode'].value == DATEMODE_RANGE)
{
togglevisibility('HiddenDateFromOptions');
hidevisibility('HiddenDateLastXOptions');
diff --git a/lang/en/main.php b/lang/en/main.php
index 2405117..ca8044c 100644
--- a/lang/en/main.php
+++ b/lang/en/main.php
@@ -24,6 +24,12 @@ $content['LN_GRID_INFOUNIT'] = "InfoUnit";
$content['LN_GRID_HOST'] = "Source";
$content['LN_GRID_MSG'] = "Message";
+$content['LN_SEARCH_FILTER'] = "Search (filter):";
+$content['LN_SEARCH_ADVANCED'] = "Advanced Search";
+$content['LN_SEARCH_FEELSAD'] = "I'm feeling sad ...";
+$content['LN_SEARCH'] = "Search";
+$content['LN_SEARCH_RESET'] = "Reset search";
+
// Filter Options
$content['LN_FILTER_DATE'] = "Datetime Range";
$content['LN_FILTER_DATEMODE'] = "Select mode";
@@ -39,5 +45,11 @@ $content['LN_DATE_LASTX_12HOURS'] = "Last 12 hours";
$content['LN_DATE_LASTX_24HOURS'] = "Last 24 hours";
$content['LN_DATE_LASTX_7DAYS'] = "Last 7 days";
$content['LN_DATE_LASTX_31DAYS'] = "Last 31 days";
+$content['LN_FILTER_FACILITY'] = "Syslog Facility";
+$content['LN_FILTER_SEVERITY'] = "Syslog Severity";
+$content['LN_FILTER_OTHERS'] = "Other Filters";
+$content['LN_FILTER_MESSAGE'] = "Syslog Message";
+$content['LN_FILTER_SYSLOGTAG'] = "Syslogtag";
+$content['LN_FILTER_SOURCE'] = "Source (Hostname)";
?>
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
index d867868..d21cbfd 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -4,17 +4,19 @@