Code

Added sub plugins for the dash board
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 08:46:16 +0000 (08:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 08:46:16 +0000 (08:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18877 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/class_dashBoard.inc
gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbInformation/class_dbInformation.inc [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbInformation/contents.tpl [new file with mode: 0644]
gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc

index de795136b393c181c9a12f40f0a68b5298782908..4a3af9129f0c275543dcdf59ef16f4030c521f5f 100644 (file)
@@ -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 (file)
index 0000000..d79af4c
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+class dbAdvices extends plugin
+{
+    function __construct($config)
+    {
+        parent::__construct($config, NULL);
+    }
+
+    function execute()
+    {
+        $smarty = get_smarty();
+        return($smarty->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 (file)
index 0000000..345e6ae
--- /dev/null
@@ -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 (file)
index 0000000..443fdff
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+class dbChannelStatus extends plugin
+{
+    function __construct($config)
+    {
+        parent::__construct($config, NULL);
+    }
+
+    function execute()
+    {
+        $smarty = get_smarty();
+        return($smarty->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 (file)
index 0000000..345e6ae
--- /dev/null
@@ -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 (file)
index 0000000..f04d4e6
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+class dbInformation extends plugin
+{
+    function __construct($config)
+    {
+        parent::__construct($config, NULL);
+    }
+
+    function execute()
+    {
+        $smarty = get_smarty();
+        return($smarty->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 (file)
index 0000000..345e6ae
--- /dev/null
@@ -0,0 +1 @@
+Test
index 80fa091c091e545dcda6cf5dc5301fe1e6246c7e..fe699877c06f67708ccb506e2480170748ffc6d8 100644 (file)
@@ -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();
     }
 }