Use lang to lookup the status of components and incidents

This commit is contained in:
James Brooks
2014-11-25 09:18:22 +00:00
parent 8736db957c
commit 3ba9db5d24
4 changed files with 22 additions and 12 deletions

10
app/lang/en/component.php Normal file
View 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
View File

@@ -0,0 +1,10 @@
<?php
return array(
'status' => array(
1 => 'Investigating',
2 => 'Identified',
3 => 'Watching',
4 => 'Fixed'
)
);

View File

@@ -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);
}
/**

View File

@@ -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);
}
/**