Show an alert when ./bootstrap/cachet is not writeable.

This commit is contained in:
James Brooks
2016-11-25 20:19:38 +00:00
parent 529ea726b6
commit c9c592b033
3 changed files with 15 additions and 1 deletions

View File

@@ -40,5 +40,6 @@ class DashboardComposer
$view->withIncidentTemplateCount(IncidentTemplate::count());
$view->withScheduleCount(Schedule::count());
$view->withSubscriberCount(Subscriber::isVerified()->count());
$view->withIsWriteable(is_writeable(app()->bootstrapPath().'/cachet'));
}
}

View File

@@ -11,7 +11,8 @@
return [
'dashboard' => 'Dashboard',
'dashboard' => 'Dashboard',
'writeable_settings' => 'The Cachet settings directory is not writeable. Please make sure that <code>./bootstrap/cachet</code> is writeable by the web server.',
// Incidents
'incidents' => [

View File

@@ -41,6 +41,18 @@
<div class="wrapper">
@include('dashboard.partials.sidebar')
<div class="page-content">
@if(!$is_writeable)
<div class="content-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="alert alert-info">
{!! trans('dashboard.writeable_settings') !!}
</div>
</div>
</div>
</div>
@endif
@yield('content')
</div>
</div>