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.
This commit is contained in:
Andre Lorbach 2008-04-28 17:41:25 +02:00
parent 270f6da023
commit f2bd44ed11
5 changed files with 64 additions and 4 deletions

View File

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

View File

@ -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'] = '<a href="?uid=' . $uID . '" target="_top"><img src="' . $content['MENU_LINK_VIEW'] .
'" width="16" align="left" title="' . $content['LN_VIEW_MESSAGECENTERED'] . '"></a>';
}
}
else if ( $mycolkey == SYSLOG_SYSLOGTAG )
{
// Append Syslogtag Search Button
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = '<a href="?filter=syslogtag%3A' . $logArray[$mycolkey] .
'&search=Search" target="_top"><img src="' . $content['MENU_VIEW'] .
'" width="16" align="right" title="' . $content['LN_VIEW_FILTERFOR'] . $logArray[$mycolkey] . '">' . '</a>' . $logArray[$mycolkey];
}
else if ( $mycolkey == SYSLOG_HOST )
{
// Append Syslogtag Search Button
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = '<a href="?filter=source%3A' . $logArray[$mycolkey] .
'&search=Search" target="_top"><img src="' . $content['MENU_VIEW'] .
'" width="16" align="right" title="' . $content['LN_VIEW_FILTERFOR'] . $logArray[$mycolkey] . '">' . '</a>' . $logArray[$mycolkey];
/* TODO ...
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = '
<div id="menu">
<ul>
<li><img src="{MENU_NAV_CLOSE}" width="16" height="16" title="{LN_GEN_PREDEFINEDSEARCHES}" class="SelectSavedFilter">
<ul class="with_border">
<li><h2 class="cellmenu1">{LN_GEN_PREDEFINEDSEARCHES}</h2>
<!-- BEGIN Search -->
<li class="{cssclass}"><a href="?{SearchQuery}" target="_top">{DisplayName}</a></li>
<!-- END Search -->
</ul>
</li>
</ul>
</div>
' . $logArray[$mycolkey];
*/
}
}
}
}

View File

@ -56,6 +56,9 @@ $content['LN_SEARCH_ADVANCED'] = "Erweiterte Suche";
$content['LN_SEARCH'] = "Suche";
$content['LN_SEARCH_RESET'] = "Suche zur&uuml;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 <<";

View File

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

View File

@ -177,7 +177,7 @@
<!-- ENDIF MiscShowDebugGridCounter="1" -->
<!-- BEGIN fields -->
<td width="{DefaultWidth}" class="cellmenu1" align="center" nowrap>
<td width="{DefaultWidth}" class="cellmenu1" align="center" nowrap {colspan}>
<!-- IF FieldSortable="true" -->
<a HREF="?sorting={FieldID}{additional_url_uidonly}{additional_url}" class="cellmenu1_link" >
<!-- ENDIF FieldSortable="true" -->
@ -196,8 +196,8 @@
<!-- ENDIF MiscShowDebugGridCounter="1" -->
<!-- BEGIN values -->
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="top">
<!-- IF hasdetails="false" -->
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="middle" nowrap>
<!-- IF haslink="true" -->
<a href="{detaillink}" class="syslogdetails" target="_top">
<!-- ENDIF haslink="true" -->
@ -209,6 +209,7 @@
<!-- ENDIF haslink="true" -->
<!-- ENDIF hasdetails="false" -->
<!-- IF hasdetails="true" -->
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="middle" width="100%">
<a href="{detaillink}" class="syslogdetails">{fieldvalue}
<span>
<table cellpadding="0" cellspacing="1" border="0" width="500" align="left" class="with_border_alternate">
@ -225,6 +226,16 @@
<!-- ENDIF hasdetails="true" -->
</td>
<!-- END values -->
<!-- IF buttons_enabled="true" -->
<td align="center" class="{cssclass}" valign="middle">
<!-- BEGIN buttons -->
{htmlcode}
<!-- END buttons -->
</td>
<!-- ENDIF buttons_enabled="true" -->
</tr>
<!-- END syslogmessages -->