From: hickert Date: Thu, 17 Dec 2009 17:19:50 +0000 (+0000) Subject: Added rSyslog service X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e50725a859b37b6d2ca959f69b437abbae2e01bc;p=gosa.git Added rSyslog service git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14902 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/rsyslog/admin/systems/services/rsyslog/class_rSyslogServer.inc b/gosa-plugins/rsyslog/admin/systems/services/rsyslog/class_rSyslogServer.inc new file mode 100644 index 000000000..cb2d509e7 --- /dev/null +++ b/gosa-plugins/rsyslog/admin/systems/services/rsyslog/class_rSyslogServer.inc @@ -0,0 +1,107 @@ +DisplayName = _("rSyslog"); + } + + + function execute() + { + $smarty = get_smarty(); + + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + new log("view","server/".get_class($this),$this->dn); + } + + $tmp = $this->plInfo(); + foreach($tmp['plProvidedAcls'] as $name => $translation){ + $smarty->assign($name."ACL",$this->getacl($name)); + } + + foreach($this->attributes as $attr){ + $smarty->assign($attr,$this->$attr); + } + return($smarty->fetch(get_template_path("rSyslogServer.tpl",TRUE,dirname(__FILE__)))); + } + + + function getListEntry() + { + $fields = goService::getListEntry(); + $fields['Message'] = _("rSyslog logging service"); + #$fields['AllowEdit'] = true; + #$fields['AllowStart'] = FALSE; + #$fields['AllowStop'] = FALSE; + #$fields['AllowRestart'] = FALSE; + return($fields); + } + + + function check() + { + $message = plugin::check(); + if (empty($this->rSyslogUser)){ + $message[]= msgPool::required(_("User")); + } + if (empty($this->rSyslogPassword)){ + $message[]= msgPool::required(_("Password")); + } + if (empty($this->rSyslogDatabase)){ + $message[]= msgPool::required(_("Database")); + } + return($message); + } + + + function save_object() + { + if(isset($_POST['rSyslogServerPosted'])){ + plugin::save_object(); + } + } + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("rSyslog logging service"), + "plDescription" => _("rSyslog logging service")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 99, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array( + "rSyslogDatabase" => _("Database"), + "rSyslogUser" => _("User"), + "rSyslogPassword" => _("Password"), + "viewEntries" => _("Allow view of entries on this server")) + )); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/rsyslog/admin/systems/services/rsyslog/gosaLogServer.tpl b/gosa-plugins/rsyslog/admin/systems/services/rsyslog/gosaLogServer.tpl new file mode 100644 index 000000000..b4f1c4679 --- /dev/null +++ b/gosa-plugins/rsyslog/admin/systems/services/rsyslog/gosaLogServer.tpl @@ -0,0 +1,35 @@ +

{t}rSyslog logging database{/t}

+ + + + + + + + + + + + + +
{t}Database{/t}{$must} +{render acl=$rSyslogDatabaseACL} + +{/render} +
{t}Database user{/t}{$must} +{render acl=$rSyslogUserACL} + +{/render} +
{t}Password{/t}{$must} +{render acl=$rSyslogPasswordACL} + +{/render} +
+ +

 

+
+ +   + +
+