diff --git a/app/Integrations/Core/System.php b/app/Integrations/Core/System.php index 87afeafcc3a4..139a1e9a320b 100644 --- a/app/Integrations/Core/System.php +++ b/app/Integrations/Core/System.php @@ -64,7 +64,8 @@ public function getStatus() $totalComponents = Component::enabled()->authenticated($includePrivate)->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 $status = [ diff --git a/resources/lang/en/forms.php b/resources/lang/en/forms.php index f5a1187751b8..47a1a3e770dc 100644 --- a/resources/lang/en/forms.php +++ b/resources/lang/en/forms.php @@ -154,6 +154,7 @@ 'about-this-page' => 'About this page', 'days-of-incidents' => 'How many days of incidents to show?', 'time_before_refresh' => 'Status page refresh rate (in seconds)', + 'major_outage_rate' => 'Major outage threshold (in %)', 'banner' => 'Banner Image', 'banner-help' => "It's recommended that you upload files no bigger than 930px wide", 'subscribers' => 'Allow people to signup to email notifications?', diff --git a/resources/views/dashboard/settings/app-setup.blade.php b/resources/views/dashboard/settings/app-setup.blade.php index 7238aeafd21b..6c15a1b1a91f 100644 --- a/resources/views/dashboard/settings/app-setup.blade.php +++ b/resources/views/dashboard/settings/app-setup.blade.php @@ -57,6 +57,14 @@ +
+
+
+ + +
+
+