Added new errors label in build "Errors" tab.

This commit is contained in:
Dmitry Khomutov 2017-12-09 22:04:34 +07:00
commit 13f763c9e2
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
9 changed files with 186 additions and 18 deletions

View file

@ -40,6 +40,8 @@ class BuildError extends Model
'severity' => null,
'message' => null,
'create_date' => null,
'hash' => null,
'is_new' => null,
];
/**
@ -56,6 +58,8 @@ class BuildError extends Model
'severity' => 'getSeverity',
'message' => 'getMessage',
'create_date' => 'getCreateDate',
'hash' => 'getHash',
'is_new' => 'getIsNew',
// Foreign key getters:
'Build' => 'getBuild',
@ -75,6 +79,8 @@ class BuildError extends Model
'severity' => 'setSeverity',
'message' => 'setMessage',
'create_date' => 'setCreateDate',
'hash' => 'setHash',
'is_new' => 'setIsNew',
// Foreign key setters:
'Build' => 'setBuild',
@ -174,6 +180,26 @@ class BuildError extends Model
return $rtn;
}
/**
* @return string
*/
public function getHash()
{
$rtn = (string)$this->data['hash'];
return $rtn;
}
/**
* @return string
*/
public function getIsNew()
{
$rtn = $this->data['is_new'];
return $rtn;
}
/**
* @param $value int
*/
@ -324,6 +350,40 @@ class BuildError extends Model
$this->setModified('create_date');
}
/**
* @param $value string
*/
public function setHash($value)
{
$this->validateNotNull('hash', $value);
$this->validateString('hash', $value);
if ($this->data['hash'] === $value) {
return;
}
$this->data['hash'] = $value;
$this->setModified('hash');
}
/**
* @param $value int
*/
public function setIsNew($value)
{
$this->validateNotNull('is_new', $value);
$this->validateInt('is_new', $value);
if ($this->data['is_new'] === $value) {
return;
}
$this->data['is_new'] = $value;
$this->setModified('is_new');
}
/**
* Get the Build model for this BuildError by Id.
*
@ -425,6 +485,21 @@ class BuildError extends Model
}
}
/**
* @param string $plugin
* @param string $file
* @param integer $lineStart
* @param integer $lineEnd
* @param integer $severity
* @param string $message
*
* @return string
*/
public static function generateHash($plugin, $file, $lineStart, $lineEnd, $severity, $message)
{
return md5($plugin . $file . $lineStart . $lineEnd . $severity . $message);
}
/**
* Get the class to apply to HTML elements representing this error.
*