Merge pull request #2136 from CachetHQ/only-disrupted-days
Option to only show disrupted days. Closes #2088
This commit is contained in:
@@ -78,5 +78,6 @@ class AppComposer
|
||||
$view->withTimezone($this->dates->getTimezone());
|
||||
$view->withSiteTitle($this->config->get('setting.app_name'));
|
||||
$view->withFontSubset($this->config->get('langs.'.$this->config->get('app.locale').'.subset', 'latin'));
|
||||
$view->withOnlyDisruptedDays($this->config->get('setting.only_disrupted_days'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,11 +90,13 @@ class StatusPageController extends AbstractApiController
|
||||
});
|
||||
|
||||
// Add in days that have no incidents
|
||||
foreach ($incidentDays as $i) {
|
||||
$date = app(DateFactory::class)->make($startDate)->subDays($i);
|
||||
if (Config::get('setting.only_disrupted_days') === false) {
|
||||
foreach ($incidentDays as $i) {
|
||||
$date = app(DateFactory::class)->make($startDate)->subDays($i);
|
||||
|
||||
if (!isset($allIncidents[$date->toDateString()])) {
|
||||
$allIncidents[$date->toDateString()] = [];
|
||||
if (!isset($allIncidents[$date->toDateString()])) {
|
||||
$allIncidents[$date->toDateString()] = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user