#804 (Continued) Fix for GetHilightClass (previous revision: 2952) was not sufficient + applied the same fix for GetIcon!

SVN:trunk[2968]
This commit is contained in:
Romain Quetiez
2013-10-29 15:55:00 +00:00
parent bc14ad9e80
commit d912e7f4fb
4 changed files with 25 additions and 47 deletions

View File

@@ -1336,14 +1336,12 @@
if ($iEscalationDeadline != null)
{
// A SLA is running
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
if ($ratio <= 0)
$oTTOStopWatch = $this->Get('tto');
if ($oTTOStopWatch->IsThresholdPassed(100))
{
$sIcon = self::MakeIconFromName('incident-escalated.png');
}
else if ($ratio <= 0.25)
else if ($oTTOStopWatch->IsThresholdPassed(75))
{
$sIcon = self::MakeIconFromName('incident-deadline.png');
}
@@ -1356,24 +1354,18 @@
if ($iEscalationDeadline != null)
{
// A SLA is running
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
if ($ratio <= 0)
$oTTRStopWatch = $this->Get('ttr');
if ($oTTRStopWatch->IsThresholdPassed(100))
{
$sIcon = self::MakeIconFromName('incident-escalated.png');
}
else if ($ratio <= 0.25)
else if ($oTTRStopWatch->IsThresholdPassed(75))
{
$sIcon = self::MakeIconFromName('incident-deadline.png');
}
}
break;
default:
$sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
}