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