Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 73f4920

Browse files
committedOct 21, 2016
Add "Unknown" status to the available component statuses
1 parent d0dbf27 commit 73f4920

File tree

8 files changed

+8
-4
lines changed

8 files changed

+8
-4
lines changed
 

‎app/Bus/Commands/Component/AddComponentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ final class AddComponentCommand
7070
public $rules = [
7171
'name' => 'required|string',
7272
'description' => 'string',
73-
'status' => 'int|min:1|max:4',
73+
'status' => 'int|min:0|max:4',
7474
'link' => 'url',
7575
'order' => 'int',
7676
'group_id' => 'int',

‎app/Bus/Commands/Component/UpdateComponentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ final class UpdateComponentCommand
7979
public $rules = [
8080
'name' => 'string',
8181
'description' => 'string',
82-
'status' => 'int|min:1|max:4',
82+
'status' => 'int|min:0|max:4',
8383
'link' => 'url',
8484
'order' => 'int',
8585
'group_id' => 'int',

‎app/Bus/Commands/Incident/ReportIncidentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ final class ReportIncidentCommand
107107
'message' => 'string',
108108
'visible' => 'bool',
109109
'component_id' => 'int|required_with:component_status',
110-
'component_status' => 'int|min:1|max:4|required_with:component_id',
110+
'component_status' => 'int|min:0|max:4|required_with:component_id',
111111
'notify' => 'bool',
112112
'stickied' => 'bool',
113113
'incident_date' => 'string',

‎app/Bus/Commands/Incident/UpdateIncidentCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ final class UpdateIncidentCommand
110110
'message' => 'string',
111111
'visible' => 'bool',
112112
'component_id' => 'int',
113-
'component_status' => 'int|min:1|max:4|required_with:component_id',
113+
'component_status' => 'int|min:0|max:4|required_with:component_id',
114114
'notify' => 'bool',
115115
'stickied' => 'bool',
116116
'template' => 'string',

‎app/Composers/ThemeComposer.php

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function compose(View $view)
6161
$view->withThemeGreens($this->config->get('setting.style_greens', '#7ED321'));
6262
$view->withThemeYellows($this->config->get('setting.style_yellows', '#F7CA18'));
6363
$view->withThemeOranges($this->config->get('setting.style_oranges', '#FF8800'));
64+
$view->withThemeGreys($this->config->get('setting.style_greys', '#888888'));
6465
$view->withThemeMetrics($this->config->get('setting.style_metrics', '#0dccc0'));
6566
$view->withThemeLinks($this->config->get('setting.style_links', '#7ED321'));
6667
}

‎app/Presenters/ComponentPresenter.php

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class ComponentPresenter extends BasePresenter implements Arrayable
2929
public function status_color()
3030
{
3131
switch ($this->wrappedObject->status) {
32+
case 0: return 'greys';
3233
case 1: return 'greens';
3334
case 2: return 'blues';
3435
case 3: return 'yellows';

‎resources/lang/en/cachet.php

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
'components' => [
1515
'last_updated' => 'Last updated :timestamp',
1616
'status' => [
17+
0 => 'Unknown',
1718
1 => 'Operational',
1819
2 => 'Performance Issues',
1920
3 => 'Partial Outage',

‎resources/views/partials/stylesheet.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
.greens { color: {{ $theme_greens }} !important; }
1313
.yellows { color: {{ $theme_yellows }} !important; }
1414
.oranges { color: {{ $theme_oranges }} !important; }
15+
.greys { color: {{ $theme_greys }} !important; }
1516
.metrics { color: {{ $theme_metrics }} !important; }
1617
.links { color: {{ $theme_links }} !important; }
1718

0 commit comments

Comments
 (0)