Skip to content

Commit a8307fa

Browse files
authored
Merge pull request #2194 from nicolasfagotti/noDataAvailableStatus
No data available status
2 parents 196eba7 + b223da9 commit a8307fa

File tree

8 files changed

+9
-4
lines changed

8 files changed

+9
-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' => 'required|string',
73-
'status' => 'required|int|min:1|max:4',
73+
'status' => 'required|int|min:0|max:4',
7474
'link' => 'nullable|url',
7575
'order' => 'nullable|int',
7676
'group_id' => 'nullable|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' => 'nullable|string',
8181
'description' => 'nullable|string',
82-
'status' => 'nullable|int|min:1|max:4',
82+
'status' => 'nullable|int|min:0|max:4',
8383
'link' => 'nullable|url',
8484
'order' => 'nullable|int',
8585
'group_id' => 'nullable|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' => 'required|string',
108108
'visible' => 'nullable|bool',
109109
'component_id' => 'nullable|required_with:component_status|int',
110-
'component_status' => 'nullable|required_with:component_id|int|min:1|max:4',
110+
'component_status' => 'nullable|required_with:component_id|int|min:0|max:4',
111111
'notify' => 'nullable|bool',
112112
'stickied' => 'required|bool',
113113
'incident_date' => 'nullable|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' => 'nullable|string',
111111
'visible' => 'nullable|bool',
112112
'component_id' => 'nullable|int',
113-
'component_status' => 'nullable|int|min:1|max:4|required_with:component_id',
113+
'component_status' => 'nullable|int|min:0|max:4|required_with:component_id',
114114
'notify' => 'nullable|bool',
115115
'stickied' => 'nullable|bool',
116116
'template' => 'nullable|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

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class ComponentPresenter extends BasePresenter implements Arrayable
2929
public function status_color()
3030
{
3131
switch ($this->wrappedObject->status) {
32+
case 0:
33+
return 'greys';
3234
case 1:
3335
return 'greens';
3436
case 2:

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)