Fix type/HTML error in HistoryColorGrid
This commit is contained in:
parent
6286e15441
commit
e4540a2cf3
|
@ -31,15 +31,15 @@ namespace Icinga\Web\Widget\Chart;
|
|||
|
||||
use Icinga\Util\DateTimeFactory;
|
||||
use Icinga\Util\Color;
|
||||
use Icinga\Web\Widget\Widget;
|
||||
use \DateInterval;
|
||||
use \Zend_View_Abstract;
|
||||
use Icinga\Web\Widget\AbstractWidget;
|
||||
use DateInterval;
|
||||
use Zend_View_Abstract;
|
||||
|
||||
/**
|
||||
* Display a colored grid that visualizes a set of values for each day
|
||||
* on a given time-frame.
|
||||
*/
|
||||
class HistoryColorGrid implements Widget {
|
||||
class HistoryColorGrid extends AbstractWidget {
|
||||
|
||||
const ORIENTATION_VERTICAL = 'vertical';
|
||||
|
||||
|
@ -130,13 +130,13 @@ class HistoryColorGrid implements Widget {
|
|||
$entry = $this->data[$day];
|
||||
return'<a ' .
|
||||
'style="background-color:' . $this->calculateColor($entry['value']) . ';" ' .
|
||||
'title="' . $entry['caption'] . '"; ' .
|
||||
'title="' . $entry['caption'] . '" ' .
|
||||
'href="' . $entry['url'] . '"' .
|
||||
'></a>';
|
||||
'> </a>';
|
||||
} else {
|
||||
return '<a ' .
|
||||
'style="background-color:' . $this->calculateColor(0) . ';" ' .
|
||||
'title="No entries for ' . $day . '"; ' .
|
||||
'title="No entries for ' . $day . '" ' .
|
||||
'></a>';
|
||||
}
|
||||
}
|
||||
|
@ -344,4 +344,4 @@ class HistoryColorGrid implements Widget {
|
|||
}
|
||||
return $this->renderVertical($grid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue