cryptonas/plugins/logs/show_log.cs
lars 77324ae946 added minor parts of slovene translation
fixed samba integration script
added syslog support
replaced 'pattern' with 'level' for 'logs' plugin
improved fetch_po_files script
improved output of log plugin
recursively storing setting files fixed
umask set to 022
defining bootup and shutdown handler for the server
implementing volume_automount mounting
simplified the output preperation of the partition plugin
"busy" flag handling moved from core/container to core/main
2006-12-11 14:16:10 +00:00

69 lines
2.4 KiB
C#

<?cs # $Id$ ?>
<style type="text/css">
<?cs include:Data.Plugins.logs.StyleSheetFile ?>
</style>
<h1><?cs var:html_escape(Lang.Plugins.logs.Title.Log) ?></h1>
<table border="0" align="center"><tr>
<td><?cs call:print_form_header("log-all", "logs") ?>
<button type="submit" value="refresh"><?cs
var:html_escape(Lang.Plugins.logs.Text.ShowAll) ?></button>
</form></td>
<td><?cs call:print_form_header("log-warnings", "logs") ?>
<input type="hidden" name="level" value="WARNING" />
<button type="submit" value="refresh"><?cs
var:html_escape(Lang.Plugins.logs.Text.AtLeastWarnings) ?></button>
</form></td>
<td><?cs call:print_form_header("log-only-error", "logs") ?>
<input type="hidden" name="level" value="ERROR" />
<button type="submit" value="refresh"><?cs
var:html_escape(Lang.Plugins.logs.Text.OnlyErrors) ?></button>
</form></td>
</tr></table>
<?cs call:handle_messages() ?>
<div id="log">
<?cs if:subcount(Data.Plugins.logs.Content) > 0 ?>
<table class="log"><?cs # the first line dictates if we show meta info or not
?><?cs if:Data.Plugins.logs.Content.0.Level ?>
<tr><th></th>
<th><?cs var:html_escape(Lang.Plugins.logs.Text.AgeOfEvent) ?></th>
<th><?cs var:html_escape(Lang.Plugins.logs.Text.EventText) ?></th>
</tr>
<?cs loop:index = #0, subcount(Data.Plugins.logs.Content)-1, #1 ?><?cs
with:x=Data.Plugins.logs.Content[index] ?><?cs
if:x.Text ?><?cs
if:x.Level == "ERROR" ?><?cs
set:meta_file="dialog-error_tango.gif" ?><?cs
elif:x.Level == "WARNING" ?><?cs
set:meta_file="dialog-warning_tango.gif" ?><?cs
else ?><?cs
set:meta_file="dialog-information_tango.gif" ?><?cs
/if ?>
<tr><td class="level"><img src="<?cs
call:link("cryptobox-misc/" + meta_file, "", "", "", "") ?>"
alt="symbol: <?cs var:html_escape(x.Level) ?>" /></td>
<td class="time"><?cs if:x.TimeDiff.Value ?><?cs
var:html_escape(x.TimeDiff.Value) ?>&nbsp;<?cs
var:html_escape(Lang.Plugins.logs.Text.TimeUnits[
x.TimeDiff.Unit]) ?><?cs
/if ?></td>
<td class="text"><?cs var:html_escape(x.Text) ?></td></tr><?cs
/if ?><?cs /with ?><?cs /loop ?><?cs
else ?><?cs
loop:index = #0, subcount(Data.Plugins.logs.Content)-1, #1 ?><?cs
with:x=Data.Plugins.logs.Content[index] ?>
<tr><td><?cs var:html_escape(x.Text) ?></td></tr><?cs
/with ?><?cs /loop ?><?cs
/if ?>
</table>
<?cs else ?>
<?cs call:hint("Plugins.logs.EmptyLog") ?>
<?cs /if ?>
</div>