From: hickert Date: Fri, 23 Nov 2007 08:52:45 +0000 (+0000) Subject: Updated log view. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b764ec7faab072d5132f671cd3c3c4733cdd8598;p=gosa.git Updated log view. Enabled sorting for result and repeats git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7864 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc index 3d1f5a5a7..e538cb0be 100644 --- a/plugins/addons/logview/class_gosa_logview.inc +++ b/plugins/addons/logview/class_gosa_logview.inc @@ -19,7 +19,7 @@ class gosa_logview extends plugin var $sort = 1; var $sort_direction = "down"; - var $fields = array("action","timestamp","object","user","result","repeated"); + var $fields = array("action","timestamp","user","objecttype","object","result","repeated"); var $range = 25; var $view_logged = FALSE; @@ -84,6 +84,8 @@ class gosa_logview extends plugin $smarty->assign("mode2", ""); $smarty->assign("mode3", ""); $smarty->assign("mode4", ""); + $smarty->assign("mode5", ""); + $smarty->assign("mode6", ""); /* Assign select option content */ foreach( array("server", "action", "time", "regex") as $type){ @@ -160,7 +162,7 @@ class gosa_logview extends plugin if(!preg_match("/r/",$acls)){ $res = " - + "._("You have insufficient permissions to view syslog entries.")." "; @@ -263,6 +265,7 @@ class gosa_logview extends plugin $res.=" ".$line['action'].""; $res.=" ".date("H:i:s d.m.Y",$line['timestamp']).""; $res.=" ".preg_replace("/,/",", ",$user).""; + $res.=" ".$line['objecttype'].""; $res.=" ".preg_replace("/,/",", ",$object).""; $res.=" ".$line['result'].""; if($line['repeated'] == 1){ @@ -337,7 +340,7 @@ class gosa_logview extends plugin } $this->sort= (int)$_GET['sort']; - if ($this->sort < 0 || $this->sort > 4){ + if ($this->sort < 0 || $this->sort > count($this->fields)){ $this->sort= 0; } } diff --git a/plugins/addons/logview/gosa_log_contents.tpl b/plugins/addons/logview/gosa_log_contents.tpl index 9a66848c0..dcc9dd1e7 100644 --- a/plugins/addons/logview/gosa_log_contents.tpl +++ b/plugins/addons/logview/gosa_log_contents.tpl @@ -82,9 +82,10 @@ {t}Action{/t} {$mode0} {t}Date{/t} {$mode1} {t}User{/t} {$mode2} - {t}Object{/t} {$mode2} - {t}Message{/t} {$mode3} - {t}Repeated{/t} {$mode4} + {t}Object type{/t} {$mode3} + {t}Object{/t} {$mode4} + {t}Message{/t} {$mode5} + {t}Repeated{/t} {$mode6} {$search_result}