mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
#1144 Audit category having no rule -> PHP notices when showing the report + improved the behavior when the OQL of a rule is wrong.
SVN:trunk[3742]
This commit is contained in:
@@ -310,11 +310,10 @@ try
|
||||
}
|
||||
}
|
||||
$aResults[] = $aRow;
|
||||
$iTotalErrors = count($aObjectsWithErrors);
|
||||
$sOverallPercentOk = ($iCount == 0) ? '100.00' : sprintf('%.2f', 100.0 * (($iCount - $iTotalErrors) / $iCount));
|
||||
$sClass = GetReportColor($iCount, $iTotalErrors);
|
||||
|
||||
}
|
||||
$iTotalErrors = count($aObjectsWithErrors);
|
||||
$sOverallPercentOk = ($iCount == 0) ? '100.00' : sprintf('%.2f', 100.0 * (($iCount - $iTotalErrors) / $iCount));
|
||||
$sClass = GetReportColor($iCount, $iTotalErrors);
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
@@ -326,6 +325,10 @@ try
|
||||
$sMessage = Dict::Format('UI:Audit:ErrorIn_Category_Reason', $oAuditCategory->GetHyperlink(), $e->getMessage());
|
||||
$oP->p("<img style=\"vertical-align:middle\" src=\"../images/stop-mid.png\"/> ".$sMessage);
|
||||
$aResults[] = $aRow;
|
||||
|
||||
$sClass = 'red';
|
||||
$iTotalErrors = 'n/a';
|
||||
$sOverallPercentOk = '';
|
||||
}
|
||||
$oP->add("<tr>\n");
|
||||
$oP->add("<th><img src=\"../images/minus.gif\"></th><th class=\"alignLeft\">".$oAuditCategory->GetName()."</th><th class=\"alignRight\">$iCount</th><th class=\"alignRight\">$iTotalErrors</th><th class=\"alignRight $sClass\">$sOverallPercentOk %</th>\n");
|
||||
|
||||
Reference in New Issue
Block a user