Add "Unknown" status to the available component statuses
This commit is contained in:
@@ -70,7 +70,7 @@ final class AddComponentCommand
|
|||||||
public $rules = [
|
public $rules = [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
'description' => 'required|string',
|
'description' => 'required|string',
|
||||||
'status' => 'required|int|min:1|max:4',
|
'status' => 'required|int|min:0|max:4',
|
||||||
'link' => 'nullable|url',
|
'link' => 'nullable|url',
|
||||||
'order' => 'nullable|int',
|
'order' => 'nullable|int',
|
||||||
'group_id' => 'nullable|int',
|
'group_id' => 'nullable|int',
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ final class UpdateComponentCommand
|
|||||||
public $rules = [
|
public $rules = [
|
||||||
'name' => 'nullable|string',
|
'name' => 'nullable|string',
|
||||||
'description' => 'nullable|string',
|
'description' => 'nullable|string',
|
||||||
'status' => 'nullable|int|min:1|max:4',
|
'status' => 'nullable|int|min:0|max:4',
|
||||||
'link' => 'nullable|url',
|
'link' => 'nullable|url',
|
||||||
'order' => 'nullable|int',
|
'order' => 'nullable|int',
|
||||||
'group_id' => 'nullable|int',
|
'group_id' => 'nullable|int',
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ final class ReportIncidentCommand
|
|||||||
'message' => 'required|string',
|
'message' => 'required|string',
|
||||||
'visible' => 'nullable|bool',
|
'visible' => 'nullable|bool',
|
||||||
'component_id' => 'nullable|required_with:component_status|int',
|
'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',
|
'notify' => 'nullable|bool',
|
||||||
'stickied' => 'required|bool',
|
'stickied' => 'required|bool',
|
||||||
'incident_date' => 'nullable|string',
|
'incident_date' => 'nullable|string',
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ final class UpdateIncidentCommand
|
|||||||
'message' => 'nullable|string',
|
'message' => 'nullable|string',
|
||||||
'visible' => 'nullable|bool',
|
'visible' => 'nullable|bool',
|
||||||
'component_id' => 'nullable|int',
|
'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',
|
'notify' => 'nullable|bool',
|
||||||
'stickied' => 'nullable|bool',
|
'stickied' => 'nullable|bool',
|
||||||
'template' => 'nullable|string',
|
'template' => 'nullable|string',
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class ThemeComposer
|
|||||||
$view->withThemeGreens($this->config->get('setting.style_greens', '#7ED321'));
|
$view->withThemeGreens($this->config->get('setting.style_greens', '#7ED321'));
|
||||||
$view->withThemeYellows($this->config->get('setting.style_yellows', '#F7CA18'));
|
$view->withThemeYellows($this->config->get('setting.style_yellows', '#F7CA18'));
|
||||||
$view->withThemeOranges($this->config->get('setting.style_oranges', '#FF8800'));
|
$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->withThemeMetrics($this->config->get('setting.style_metrics', '#0dccc0'));
|
||||||
$view->withThemeLinks($this->config->get('setting.style_links', '#7ED321'));
|
$view->withThemeLinks($this->config->get('setting.style_links', '#7ED321'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class ComponentPresenter extends BasePresenter implements Arrayable
|
|||||||
public function status_color()
|
public function status_color()
|
||||||
{
|
{
|
||||||
switch ($this->wrappedObject->status) {
|
switch ($this->wrappedObject->status) {
|
||||||
|
case 0:
|
||||||
|
return 'greys';
|
||||||
case 1:
|
case 1:
|
||||||
return 'greens';
|
return 'greens';
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ return [
|
|||||||
'components' => [
|
'components' => [
|
||||||
'last_updated' => 'Last updated :timestamp',
|
'last_updated' => 'Last updated :timestamp',
|
||||||
'status' => [
|
'status' => [
|
||||||
|
0 => 'Unknown',
|
||||||
1 => 'Operational',
|
1 => 'Operational',
|
||||||
2 => 'Performance Issues',
|
2 => 'Performance Issues',
|
||||||
3 => 'Partial Outage',
|
3 => 'Partial Outage',
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ p, strong { color: {{ $theme_text_color }} !important; }
|
|||||||
.greens { color: {{ $theme_greens }} !important; }
|
.greens { color: {{ $theme_greens }} !important; }
|
||||||
.yellows { color: {{ $theme_yellows }} !important; }
|
.yellows { color: {{ $theme_yellows }} !important; }
|
||||||
.oranges { color: {{ $theme_oranges }} !important; }
|
.oranges { color: {{ $theme_oranges }} !important; }
|
||||||
|
.greys { color: {{ $theme_greys }} !important; }
|
||||||
.metrics { color: {{ $theme_metrics }} !important; }
|
.metrics { color: {{ $theme_metrics }} !important; }
|
||||||
.links { color: {{ $theme_links }} !important; }
|
.links { color: {{ $theme_links }} !important; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user