Added view for raw log data
authorJamie Cameron <jcameron@webmin.com>
Thu, 20 Mar 2008 16:58:55 +0000 (16:58 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 20 Mar 2008 16:58:55 +0000 (16:58 +0000)
webminlog/CHANGELOG
webminlog/lang/en
webminlog/view.cgi

index 96687c8..f5de679 100644 (file)
@@ -17,3 +17,5 @@ Rollback actions can themselves now be rolled back.
 Re-designed the UI to use Webmin standard layout and functions.
 Added a field for searching based on the contents of commands run or file changes made.
 When viewing the details of a logged action, an annotation can be entered to explain why it was done.
+---- Changes since 1.400 ----
+Added a section to the Action Details page for viewing raw log data, which can show more detail.
index e5057c9..1ced521 100644 (file)
@@ -77,6 +77,9 @@ view_rollback2=Roll Back Selected Files
 view_return=action details
 view_input=Input to command
 view_anno=Log entry annotation
+view_raw=Raw log data
+view_rawname=Parameter name
+view_rawvalue=Parameter value
 
 acl_mods=Can view logs in modules
 acl_all=All
index 1952d25..79836c8 100755 (executable)
@@ -65,6 +65,27 @@ print &ui_table_row(undef,
        &ui_submit($text{'save'}, "annosave"));
 print &ui_hidden_table_end("anno");
 
+# Raw log data, hidden by default
+print &ui_hidden_table_start($text{'view_raw'}, "width=100%", 1, "raw", 0);
+@tds = ( "width=20% ");
+$rtable = &ui_columns_start([ $text{'view_rawname'}, $text{'view_rawvalue'} ],
+                           100, 0, \@tds);
+foreach $k (keys %$act) {
+       next if ($k eq 'param');
+       $rtable .= &ui_columns_row([
+               "<b>".&html_escape($k)."</b>",
+               &html_escape($act->{$k}) ], \@tds);
+       }
+foreach $k (keys %{$act->{'param'}}) {
+       $rtable .= &ui_columns_row([
+               &html_escape($k),
+               &html_escape(join("\n", split(/\0/, $act->{'param'}->{$k}))) ],
+               \@tds);
+       }
+$rtable .= &ui_columns_end();
+print &ui_table_row(undef, $rtable, 2);
+print &ui_hidden_table_end("raw");
+
 # display modified files
 $rbcount = 0;
 $i = 0;