Implemented custom google search button into sub-menus

This commit is contained in:
Andre Lorbach 2008-05-20 15:04:55 +02:00
parent 3624d3e651
commit 7d4010b45d
4 changed files with 34 additions and 1 deletions

View File

@ -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

View File

@ -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']
);
}
}
}

View File

@ -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 <<";

View File

@ -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 <<";