mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
2009-06-10 Esteban Sanchez <estebans@artica.es>
* include/functions_reporting.php: Return false if no data were found on get_agentmodule_sla(). Fixes #2777541 * operation/reporting/reporting_viewer.php: Style correction. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1748 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3b1c24279e
commit
cc493cd64a
@ -1,3 +1,10 @@
|
|||||||
|
2009-06-10 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* include/functions_reporting.php: Return false if no data were found
|
||||||
|
on get_agentmodule_sla(). Fixes #2777541
|
||||||
|
|
||||||
|
* operation/reporting/reporting_viewer.php: Style correction.
|
||||||
|
|
||||||
2009-06-10 Esteban Sanchez <estebans@artica.es>
|
2009-06-10 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* godmode/modules/manage_network_templates_form.php: Applied
|
* godmode/modules/manage_network_templates_form.php: Applied
|
||||||
|
@ -28,7 +28,8 @@ require_once ($config["homedir"]."/include/functions_agents.php");
|
|||||||
* ignore max value
|
* ignore max value
|
||||||
* @param int Beginning date of the report in UNIX time (current date by default).
|
* @param int Beginning date of the report in UNIX time (current date by default).
|
||||||
*
|
*
|
||||||
* @return float SLA percentage of the requested module.
|
* @return float SLA percentage of the requested module. False if no data were
|
||||||
|
* found
|
||||||
*/
|
*/
|
||||||
function get_agentmodule_sla ($id_agentmodule, $period = 0, $min_value = 1, $max_value = false, $date = 0) {
|
function get_agentmodule_sla ($id_agentmodule, $period = 0, $min_value = 1, $max_value = false, $date = 0) {
|
||||||
if (empty ($date)) {
|
if (empty ($date)) {
|
||||||
@ -52,7 +53,7 @@ function get_agentmodule_sla ($id_agentmodule, $period = 0, $min_value = 1, $max
|
|||||||
|
|
||||||
if (empty ($total)) {
|
if (empty ($total)) {
|
||||||
//No data to calculate on so we return 100 (fail to good)
|
//No data to calculate on so we return 100 (fail to good)
|
||||||
return 100.0;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = sprintf ('SELECT COUNT(*)
|
$sql = sprintf ('SELECT COUNT(*)
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Login check
|
// Login check
|
||||||
require ("include/config.php");
|
require ("include/config.php");
|
||||||
|
|
||||||
@ -230,7 +228,7 @@ foreach ($contents as $content) {
|
|||||||
$data[0] .= '<strong>'.__('SLA Limit')."</strong> : ";
|
$data[0] .= '<strong>'.__('SLA Limit')."</strong> : ";
|
||||||
$data[0] .= $sla['sla_limit'];
|
$data[0] .= $sla['sla_limit'];
|
||||||
$sla_value = get_agentmodule_sla ($sla['id_agent_module'], $content['period'],
|
$sla_value = get_agentmodule_sla ($sla['id_agent_module'], $content['period'],
|
||||||
$sla['sla_min'], $sla['sla_max'], $datetime);
|
$sla['sla_min'], $sla['sla_max'], $datetime);
|
||||||
if ($sla_value === false) {
|
if ($sla_value === false) {
|
||||||
$data[1] = '<span style="font: bold 3em Arial, Sans-serif; color: #0000FF;">';
|
$data[1] = '<span style="font: bold 3em Arial, Sans-serif; color: #0000FF;">';
|
||||||
$data[1] .= __('Unknown');
|
$data[1] .= __('Unknown');
|
||||||
@ -513,5 +511,4 @@ foreach ($contents as $content) {
|
|||||||
print_table ($table);
|
print_table ($table);
|
||||||
flush ();
|
flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user