Add rate setting for major outage
Major outage criteria depends on required service level. Default value keeps 50% because it had been fixed to 50%.
This commit is contained in:
@@ -64,7 +64,8 @@ class System implements SystemContract
|
|||||||
|
|
||||||
$totalComponents = Component::enabled()->authenticated($includePrivate)->count();
|
$totalComponents = Component::enabled()->authenticated($includePrivate)->count();
|
||||||
$majorOutages = Component::enabled()->authenticated($includePrivate)->status(4)->count();
|
$majorOutages = Component::enabled()->authenticated($includePrivate)->status(4)->count();
|
||||||
$isMajorOutage = $totalComponents ? ($majorOutages / $totalComponents) >= 0.5 : false;
|
$majorOutageRate = (int) $this->config->get('setting.major_outage_rate', '50');
|
||||||
|
$isMajorOutage = $totalComponents ? ($majorOutages / $totalComponents)*100 >= $majorOutageRate : false;
|
||||||
|
|
||||||
// Default data
|
// Default data
|
||||||
$status = [
|
$status = [
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ return [
|
|||||||
'about-this-page' => 'About this page',
|
'about-this-page' => 'About this page',
|
||||||
'days-of-incidents' => 'How many days of incidents to show?',
|
'days-of-incidents' => 'How many days of incidents to show?',
|
||||||
'time_before_refresh' => 'Status page refresh rate (in seconds)',
|
'time_before_refresh' => 'Status page refresh rate (in seconds)',
|
||||||
|
'major_outage_rate' => 'Major outage threshold (in %)',
|
||||||
'banner' => 'Banner Image',
|
'banner' => 'Banner Image',
|
||||||
'banner-help' => "It's recommended that you upload files no bigger than 930px wide",
|
'banner-help' => "It's recommended that you upload files no bigger than 930px wide",
|
||||||
'subscribers' => 'Allow people to signup to email notifications?',
|
'subscribers' => 'Allow people to signup to email notifications?',
|
||||||
|
|||||||
@@ -57,6 +57,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.settings.app-setup.major_outage_rate') }}</label>
|
||||||
|
<input type="number" name="major_outage_rate" class="form-control" value="{{ Config::get('setting.major_outage_rate', 50) }}" placeholder="{{ trans('forms.settings.app-setup.major_outage_rate') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|||||||
Reference in New Issue
Block a user