Use lang to lookup the status of components and incidents
This commit is contained in:
10
app/lang/en/component.php
Normal file
10
app/lang/en/component.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'status' => array(
|
||||
1 => 'Operational',
|
||||
2 => 'Performance Issues',
|
||||
3 => 'Partial Outage',
|
||||
4 => 'Major Outage'
|
||||
)
|
||||
);
|
||||
10
app/lang/en/incident.php
Normal file
10
app/lang/en/incident.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'status' => array(
|
||||
1 => 'Investigating',
|
||||
2 => 'Identified',
|
||||
3 => 'Watching',
|
||||
4 => 'Fixed'
|
||||
)
|
||||
);
|
||||
@@ -14,12 +14,7 @@
|
||||
* @return string
|
||||
*/
|
||||
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';
|
||||
}
|
||||
return Lang::get('component.status.' . $this->status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,12 +14,7 @@
|
||||
* @return string
|
||||
*/
|
||||
public function getHumanStatusAttribute() {
|
||||
switch ($this->status) {
|
||||
case 1: return 'Investigating';
|
||||
case 2: return 'Identified';
|
||||
case 3: return 'Watching';
|
||||
case 4: return 'Fixed';
|
||||
}
|
||||
return Lang::get('incident.status' . $this->status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user