mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Finalized new inline button menus, the inline search also works for severity and facility now.
This commit is contained in:
parent
68408c3292
commit
1388efe36d
@ -43,7 +43,7 @@
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 4px; /* to position them to the right of their containing block */
|
||||
width: 300; /* width is based on the containing block */
|
||||
width: 350; /* width is based on the containing block */
|
||||
}
|
||||
|
||||
div#menu ul ul,
|
||||
|
@ -351,6 +351,7 @@ function InitFrontEndVariables()
|
||||
$content['MENU_SEARCH'] = $content['BASEPATH'] . "images/icons/view.png";
|
||||
$content['MENU_SELECTION_DISABLED'] = $content['BASEPATH'] . "images/icons/selection.png";
|
||||
$content['MENU_SELECTION_ENABLED'] = $content['BASEPATH'] . "images/icons/selection_delete.png";
|
||||
$content['MENU_TEXT_FIND'] = $content['BASEPATH'] . "images/icons/text_find.png";
|
||||
|
||||
$content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png";
|
||||
$content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png";
|
||||
|
@ -272,6 +272,7 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['FieldAlign'] = $fields[$mycolkey]['FieldAlign'];
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldcssclass'] = $content['syslogmessages'][$counter]['cssclass'];
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = "";
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['isnowrap'] = "nowrap";
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasdetails'] = "false";
|
||||
|
||||
// Set default link
|
||||
@ -302,6 +303,14 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
// Use default colour!
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $facility_colors[SYSLOG_LOCAL0] . '" ';
|
||||
}
|
||||
|
||||
// Set OnClick Menu for SYSLOG_FACILITY
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=facility%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetFacilityDisplayName( $logArray[$mycolkey] ). "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_SEVERITY )
|
||||
{
|
||||
@ -318,6 +327,14 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
// Use default colour!
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldbgcolor'] = 'bgcolor="' . $severity_colors[SYSLOG_INFO] . '" ';
|
||||
}
|
||||
|
||||
// Set OnClick Menu for SYSLOG_FACILITY
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=severity%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . GetSeverityDisplayName( $logArray[$mycolkey] ). "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_MESSAGETYPE )
|
||||
{
|
||||
@ -345,13 +362,16 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
// Special Handling for the Syslog Message!
|
||||
if ( $mycolkey == SYSLOG_MESSAGE )
|
||||
{
|
||||
// No NOWRAP for Syslog Message!
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['isnowrap'] = "";
|
||||
|
||||
// Set truncasted message for display
|
||||
if ( isset($logArray[SYSLOG_MESSAGE]) )
|
||||
{
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['fieldvalue'] = GetStringWithHTMLCodes(strlen($logArray[SYSLOG_MESSAGE]) > $CFG['ViewMessageCharacterLimit'] ? substr($logArray[SYSLOG_MESSAGE], 0, $CFG['ViewMessageCharacterLimit'] ) . " ..." : $logArray[SYSLOG_MESSAGE]);
|
||||
|
||||
// Enable LINK property! for this field
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['haslink'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['ismessagefield'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['detaillink'] = "details.php?uid=" . $uID;
|
||||
}
|
||||
else
|
||||
@ -398,50 +418,35 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c
|
||||
|
||||
if ( strlen($content['searchstr']) > 0 )
|
||||
{
|
||||
// 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>';
|
||||
// Set OnClick Menu for SYSLOG_MESSAGE
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasdropdownbutton'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?uid=' . $uID,
|
||||
'DisplayName' => $content['LN_VIEW_MESSAGECENTERED'],
|
||||
'IconSource' => $content['MENU_BULLET_GREEN']
|
||||
);
|
||||
}
|
||||
}
|
||||
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">' . $logArray[$mycolkey]. '</a>';
|
||||
// <img src="' . $content['MENU_VIEW'] . '" width="16" align="left" title="' . $content['LN_VIEW_FILTERFOR'] . $logArray[$mycolkey] . '">'
|
||||
// Set OnClick Menu for SYSLOG_SYSLOGTAG
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=syslogtag%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
}
|
||||
else if ( $mycolkey == SYSLOG_HOST )
|
||||
{
|
||||
// Set OnClick Menu for SYSLOG_HOST
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['hasbuttons'] = true;
|
||||
$content['syslogmessages'][$counter]['values'][$mycolkey]['buttons'][] = array(
|
||||
'ButtonUrl' => '?filter=source%3A' . $logArray[$mycolkey] . '&search=Search',
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'"
|
||||
'DisplayName' => $content['LN_VIEW_FILTERFOR'] . "'" . $logArray[$mycolkey] . "'",
|
||||
'IconSource' => $content['MENU_BULLET_BLUE']
|
||||
);
|
||||
|
||||
// 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];
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ $content['LN_GEN_PAGE'] = "Seite";
|
||||
$content['LN_GEN_PREDEFINEDSEARCHES'] = "Vordefinierte Suchkriterien";
|
||||
$content['LN_GEN_SOURCE_DISK'] = "Datei";
|
||||
$content['LN_GEN_SOURCE_DB'] = "Datenbank";
|
||||
$content['LN_GEN_RECORDSPERPAGE'] = "records per page";
|
||||
$content['LN_GEN_PRECONFIGURED'] = "Preconfigured";
|
||||
$content['LN_GEN_AVAILABLESEARCHES'] = "Available searches";
|
||||
|
||||
// Index Site
|
||||
$content['LN_ERROR_INSTALLFILEREMINDER'] = "Warnung! Du hast das Installationsscript 'install.php' noch nicht aus dem phpLogCon Hauptordner entfernt!";
|
||||
@ -56,7 +59,7 @@ $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_MESSAGECENTERED'] = "Back to unfiltered view with this message at top";
|
||||
$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages";
|
||||
$content['LN_VIEW_FILTERFOR'] = "Filter message for ";
|
||||
|
||||
|
@ -60,7 +60,7 @@ $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_MESSAGECENTERED'] = "Back to unfiltered view with this message at top";
|
||||
$content['LN_VIEW_RELATEDMSG'] = "View related syslog messages";
|
||||
$content['LN_VIEW_FILTERFOR'] = "Filter message for ";
|
||||
|
||||
|
@ -198,75 +198,72 @@
|
||||
<!-- ENDIF MiscShowDebugGridCounter="1" -->
|
||||
|
||||
<!-- BEGIN values -->
|
||||
<!-- IF hasdetails="false" -->
|
||||
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="middle" nowrap>
|
||||
|
||||
<td align="{FieldAlign}" class="{fieldcssclass}" {fieldbgcolor} valign="middle" {isnowrap}>
|
||||
<!-- IF hasbuttons="true" -->
|
||||
<!-- IF hasdropdownbutton="true" -->
|
||||
<img align="left" src="{MENU_NAV_CLOSE}" width="16" height="16" border="1" title="{LN_GEN_AVAILABLESEARCHES}" OnClick="ToggleDisplayTypeById('menu_{FieldColumn}_{uid}');">
|
||||
<!-- ENDIF hasdropdownbutton="true" -->
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li>
|
||||
<!-- <img align="left" src="{MENU_NAV_CLOSE}" width="16" height="16" border="1" title="{LN_GEN_AVAILABLESEARCHES}">-->
|
||||
<ul class="with_border" id="menu_{FieldColumn}_{uid}">
|
||||
<li OnMouseMove="ToggleDisplayEnhanceTimeOut('menu_{FieldColumn}_{uid}');">
|
||||
<h2 class="cellmenu1">{LN_GEN_AVAILABLESEARCHES}
|
||||
</h2>
|
||||
<!-- BEGIN buttons -->
|
||||
<li class="{cssclass}" OnMouseMove="ToggleDisplayEnhanceTimeOut('menu_{FieldColumn}_{uid}');">
|
||||
<img align="left" src="{MENU_BULLET_BLUE}" width="16" height="16"><a href="{ButtonUrl}" target="_top">{DisplayName}</a>
|
||||
<img align="left" src="{IconSource}" width="16" height="16"><a href="{ButtonUrl}" target="_top">{DisplayName}</a>
|
||||
</li>
|
||||
<!-- END buttons -->
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span OnClick="ToggleDisplayTypeById('menu_{FieldColumn}_{uid}');">
|
||||
<!-- ENDIF hasbuttons="true" -->
|
||||
|
||||
<!-- IF haslink="true" -->
|
||||
<a href="{detaillink}" class="syslogdetails" target="_top">
|
||||
<!-- ENDIF haslink="true" -->
|
||||
<!-- IF hasdetails="false" -->
|
||||
|
||||
<!-- IF haslink!="true" --><B><!-- ENDIF haslink!="true" -->
|
||||
<!-- IF ismessagefield!="true" -->
|
||||
|
||||
<!-- IF hasbuttons="true" -->
|
||||
<a href="#" OnClick="ToggleDisplayTypeById('menu_{FieldColumn}_{uid}');" class="{fieldcssclass}">
|
||||
{fieldvalue}
|
||||
<!-- IF haslink!="true" --></B><!-- ENDIF haslink!="true" -->
|
||||
</a>
|
||||
<!-- ENDIF hasbuttons="true" -->
|
||||
|
||||
<!-- IF haslink="true" -->
|
||||
<!-- IF hasbuttons!="true" -->
|
||||
<b>{fieldvalue}</b>
|
||||
<!-- ENDIF hasbuttons!="true" -->
|
||||
|
||||
<!-- ENDIF ismessagefield!="true" -->
|
||||
|
||||
<!-- IF ismessagefield="true" -->
|
||||
<a href="{detaillink}" class="syslogdetails" target="_top">
|
||||
{fieldvalue}
|
||||
</a>
|
||||
<!-- ENDIF haslink="true" -->
|
||||
<!-- ENDIF ismessagefield="true" -->
|
||||
|
||||
<!-- IF hasbuttons="true" -->
|
||||
<!-- ENDIF hasdetails="false" -->
|
||||
<!-- IF hasdetails="true" -->
|
||||
|
||||
<a href="{detaillink}" class="syslogdetails">{fieldvalue}
|
||||
<span>
|
||||
<table cellpadding="0" cellspacing="1" border="0" width="500" align="left" class="with_border_alternate">
|
||||
<tr><td colspan="2" class="cellmenu1" align="center"><B>{popupcaption}</B></td></tr>
|
||||
<!-- BEGIN messagesdetails -->
|
||||
<tr>
|
||||
<td width="150" nowrap class="cellmenu2">{detailfieldtitle}</td>
|
||||
<td width="100%" class="{detailscssclass}" >{detailfieldvalue}</td>
|
||||
</tr>
|
||||
<!-- END messagesdetails -->
|
||||
</table>
|
||||
</span>
|
||||
<!-- ENDIF hasbuttons="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">
|
||||
<tr><td colspan="2" class="cellmenu1" align="center"><B>{popupcaption}</B></td></tr>
|
||||
<!-- BEGIN messagesdetails -->
|
||||
<tr>
|
||||
<td width="150" nowrap class="cellmenu2">{detailfieldtitle}</td>
|
||||
<td width="100%" class="{detailscssclass}" >{detailfieldvalue}</td>
|
||||
</tr>
|
||||
<!-- END messagesdetails -->
|
||||
</table>
|
||||
</span>
|
||||
</a>
|
||||
<!-- ENDIF hasdetails="true" -->
|
||||
</a>
|
||||
<!-- 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 -->
|
||||
|
||||
|
@ -123,6 +123,7 @@ font
|
||||
/* Cells for listening */
|
||||
.line0
|
||||
{
|
||||
height: 16px;
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #DDDDDD;
|
||||
@ -134,6 +135,7 @@ font
|
||||
|
||||
.line1
|
||||
{
|
||||
height: 16px;
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #EEEEEE;
|
||||
@ -145,6 +147,7 @@ font
|
||||
|
||||
.line2
|
||||
{
|
||||
height: 16px;
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
background-color: #F5F5F5;
|
||||
@ -188,12 +191,12 @@ font
|
||||
}
|
||||
*/
|
||||
|
||||
.lineColouredWhite
|
||||
.lineColouredWhite, .lineColouredWhite:hover, A.lineColouredWhite
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.lineColouredBlack
|
||||
.lineColouredBlack, .lineColouredBlack:hover, A.lineColouredBlack
|
||||
{
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user