diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 95ba5a1..7d863e3 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -434,6 +434,8 @@ function InitFrontEndVariables() $content['MENU_BULLET_RED'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_red.png"; $content['MENU_BULLET_YELLOW'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_yellow.png"; $content['MENU_BULLET_GREY'] = $content['BASEPATH'] . "images/icons/bullet_ball_glass_grey.png"; + + $content['MENU_ICON_GOOGLE'] = $content['BASEPATH'] . "images/icons/googleicon.png"; } // Lang Helper for Strings with ONE variable diff --git a/src/index.php b/src/index.php index 7d4520c..6b6ef3d 100644 --- a/src/index.php +++ b/src/index.php @@ -350,6 +350,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_FACILITY'] . " '" . GetFacilityDisplayName($logArray[$mycolkey]) . "'", 'IconSource' => $content['MENU_NETWORK'] ); + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_FACILITY']) . '+' . GetFacilityDisplayName($logArray[$mycolkey]), + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_FACILITY'] . " '" . GetFacilityDisplayName($logArray[$mycolkey]) . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } else if ( $mycolkey == SYSLOG_SEVERITY ) { @@ -379,7 +384,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_SEVERITY'] . " '" . GetSeverityDisplayName($logArray[$mycolkey]) . "'", 'IconSource' => $content['MENU_NETWORK'] ); - + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_SEVERITY']) . '+' . GetSeverityDisplayName($logArray[$mycolkey]), + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_SEVERITY'] . " '" . GetSeverityDisplayName($logArray[$mycolkey]) . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } else if ( $mycolkey == SYSLOG_MESSAGETYPE ) { @@ -420,6 +429,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_EVENTID'] . " '" . $logArray[$mycolkey] . "'", 'IconSource' => $content['MENU_NETWORK'] ); + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_EVENTID']) . '+' . $logArray[$mycolkey], + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_EVENTID'] . " '" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } } else if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_STRING ) @@ -510,6 +524,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_SYSLOGTAG'] . " '" . $logArray[$mycolkey] . "'", 'IconSource' => $content['MENU_NETWORK'] ); + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_SYSLOGTAG']) . '+' . $logArray[$mycolkey], + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_SYSLOGTAG'] . " '" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } else if ( $mycolkey == SYSLOG_HOST ) { @@ -536,6 +555,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_EVENTLOGTYPE'] . " '" . $logArray[$mycolkey] . "'", 'IconSource' => $content['MENU_NETWORK'] ); + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_EVENTLOGTYPE']) . '+' . $logArray[$mycolkey], + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_EVENTLOGTYPE'] . " '" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } else if ( $mycolkey == SYSLOG_EVENT_SOURCE ) { @@ -551,6 +575,11 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c 'DisplayName' => $content['LN_VIEW_SEARCHFOR'] . " " . $content['LN_FIELDS_EVENTSOURCE'] . " '" . $logArray[$mycolkey] . "'", 'IconSource' => $content['MENU_NETWORK'] ); + $content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array( + 'ButtonUrl' => 'http://kb.monitorware.com/googlesearch.php?sa=Search&q=' . PrepareStringForSearch($content['LN_FIELDS_EVENTSOURCE']) . '+' . $logArray[$mycolkey], + 'DisplayName' => $content['LN_VIEW_SEARCHFORGOOGLE'] . " " . $content['LN_FIELDS_EVENTSOURCE'] . " '" . $logArray[$mycolkey] . "'", + 'IconSource' => $content['MENU_ICON_GOOGLE'] + ); } } } diff --git a/src/lang/de/main.php b/src/lang/de/main.php index 7c57676..6ac4cbc 100644 --- a/src/lang/de/main.php +++ b/src/lang/de/main.php @@ -63,6 +63,7 @@ $content['LN_SEARCH_PERFORMADVANCED'] = "Erweiterte Suche starten"; $content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; $content['LN_VIEW_FILTERFOR'] = "Filter message for "; $content['LN_VIEW_SEARCHFOR'] = "Search online for "; + $content['LN_VIEW_SEARCHFORGOOGLE'] = "Search Google 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 7f03319..52ba085 100644 --- a/src/lang/en/main.php +++ b/src/lang/en/main.php @@ -64,6 +64,7 @@ $content['LN_VIEW_MESSAGECENTERED'] = "Back to unfiltered view with this message $content['LN_VIEW_RELATEDMSG'] = "View related syslog messages"; $content['LN_VIEW_FILTERFOR'] = "Filter message for "; $content['LN_VIEW_SEARCHFOR'] = "Search online for "; + $content['LN_VIEW_SEARCHFORGOOGLE'] = "Search Google for "; $content['LN_HIGHLIGHT'] = "Hightlight >>"; $content['LN_HIGHLIGHT_OFF'] = "Hightlight <<";