From 3ed6e69ea8168e3f5b7fdbccdb6654cbedf18534 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Mon, 19 May 2008 13:10:38 +0200 Subject: [PATCH 1/2] Configured Columns which are not defined will be automatically hidden now --- src/index.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/index.php b/src/index.php index 21398b5..9c4ce60 100644 --- a/src/index.php +++ b/src/index.php @@ -201,16 +201,19 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // --- Init the fields we need foreach($content['Columns'] as $mycolkey) { - $content['fields'][$mycolkey]['FieldID'] = $mycolkey; - $content['fields'][$mycolkey]['FieldCaption'] = $content[ $fields[$mycolkey]['FieldCaptionID'] ]; - $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 ( isset($fields[$mycolkey]) ) + { + $content['fields'][$mycolkey]['FieldID'] = $mycolkey; + $content['fields'][$mycolkey]['FieldCaption'] = $content[ $fields[$mycolkey]['FieldCaptionID'] ]; + $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'] = ''; + if ( $mycolkey == SYSLOG_MESSAGE ) + $content['fields'][$mycolkey]['colspan'] = ''; //' colspan="2" '; + else + $content['fields'][$mycolkey]['colspan'] = ''; + } } // --- @@ -291,7 +294,7 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['Sources'][$c // --- Now we populate the values array! foreach($content['Columns'] as $mycolkey) { - if ( isset($logArray[$mycolkey]) ) + if ( isset($fields[$mycolkey]) && isset($logArray[$mycolkey]) ) { // Set defaults $content['syslogmessages'][$counter]['values'][$mycolkey]['FieldColumn'] = $mycolkey; From f7d5d7fe4eee726457d76c7ed3e179e5e69bcd11 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Mon, 19 May 2008 13:22:46 +0200 Subject: [PATCH 2/2] Added pager to the bottom of the index page as well (bugtracker id 76) --- src/templates/index.html | 240 +++++++++++++++++++++++---------------- 1 file changed, 141 insertions(+), 99 deletions(-) diff --git a/src/templates/index.html b/src/templates/index.html index 0327393..e8834ab 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -86,11 +86,11 @@ - - + +
Recent syslog messagesRecent syslog messages
@@ -188,127 +188,169 @@ -
+ + - + - -
+ + Debug
- - - - + + + + - - - - + + + + + - - - - - + - - - - + - - + + -
Debug + + + + {FieldCaption} + + + +
- - - - {FieldCaption} - - - -
{ZAEHLER}
{ZAEHLER} - - - - - + + + + + - + + + + - + - + - - - {fieldvalue} - - - - - {fieldvalue} - - - - - - - {fieldvalue} + + + {fieldvalue} - + - - + + {fieldvalue} + - {fieldvalue} - - - - - - - - - -
{popupcaption}
{detailfieldtitle}{detailfieldvalue}
-
+ + + +
+ {fieldvalue} - -
- + {fieldvalue} + + + + + + + + + +
{popupcaption}
{detailfieldtitle}{detailfieldvalue}
+
+
+ + + - -
- -
-

{LN_ERROR_NORECORDS} - Error Details:

- {detailederror} -
-
-
-
- + + + + + + + + + + + + + + + + + + + + + +
 Pager:   + + + + + + + + + + + + + + {mypagenumber}  + + + + + + + + + + + + +
+ + + + +
+ +
+

{LN_ERROR_NORECORDS} - Error Details:

+ {detailederror} +
+
+
+
+ \ No newline at end of file