diff --git a/app/Bus/Commands/Component/AddComponentCommand.php b/app/Bus/Commands/Component/AddComponentCommand.php index f5d94e3fbcc2..b564300aa9cb 100644 --- a/app/Bus/Commands/Component/AddComponentCommand.php +++ b/app/Bus/Commands/Component/AddComponentCommand.php @@ -70,7 +70,7 @@ final class AddComponentCommand public $rules = [ 'name' => 'required|string', 'description' => 'required|string', - 'status' => 'required|int|min:1|max:4', + 'status' => 'required|int|min:0|max:4', 'link' => 'nullable|url', 'order' => 'nullable|int', 'group_id' => 'nullable|int', diff --git a/app/Bus/Commands/Component/UpdateComponentCommand.php b/app/Bus/Commands/Component/UpdateComponentCommand.php index ac5bde0a2ea2..d01458668851 100644 --- a/app/Bus/Commands/Component/UpdateComponentCommand.php +++ b/app/Bus/Commands/Component/UpdateComponentCommand.php @@ -79,7 +79,7 @@ final class UpdateComponentCommand public $rules = [ 'name' => 'nullable|string', 'description' => 'nullable|string', - 'status' => 'nullable|int|min:1|max:4', + 'status' => 'nullable|int|min:0|max:4', 'link' => 'nullable|url', 'order' => 'nullable|int', 'group_id' => 'nullable|int', diff --git a/app/Bus/Commands/Incident/ReportIncidentCommand.php b/app/Bus/Commands/Incident/ReportIncidentCommand.php index 97ce4efbf72c..d74df68e5eb3 100644 --- a/app/Bus/Commands/Incident/ReportIncidentCommand.php +++ b/app/Bus/Commands/Incident/ReportIncidentCommand.php @@ -107,7 +107,7 @@ final class ReportIncidentCommand 'message' => 'required|string', 'visible' => 'nullable|bool', 'component_id' => 'nullable|required_with:component_status|int', - 'component_status' => 'nullable|required_with:component_id|int|min:1|max:4', + 'component_status' => 'nullable|required_with:component_id|int|min:0|max:4', 'notify' => 'nullable|bool', 'stickied' => 'required|bool', 'incident_date' => 'nullable|string', diff --git a/app/Bus/Commands/Incident/UpdateIncidentCommand.php b/app/Bus/Commands/Incident/UpdateIncidentCommand.php index 42ca40c831ae..e9fd1a404c40 100644 --- a/app/Bus/Commands/Incident/UpdateIncidentCommand.php +++ b/app/Bus/Commands/Incident/UpdateIncidentCommand.php @@ -110,7 +110,7 @@ final class UpdateIncidentCommand 'message' => 'nullable|string', 'visible' => 'nullable|bool', 'component_id' => 'nullable|int', - 'component_status' => 'nullable|int|min:1|max:4|required_with:component_id', + 'component_status' => 'nullable|int|min:0|max:4|required_with:component_id', 'notify' => 'nullable|bool', 'stickied' => 'nullable|bool', 'template' => 'nullable|string', diff --git a/app/Composers/ThemeComposer.php b/app/Composers/ThemeComposer.php index b4c6c07ea125..852f3162085c 100644 --- a/app/Composers/ThemeComposer.php +++ b/app/Composers/ThemeComposer.php @@ -61,6 +61,7 @@ public function compose(View $view) $view->withThemeGreens($this->config->get('setting.style_greens', '#7ED321')); $view->withThemeYellows($this->config->get('setting.style_yellows', '#F7CA18')); $view->withThemeOranges($this->config->get('setting.style_oranges', '#FF8800')); + $view->withThemeGreys($this->config->get('setting.style_greys', '#888888')); $view->withThemeMetrics($this->config->get('setting.style_metrics', '#0dccc0')); $view->withThemeLinks($this->config->get('setting.style_links', '#7ED321')); } diff --git a/app/Presenters/ComponentPresenter.php b/app/Presenters/ComponentPresenter.php index 2159953383ab..99fbbf5d1d6f 100644 --- a/app/Presenters/ComponentPresenter.php +++ b/app/Presenters/ComponentPresenter.php @@ -29,6 +29,8 @@ class ComponentPresenter extends BasePresenter implements Arrayable public function status_color() { switch ($this->wrappedObject->status) { + case 0: + return 'greys'; case 1: return 'greens'; case 2: diff --git a/resources/lang/en/cachet.php b/resources/lang/en/cachet.php index d883a4b6cc68..d7eeb8e0fb27 100644 --- a/resources/lang/en/cachet.php +++ b/resources/lang/en/cachet.php @@ -14,6 +14,7 @@ 'components' => [ 'last_updated' => 'Last updated :timestamp', 'status' => [ + 0 => 'Unknown', 1 => 'Operational', 2 => 'Performance Issues', 3 => 'Partial Outage', diff --git a/resources/views/partials/stylesheet.blade.php b/resources/views/partials/stylesheet.blade.php index 94e540ae4fe4..7c438adf8579 100644 --- a/resources/views/partials/stylesheet.blade.php +++ b/resources/views/partials/stylesheet.blade.php @@ -12,6 +12,7 @@ .greens { color: {{ $theme_greens }} !important; } .yellows { color: {{ $theme_yellows }} !important; } .oranges { color: {{ $theme_oranges }} !important; } +.greys { color: {{ $theme_greys }} !important; } .metrics { color: {{ $theme_metrics }} !important; } .links { color: {{ $theme_links }} !important; }