From: hickert Date: Mon, 21 Dec 2009 07:46:57 +0000 (+0000) Subject: Moved syslog plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0876575f60e9437c2619d3b401ca32debce8cd49;p=gosa.git Moved syslog plugin - git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14917 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/services/syslog/class_goLogDBServer.inc b/gosa-plugins/goto/admin/systems/services/syslog/class_goLogDBServer.inc deleted file mode 100644 index 69a05f2ba..000000000 --- a/gosa-plugins/goto/admin/systems/services/syslog/class_goLogDBServer.inc +++ /dev/null @@ -1,111 +0,0 @@ - "Eins ist toll", "zwei" => "Zwei ist noch besser"); - - /* This plugin only writes its objectClass */ - var $objectclasses = array("goLogDBServer"); - var $attributes = array("goLogAdmin", "goLogPassword" , "gosaLogDB"); - var $StatusFlag = "goLogDBServerStatus"; - - /* This class can't be assigned twice so it conflicts with itsself */ - var $conflicts = array("goLogDBServer"); - - var $DisplayName = ""; - var $dn = NULL; - var $acl; - var $cn = ""; - var $goLogDBServerStatus = ""; - var $goLogAdmin = ""; - var $goLogPassword = ""; - var $gosaLogDB = "gomon"; - var $view_logged =FALSE; - - - function goLogDBServer(&$config,$dn) - { - goService::goService($config,$dn); - $this->DisplayName = _("Syslog service database"); - } - - - 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("goLogDBServer.tpl",TRUE,dirname(__FILE__)))); - } - - - function getListEntry() - { - $fields = goService::getListEntry(); - $fields['Message'] = _("Syslog service database"); - #$fields['AllowEdit'] = true; - return($fields); - } - - - function check() - { - $message = plugin::check(); - if (empty($this->goLogAdmin)){ - $message[]= msgPool::required(_("User")); - } - if (empty($this->goLogPassword)){ - $message[]= msgPool::required(_("Password")); - } - if (empty($this->gosaLogDB)){ - $message[]= msgPool::required(_("Database")); - } - return($message); - } - - - function save_object() - { - if(isset($_POST['goLogDBServerPosted'])){ - plugin::save_object(); - } - } - - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array( - "plShortName" => _("Logging database"), - "plDescription" => _("Logging database")." ("._("Services").")", - "plSelfModify" => FALSE, - "plDepends" => array(), - "plPriority" => 97, - "plSection" => array("administration"), - "plCategory" => array("server"), - - "plProvidedAcls"=> array( - "start" => _("Start"), - "stop" => _("Stop"), - "restart" => _("Restart"), - "goLogAdmin" => _("Admin"), - "goLogPassword" => _("Password"), - "gosaLogDB" => _("Database")) - )); - } -} -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-plugins/goto/admin/systems/services/syslog/class_goSyslogServer.inc b/gosa-plugins/goto/admin/systems/services/syslog/class_goSyslogServer.inc deleted file mode 100644 index 8758ce2ef..000000000 --- a/gosa-plugins/goto/admin/systems/services/syslog/class_goSyslogServer.inc +++ /dev/null @@ -1,83 +0,0 @@ - "Eins ist toll", "zwei" => "Zwei ist noch besser"); - - /* This plugin only writes its objectClass */ - var $objectclasses = array("goSyslogServer"); - var $attributes = array(); - var $StatusFlag = "goSyslogServerStatus"; - - /* This class can't be assigned twice so it conflicts with itsself */ - var $conflicts = array("goSyslogServer"); - - var $DisplayName = ""; - var $dn = NULL; - var $acl; - var $cn = ""; - var $goSyslogServerStatus = ""; - var $view_logged =FALSE; - - function goSyslogServer(&$config,$dn) - { - goService::goService($config,$dn); - $this->DisplayName = _("Syslog server"); - } - - - function execute() - { - if($this->is_account && !$this->view_logged){ - $this->view_logged = TRUE; - new log("view","server/".get_class($this),$this->dn); - } - - - $smarty = get_smarty(); - return($smarty->fetch(get_template_path("goSyslogServer.tpl",TRUE,dirname(__FILE__)))); - } - - - function getListEntry() - { - $fields = goService::getListEntry(); - $fields['Message'] = _("Syslog server"); - #$fields['AllowEdit'] = false; - return($fields); - } - - function check() - { - $message = plugin::check(); - return($message); - } - - - function save_object() - { - plugin::save_object(); - } - - /* Return plugin informations for acl handling */ - static function plInfo() - { - return (array( - "plShortName" => _("Logging service"), - "plDescription" => _("Logging service")." ("._("Services").")", - "plSelfModify" => FALSE, - "plDepends" => array(), - "plPriority" => 88, - "plSection" => array("administration"), - "plCategory" => array("server"), - - "plProvidedAcls"=> array() - )); - } - - -} -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: -?> diff --git a/gosa-plugins/goto/admin/systems/services/syslog/goLogDBServer.tpl b/gosa-plugins/goto/admin/systems/services/syslog/goLogDBServer.tpl deleted file mode 100644 index b2d5926fb..000000000 --- a/gosa-plugins/goto/admin/systems/services/syslog/goLogDBServer.tpl +++ /dev/null @@ -1,35 +0,0 @@ -

{t}Logging database information{/t}

- - - - - - - - - - - - - -
{t}Database{/t}{$must} -{render acl=$gosaLogDBACL} - -{/render} -
{t}Logging DB user{/t}{$must} -{render acl=$goLogAdminACL} - -{/render} -
{t}Password{/t}{$must} -{render acl=$goLogPasswordACL} - -{/render} -
- -

 

-
- -   - -
- diff --git a/gosa-plugins/goto/admin/systems/services/syslog/goSyslogServer.tpl b/gosa-plugins/goto/admin/systems/services/syslog/goSyslogServer.tpl deleted file mode 100644 index 5fa1c6351..000000000 --- a/gosa-plugins/goto/admin/systems/services/syslog/goSyslogServer.tpl +++ /dev/null @@ -1,9 +0,0 @@ -

{t}Syslog Service{/t} {t}enabled{/t}

- -

 

-
- -   - -
- diff --git a/gosa-plugins/log/admin/systems/services/syslog/class_goLogDBServer.inc b/gosa-plugins/log/admin/systems/services/syslog/class_goLogDBServer.inc new file mode 100644 index 000000000..69a05f2ba --- /dev/null +++ b/gosa-plugins/log/admin/systems/services/syslog/class_goLogDBServer.inc @@ -0,0 +1,111 @@ + "Eins ist toll", "zwei" => "Zwei ist noch besser"); + + /* This plugin only writes its objectClass */ + var $objectclasses = array("goLogDBServer"); + var $attributes = array("goLogAdmin", "goLogPassword" , "gosaLogDB"); + var $StatusFlag = "goLogDBServerStatus"; + + /* This class can't be assigned twice so it conflicts with itsself */ + var $conflicts = array("goLogDBServer"); + + var $DisplayName = ""; + var $dn = NULL; + var $acl; + var $cn = ""; + var $goLogDBServerStatus = ""; + var $goLogAdmin = ""; + var $goLogPassword = ""; + var $gosaLogDB = "gomon"; + var $view_logged =FALSE; + + + function goLogDBServer(&$config,$dn) + { + goService::goService($config,$dn); + $this->DisplayName = _("Syslog service database"); + } + + + 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("goLogDBServer.tpl",TRUE,dirname(__FILE__)))); + } + + + function getListEntry() + { + $fields = goService::getListEntry(); + $fields['Message'] = _("Syslog service database"); + #$fields['AllowEdit'] = true; + return($fields); + } + + + function check() + { + $message = plugin::check(); + if (empty($this->goLogAdmin)){ + $message[]= msgPool::required(_("User")); + } + if (empty($this->goLogPassword)){ + $message[]= msgPool::required(_("Password")); + } + if (empty($this->gosaLogDB)){ + $message[]= msgPool::required(_("Database")); + } + return($message); + } + + + function save_object() + { + if(isset($_POST['goLogDBServerPosted'])){ + plugin::save_object(); + } + } + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("Logging database"), + "plDescription" => _("Logging database")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 97, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array( + "start" => _("Start"), + "stop" => _("Stop"), + "restart" => _("Restart"), + "goLogAdmin" => _("Admin"), + "goLogPassword" => _("Password"), + "gosaLogDB" => _("Database")) + )); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/log/admin/systems/services/syslog/class_goSyslogServer.inc b/gosa-plugins/log/admin/systems/services/syslog/class_goSyslogServer.inc new file mode 100644 index 000000000..8758ce2ef --- /dev/null +++ b/gosa-plugins/log/admin/systems/services/syslog/class_goSyslogServer.inc @@ -0,0 +1,83 @@ + "Eins ist toll", "zwei" => "Zwei ist noch besser"); + + /* This plugin only writes its objectClass */ + var $objectclasses = array("goSyslogServer"); + var $attributes = array(); + var $StatusFlag = "goSyslogServerStatus"; + + /* This class can't be assigned twice so it conflicts with itsself */ + var $conflicts = array("goSyslogServer"); + + var $DisplayName = ""; + var $dn = NULL; + var $acl; + var $cn = ""; + var $goSyslogServerStatus = ""; + var $view_logged =FALSE; + + function goSyslogServer(&$config,$dn) + { + goService::goService($config,$dn); + $this->DisplayName = _("Syslog server"); + } + + + function execute() + { + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + new log("view","server/".get_class($this),$this->dn); + } + + + $smarty = get_smarty(); + return($smarty->fetch(get_template_path("goSyslogServer.tpl",TRUE,dirname(__FILE__)))); + } + + + function getListEntry() + { + $fields = goService::getListEntry(); + $fields['Message'] = _("Syslog server"); + #$fields['AllowEdit'] = false; + return($fields); + } + + function check() + { + $message = plugin::check(); + return($message); + } + + + function save_object() + { + plugin::save_object(); + } + + /* Return plugin informations for acl handling */ + static function plInfo() + { + return (array( + "plShortName" => _("Logging service"), + "plDescription" => _("Logging service")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 88, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array() + )); + } + + +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-plugins/log/admin/systems/services/syslog/goLogDBServer.tpl b/gosa-plugins/log/admin/systems/services/syslog/goLogDBServer.tpl new file mode 100644 index 000000000..b2d5926fb --- /dev/null +++ b/gosa-plugins/log/admin/systems/services/syslog/goLogDBServer.tpl @@ -0,0 +1,35 @@ +

{t}Logging database information{/t}

+ + + + + + + + + + + + + +
{t}Database{/t}{$must} +{render acl=$gosaLogDBACL} + +{/render} +
{t}Logging DB user{/t}{$must} +{render acl=$goLogAdminACL} + +{/render} +
{t}Password{/t}{$must} +{render acl=$goLogPasswordACL} + +{/render} +
+ +

 

+
+ +   + +
+ diff --git a/gosa-plugins/log/admin/systems/services/syslog/goSyslogServer.tpl b/gosa-plugins/log/admin/systems/services/syslog/goSyslogServer.tpl new file mode 100644 index 000000000..5fa1c6351 --- /dev/null +++ b/gosa-plugins/log/admin/systems/services/syslog/goSyslogServer.tpl @@ -0,0 +1,9 @@ +

{t}Syslog Service{/t} {t}enabled{/t}

+ +

 

+
+ +   + +
+