DeploymentLogTable: fix PostgreSQL issue with...

...binary value, it returns a resource instead of the real value

fixes #1026
This commit is contained in:
Thomas Gelf 2017-07-21 12:10:01 +02:00
parent b8a953e296
commit 8e7022258f
1 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,8 @@ use ipl\Web\Table\ZfQueryBasedTable;
class DeploymentLogTable extends ZfQueryBasedTable
{
use DbHelper;
protected $activeStageName;
public function setActiveStageName($name)
@ -18,14 +20,13 @@ class DeploymentLogTable extends ZfQueryBasedTable
public function assemble()
{
$this->attributes()->add('class', 'deployment-log');
parent::assemble();
}
public function renderRow($row)
{
$this->splitByDay($row->start_time);
$shortSum = substr(bin2hex($row->config_checksum), 0, 7);
$shortSum = $this->getShortChecksum($row->config_checksum);
$tr = $this::tr([
$this::td(Link::create(
[$row->peer_identity, " ($shortSum)"],
@ -38,6 +39,11 @@ class DeploymentLogTable extends ZfQueryBasedTable
return $tr;
}
protected function getShortChecksum($checksum)
{
return substr(bin2hex($this->wantBinaryValue($checksum)), 0, 7);
}
protected function getMyRowClasses($row)
{
if ($row->startup_succeeded === 'y') {