From 81b418e517dcc5f6890ae85a5f4065add469f9cf Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 30 Jun 2010 08:46:16 +0000 Subject: [PATCH] Added sub plugins for the dash board git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18877 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../generic/dashBoard/class_dashBoard.inc | 24 +++++++++++- .../dashBoard/dbAdvices/class_dbAdvices.inc | 37 +++++++++++++++++++ .../generic/dashBoard/dbAdvices/contents.tpl | 1 + .../dbChannelStatus/class_dbChannelStatus.inc | 37 +++++++++++++++++++ .../dashBoard/dbChannelStatus/contents.tpl | 1 + .../dbInformation/class_dbInformation.inc | 37 +++++++++++++++++++ .../dashBoard/dbInformation/contents.tpl | 1 + .../dbPluginStatus/class_dbPluginStatus.inc | 27 +++++++++++++- 8 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc create mode 100644 gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl create mode 100644 gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc create mode 100644 gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl create mode 100644 gosa-core/plugins/generic/dashBoard/dbInformation/class_dbInformation.inc create mode 100644 gosa-core/plugins/generic/dashBoard/dbInformation/contents.tpl diff --git a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc index de795136b..4a3af9129 100644 --- a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc +++ b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc @@ -7,26 +7,39 @@ class dashBoard extends plugin var $plShortIcon = 'dashBoard.png'; var $plIcon = 'plugin.png'; + private $dbPluginStatus = NULL; + private $dbChannelStatus = NULL; + private $dbAdvices = NULL; + private $dbInformation = NULL; + function __construct($config) { plugin::plugin($config, NULL); // Instantiate child classes $this->dbPluginStatus = new dbPluginStatus($config); + $this->dbChannelStatus = new dbChannelStatus($config); + $this->dbAdvices = new dbAdvices($config); + $this->dbInformation = new dbInformation($config); } function execute() { $smarty = get_smarty(); $smarty->assign('dbPluginStatus', $this->dbPluginStatus->execute()); + $smarty->assign('dbChannelStatus', $this->dbChannelStatus->execute()); + $smarty->assign('dbAdvices', $this->dbAdvices->execute()); + $smarty->assign('dbInformation', $this->dbInformation->execute()); return($smarty->fetch(get_template_path('dashBoard.tpl', TRUE))); - } function check() { $messages = plugin::check(); $messages = array_merge($this->dbPluginStatus->check()); + $messages = array_merge($this->dbChannelStatus->check()); + $messages = array_merge($this->dbAdvices->check()); + $messages = array_merge($this->dbInformation->check()); return($messages); } @@ -34,18 +47,27 @@ class dashBoard extends plugin { plugin::save_object(); $this->dbPluginStatus->save_object(); + $this->dbChannelStatus->save_object(); + $this->dbAdvices->save_object(); + $this->dbInformation->save_object(); } function save() { plugin::save(); $this->dbPluginStatus->save(); + $this->dbChannelStatus->save(); + $this->dbAdvices->save(); + $this->dbInformation->save(); } function remove_from_parent() { plugin::remove_from_parent(); $this->dbPluginStatus->remove_from_parent(); + $this->dbChannelStatus->remove_from_parent(); + $this->dbAdvices->remove_from_parent(); + $this->dbInformation->remove_from_parent(); } } diff --git a/gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc b/gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc new file mode 100644 index 000000000..d79af4cf0 --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc @@ -0,0 +1,37 @@ +fetch(get_template_path('dbAdvices/contents.tpl', TRUE))); + } + + function save_object() + { + parent::save_object(); + } + + function save() + { + parent::save(); + } + + function check() + { + return(parent::check()); + } + + function remove_from_parent() + { + parent::remove_from_parent(); + } +} + +?> diff --git a/gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl new file mode 100644 index 000000000..345e6aef7 --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl @@ -0,0 +1 @@ +Test diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc new file mode 100644 index 000000000..443fdff41 --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc @@ -0,0 +1,37 @@ +fetch(get_template_path('dbChannelStatus/contents.tpl', TRUE))); + } + + function save_object() + { + parent::save_object(); + } + + function save() + { + parent::save(); + } + + function check() + { + return(parent::check()); + } + + function remove_from_parent() + { + parent::remove_from_parent(); + } +} + +?> diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl new file mode 100644 index 000000000..345e6aef7 --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl @@ -0,0 +1 @@ +Test diff --git a/gosa-core/plugins/generic/dashBoard/dbInformation/class_dbInformation.inc b/gosa-core/plugins/generic/dashBoard/dbInformation/class_dbInformation.inc new file mode 100644 index 000000000..f04d4e65a --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbInformation/class_dbInformation.inc @@ -0,0 +1,37 @@ +fetch(get_template_path('dbInformation/contents.tpl', TRUE))); + } + + function save_object() + { + parent::save_object(); + } + + function save() + { + parent::save(); + } + + function check() + { + return(parent::check()); + } + + function remove_from_parent() + { + parent::remove_from_parent(); + } +} + +?> diff --git a/gosa-core/plugins/generic/dashBoard/dbInformation/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbInformation/contents.tpl new file mode 100644 index 000000000..345e6aef7 --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbInformation/contents.tpl @@ -0,0 +1 @@ +Test diff --git a/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc b/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc index 80fa091c0..fe699877c 100644 --- a/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc +++ b/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc @@ -2,10 +2,35 @@ class dbPluginStatus extends plugin { + function __construct($config) + { + parent::__construct($config, NULL); + } function execute() { - return("test"); + $smarty = get_smarty(); + return($smarty->fetch(get_template_path('dbPluginStatus/contents.tpl', TRUE))); + } + + function save_object() + { + parent::save_object(); + } + + function save() + { + parent::save(); + } + + function check() + { + return(parent::check()); + } + + function remove_from_parent() + { + parent::remove_from_parent(); } } -- 2.30.2