2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 $object = &html_escape($object);
12 if ($action eq 'create') {
13 return &text('log_create', $p->{'level'} eq 'linear' ? $text{$p->{'level'}} : $text{'raid'.$p->{'level'}}, "<tt>$object</tt>");
15 elsif ($action eq 'stop') {
16 return &text('log_stop', "<tt>$object</tt>");
18 elsif ($action eq 'start') {
19 return &text('log_start', "<tt>$object</tt>");
21 elsif ($action eq 'delete') {
22 return &text('log_delete', "<tt>$object</tt>");
24 elsif ($action eq 'mkfs') {
25 return &text('log_mkfs', "<tt>$p->{'fs'}</tt>", "<tt>$object</tt>");
27 elsif ($action eq 'add') {
28 return &text('log_add', "<tt>$object</tt>", "<tt>$p->{'disk'}</tt>");
30 elsif ($action eq 'remove') {
31 return &text('log_remove', "<tt>$object</tt>", "<tt>$p->{'disk'}</tt>");
33 elsif ($action eq 'grow') {
34 return &text('log_grow', "<tt>$object</tt>", "<tt>$p->{'disk'}</tt>");
36 elsif ($action eq 'convert_to_raid6') {
37 return &text('log_convert_to_raid6', "<tt>$object</tt>", "<tt>$p->{'disk'}</tt>");
39 elsif ($action eq 'convert_to_raid5') {
40 return &text('log_convert_to_raid5', "<tt>$object</tt>", "<tt>$p->{'disk'}</tt>");