From f2bd44ed112c3190fcac63ce116f8bd667dbb594 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Mon, 28 Apr 2008 17:41:25 +0200 Subject: [PATCH] Added inline search buttons into the main view. Going to discuss these new buttons tomorrow with rainer. I kind of like them, but I also have additional ideas. --- src/include/functions_common.php | 2 ++ src/index.php | 44 ++++++++++++++++++++++++++++++-- src/lang/de/main.php | 3 +++ src/lang/en/main.php | 4 +++ src/templates/index.html | 15 +++++++++-- 5 files changed, 64 insertions(+), 4 deletions(-) diff --git a/src/include/functions_common.php b/src/include/functions_common.php index d464fa8..ce68455 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -342,6 +342,8 @@ function InitFrontEndVariables() $content['MENU_FOLDER_CLOSED'] = $content['BASEPATH'] . "images/icons/folder.png"; $content['MENU_HOMEPAGE'] = $content['BASEPATH'] . "images/icons/home.png"; $content['MENU_LINK'] = $content['BASEPATH'] . "images/icons/link.png"; + $content['MENU_LINK_VIEW'] = $content['BASEPATH'] . "images/icons/link_view.png"; + $content['MENU_VIEW'] = $content['BASEPATH'] . "images/icons/view.png"; $content['MENU_PREFERENCES'] = $content['BASEPATH'] . "images/icons/preferences.png"; $content['MENU_ADMINENTRY'] = $content['BASEPATH'] . "images/icons/star_blue.png"; $content['MENU_ADMINLOGOFF'] = $content['BASEPATH'] . "images/icons/exit.png"; diff --git a/src/index.php b/src/index.php index 29cb6db..404dfa0 100644 --- a/src/index.php +++ b/src/index.php @@ -189,6 +189,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c $content['fields'][$mycolkey]['FieldType'] = $fields[$mycolkey]['FieldType']; $content['fields'][$mycolkey]['FieldSortable'] = $stream->IsPropertySortable($mycolkey); // $fields[$mycolkey]['Sortable']; $content['fields'][$mycolkey]['DefaultWidth'] = $fields[$mycolkey]['DefaultWidth']; + + if ( $mycolkey == SYSLOG_MESSAGE ) + $content['fields'][$mycolkey]['colspan'] = ' colspan="2" '; + else + $content['fields'][$mycolkey]['colspan'] = ''; } // --- @@ -391,10 +396,45 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c if ( strlen($content['searchstr']) > 0 ) { - // Prepend button - $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = "" . $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue']; + // Enable buttons + $content['syslogmessages'][$counter]['buttons_enabled'] = true; + + // Prepend Msg centered button + $content['syslogmessages'][$counter]['buttons'][]['htmlcode'] = ''; } } + else if ( $mycolkey == SYSLOG_SYSLOGTAG ) + { + // Append Syslogtag Search Button + $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = '' . '' . $logArray[$mycolkey]; + } + else if ( $mycolkey == SYSLOG_HOST ) + { + // Append Syslogtag Search Button + $content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = '' . '' . $logArray[$mycolkey]; +/* TODO ... +$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = ' + +' . $logArray[$mycolkey]; +*/ + } + } } } diff --git a/src/lang/de/main.php b/src/lang/de/main.php index ce728b7..cd4211a 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -56,6 +56,9 @@ $content['LN_SEARCH_ADVANCED'] = "Erweiterte Suche"; $content['LN_SEARCH'] = "Suche"; $content['LN_SEARCH_RESET'] = "Suche zurücksetzen"; $content['LN_SEARCH_PERFORMADVANCED'] = "Erweiterte Suche starten"; +$content['LN_VIEW_MESSAGECENTERED'] = "View syslog message centered in logstream"; +$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; +$content['LN_VIEW_FILTERFOR'] = "Filter message for "; $content['LN_HIGHLIGHT'] = "Hightlight >>"; $content['LN_HIGHLIGHT_OFF'] = "Hightlight <<"; diff --git a/src/lang/en/main.php b/src/lang/en/main.php index f95217b..03057e7 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -59,6 +59,10 @@ $content['LN_SEARCH_ADVANCED'] = "Advanced Search"; $content['LN_SEARCH'] = "Search"; $content['LN_SEARCH_RESET'] = "Reset search"; $content['LN_SEARCH_PERFORMADVANCED'] = "Perform Advanced Search"; +$content['LN_VIEW_MESSAGECENTERED'] = "View syslog message centered in logstream"; +$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; +$content['LN_VIEW_FILTERFOR'] = "Filter message for "; + $content['LN_HIGHLIGHT'] = "Hightlight >>"; $content['LN_HIGHLIGHT_OFF'] = "Hightlight <<"; diff --git a/src/templates/index.html b/src/templates/index.html index d1e8c77..91b9ecb 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -177,7 +177,7 @@ - + @@ -196,8 +196,8 @@ - + @@ -209,6 +209,7 @@ + {fieldvalue} @@ -225,6 +226,16 @@ + + + + + +
+ + {htmlcode} + +