diff --git a/app/Bus/Commands/Component/AddComponentCommand.php b/app/Bus/Commands/Component/AddComponentCommand.php index f5d94e3f..b564300a 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 ac5bde0a..d0145866 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 97ce4efb..d74df68e 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 42ca40c8..e9fd1a40 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 b4c6c07e..852f3162 100644 --- a/app/Composers/ThemeComposer.php +++ b/app/Composers/ThemeComposer.php @@ -61,6 +61,7 @@ class ThemeComposer $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 21599533..99fbbf5d 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 d883a4b6..d7eeb8e0 100644 --- a/resources/lang/en/cachet.php +++ b/resources/lang/en/cachet.php @@ -14,6 +14,7 @@ return [ '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 94e540ae..7c438adf 100644 --- a/resources/views/partials/stylesheet.blade.php +++ b/resources/views/partials/stylesheet.blade.php @@ -12,6 +12,7 @@ p, strong { color: {{ $theme_text_color }} !important; } .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; }