From 3aae842e0ec58c5f39f78c61e7c4463dd9fbbc59 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 3 Aug 2010 08:37:30 +0000 Subject: [PATCH] Added dummy functionality to send daily GOsa-usage stats git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19349 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../dbChannelStatus/class_dbChannelStatus.inc | 18 ++++++++++++++++++ .../dashBoard/dbChannelStatus/contents.tpl | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc index bad2187bd..86664bbb7 100644 --- a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc @@ -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(); diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl index 1b1de976f..1b91aba10 100644 --- a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl @@ -1,3 +1,7 @@ +

{t}Transmit daliy stats{/t} + + +

{t}Channels{/t}

{$channelList} -- 2.30.2