Code

Added dummy functionality to send daily GOsa-usage stats
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Aug 2010 08:37:30 +0000 (08:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Aug 2010 08:37:30 +0000 (08:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19349 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc
gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl

index bad2187bd8e0bd2d6b2bf8d4f46f78e7425f7ac5..86664bbb7dd3d04a32391434767945d3df5509c1 100644 (file)
@@ -20,6 +20,24 @@ class dbChannelStatus extends plugin
 
     function execute()
     {
+        // Transmit daily statistics to GOsa-Server
+        if(isset($_POST['transmitStatistics'])){
+
+            // First try to retrieve values via RPC
+            if ($this->config->get_cfg_value("core","gosaRpcServer") != ""){
+
+                $dump = stats::dumpTables();
+                $rpc = $this->config->getRpcHandle();
+                $hash = $rpc->updateInstanceStatus($dump);
+                if(!$rpc->success()){
+                    msg_dialog::display(_("Error"),msgPool::rpcError($rpc->get_error()),ERROR_DIALOG);
+                    return("");
+                }
+            }
+        }
+    
+
+
         $smarty = get_smarty();
 
         $channel = array();
index 1b1de976ff5c73b5f28cd7abcad384d507e80e19..1b91aba10bcaf2eafadb9354bbbb6fede1e043de 100644 (file)
@@ -1,3 +1,7 @@
+<h3>{t}Transmit daliy stats{/t}
+
+<button name='transmitStatistics'>{t}Send{/t}</button>
+
 <h3>{t}Channels{/t}</h3> 
 
 {$channelList}