Big update: New way of storing build errors, updated UI, AdminLTE 2, fixes, etc.
This commit is contained in:
parent
9c7a1c7907
commit
7f823b37cf
821 changed files with 164244 additions and 19321 deletions
55
PHPCI/Model/BuildError.php
Normal file
55
PHPCI/Model/BuildError.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* BuildError model for table: build_error
|
||||
*/
|
||||
|
||||
namespace PHPCI\Model;
|
||||
|
||||
use PHPCI\Model\Base\BuildErrorBase;
|
||||
|
||||
/**
|
||||
* BuildError Model
|
||||
* @uses PHPCI\Model\Base\BuildErrorBase
|
||||
*/
|
||||
class BuildError extends BuildErrorBase
|
||||
{
|
||||
const SEVERITY_CRITICAL = 0;
|
||||
const SEVERITY_HIGH = 1;
|
||||
const SEVERITY_NORMAL = 2;
|
||||
const SEVERITY_LOW = 3;
|
||||
|
||||
public function getSeverityString()
|
||||
{
|
||||
switch ($this->getSeverity()) {
|
||||
case self::SEVERITY_CRITICAL:
|
||||
return 'critical';
|
||||
|
||||
case self::SEVERITY_HIGH:
|
||||
return 'high';
|
||||
|
||||
case self::SEVERITY_NORMAL:
|
||||
return 'normal';
|
||||
|
||||
case self::SEVERITY_LOW:
|
||||
return 'low';
|
||||
}
|
||||
}
|
||||
|
||||
public function getSeverityClass()
|
||||
{
|
||||
switch ($this->getSeverity()) {
|
||||
case self::SEVERITY_CRITICAL:
|
||||
return 'danger';
|
||||
|
||||
case self::SEVERITY_HIGH:
|
||||
return 'warning';
|
||||
|
||||
case self::SEVERITY_NORMAL:
|
||||
return 'info';
|
||||
|
||||
case self::SEVERITY_LOW:
|
||||
return 'default';
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue