From 05a87b5afd2811e40e4d529902a79cae60dca392 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Nov 2009 10:32:06 +0000 Subject: [PATCH] Udpated gosaLogView and logview -We may have only one service configured and do not wan't to see warning dialogs about missing cofigurations everytime git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14823 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/log/addons/logview/class_gosa_logview.inc | 6 ++++-- gosa-plugins/log/addons/logview/class_logview.inc | 2 +- gosa-plugins/log/addons/logview/gosa_log_contents.tpl | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/log/addons/logview/class_gosa_logview.inc b/gosa-plugins/log/addons/logview/class_gosa_logview.inc index 0c6b0e515..d5b08b878 100644 --- a/gosa-plugins/log/addons/logview/class_gosa_logview.inc +++ b/gosa-plugins/log/addons/logview/class_gosa_logview.inc @@ -104,18 +104,20 @@ class gosa_logview extends plugin $smarty->assign("mode4", ""); $smarty->assign("mode5", ""); $smarty->assign("mode6", ""); + $smarty->assign("server_count",(isset($this->config->data['SERVERS']['LOGGING'])) && count($this->config->data['SERVERS']['LOGGING'])); /* Assign select option content */ foreach( array("server", "action", "time", "regex") as $type){ $smarty->assign("$type", $this->$type); } + + /**** * Check if defined servers * and mysql extension ****/ - if (!isset($this->config->data['SERVERS']['LOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){ - msg_dialog::display(_("Warning"), msgPool::noserver("GOsa log"), WARNING_DIALOG); + if (!isset($this->config->data['SERVERS']['LidOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){ $smarty->assign("servers", array()); return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } diff --git a/gosa-plugins/log/addons/logview/class_logview.inc b/gosa-plugins/log/addons/logview/class_logview.inc index 56d1beca1..5d55711c6 100644 --- a/gosa-plugins/log/addons/logview/class_logview.inc +++ b/gosa-plugins/log/addons/logview/class_logview.inc @@ -68,7 +68,7 @@ class logview extends plugin $smarty->assign("mode1", ""); $smarty->assign("mode2", ""); $smarty->assign("mode3", ""); - $smarty->assign("server_count", isset($this->config->data['SERVERS']['LOG'])); + $smarty->assign("server_count",(isset($this->config->data['SERVERS']['LOG'])) && count($this->config->data['SERVERS']['LOG'])); /* Assign select option content */ foreach( array("host", "log_level", "time", "regex") as $type){ diff --git a/gosa-plugins/log/addons/logview/gosa_log_contents.tpl b/gosa-plugins/log/addons/logview/gosa_log_contents.tpl index 5d71d8103..0e27553e7 100644 --- a/gosa-plugins/log/addons/logview/gosa_log_contents.tpl +++ b/gosa-plugins/log/addons/logview/gosa_log_contents.tpl @@ -96,7 +96,11 @@ {else} + {if $server_count} {t}Search returned no results...{/t} + {else} + {msgPool type=noserver p1='GOsa Log'} + {/if} {/if} -- 2.30.2