mirror of
https://github.com/cachethq/cachet.git
synced 2026-07-01 08:15:55 +00:00
22 lines
488 B
PHP
22 lines
488 B
PHP
<?php
|
|
|
|
class Component extends Eloquent {
|
|
public function getHumanStatusAttribute() {
|
|
switch ($this->status) {
|
|
case 1: return 'Operational';
|
|
case 2: return 'Performance Issues';
|
|
case 3: return 'Partial Outage';
|
|
case 4: return 'Major Outage';
|
|
}
|
|
}
|
|
|
|
public function getColorAttribute() {
|
|
switch ($this->status) {
|
|
case 1: return 'text-success';
|
|
case 2: return 'text-info';
|
|
case 3: return 'text-alert';
|
|
case 4: return 'text-danger';
|
|
}
|
|
}
|
|
}
|