Add "Unknown" status to the available component statuses
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user