mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-18 05:58:18 +01:00
commit
b037965c35
@ -84,4 +84,17 @@ class StatusPageController extends Controller
|
||||
->withPreviousDate($startDate->copy()->subDays($daysToShow)->toDateString())
|
||||
->withNextDate($startDate->copy()->addDays($daysToShow)->toDateString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows an incident in more detail.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Incident $incident
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function showIncident(Incident $incident)
|
||||
{
|
||||
return View::make('incident')
|
||||
->withIncident($incident);
|
||||
}
|
||||
}
|
||||
|
@ -27,11 +27,19 @@ class StatusPageRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->get('/', [
|
||||
'middleware' => ['app.hasSetting', 'localize'],
|
||||
$router->group([
|
||||
'middleware' => 'app.hasSetting',
|
||||
'setting' => 'app_name',
|
||||
'as' => 'status-page',
|
||||
'uses' => 'StatusPageController@showIndex',
|
||||
]);
|
||||
], function ($router) {
|
||||
$router->get('/', [
|
||||
'as' => 'status-page',
|
||||
'uses' => 'StatusPageController@showIndex',
|
||||
]);
|
||||
|
||||
$router->get('incident/{incident}', [
|
||||
'as' => 'incident',
|
||||
'uses' => 'StatusPageController@showIncident',
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ class ComposerServiceProvider extends ServiceProvider
|
||||
$factory->composer('*', AppComposer::class);
|
||||
$factory->composer('*', CurrentUserComposer::class);
|
||||
$factory->composer(['index'], MetricsComposer::class);
|
||||
$factory->composer(['index', 'subscribe'], StatusPageComposer::class);
|
||||
$factory->composer(['index', 'subscribe'], ThemeComposer::class);
|
||||
$factory->composer(['index', 'incident', 'subscribe'], StatusPageComposer::class);
|
||||
$factory->composer(['index', 'incident', 'subscribe'], ThemeComposer::class);
|
||||
$factory->composer('dashboard.*', DashboardComposer::class);
|
||||
$factory->composer(['setup', 'dashboard.settings.app-setup'], TimezoneLocaleComposer::class);
|
||||
}
|
||||
|
15
public/build/dist/css/all-8ec09eab73.css
vendored
Executable file
15
public/build/dist/css/all-8ec09eab73.css
vendored
Executable file
File diff suppressed because one or more lines are too long
15
public/build/dist/css/all-d21a7e545f.css
vendored
15
public/build/dist/css/all-d21a7e545f.css
vendored
File diff suppressed because one or more lines are too long
0
public/build/dist/js/all-d557ec2d69.js
vendored
Normal file → Executable file
0
public/build/dist/js/all-d557ec2d69.js
vendored
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
{
|
||||
"dist/css/all.css": "dist/css/all-d21a7e545f.css",
|
||||
"dist/css/all.css": "dist/css/all-8ec09eab73.css",
|
||||
"dist/js/all.js": "dist/js/all-d557ec2d69.js"
|
||||
}
|
@ -16,6 +16,17 @@ body.status-page {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
box-sizing: border-box;
|
||||
|
||||
&.emoji {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
vertical-align: middle;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
.tooltip-inner {
|
||||
padding: 8px 12px;
|
||||
@ -231,17 +242,6 @@ body.status-page {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
box-sizing: border-box;
|
||||
|
||||
&.emoji {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
vertical-align: middle;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
48
resources/views/incident.blade.php
Normal file
48
resources/views/incident.blade.php
Normal file
@ -0,0 +1,48 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
<div class="pull-right">
|
||||
@if($subscribersEnabled)
|
||||
<p><a class="btn btn-success btn-outline" href="{{ route('subscribe.subscribe') }}">{{ trans('cachet.subscriber.button') }}</a></p>
|
||||
@endif
|
||||
<p><a class="btn btn-success btn-outline" href="/"><i class="ion-home"></i></a></p>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="section-messages">
|
||||
@include('dashboard.partials.errors')
|
||||
</div>
|
||||
|
||||
@if($bannerImage = Setting::get('app_banner'))
|
||||
<div class="row app-banner">
|
||||
<div class="col-md-12 text-center">
|
||||
<?php $bannerType = Setting::get('app_banner_type') ?>
|
||||
@if($app_url = Setting::get('app_domain'))
|
||||
<a href="{{ $app_url }}"><img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive"></a>
|
||||
@else
|
||||
<img src="data:{{ $bannerType }};base64, {{ $bannerImage}}" class="banner-image img-responsive">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4>{{ formatted_date($incident->created_at) }}</h4>
|
||||
|
||||
<div class="timeline">
|
||||
<div class="content-wrapper">
|
||||
<div class="moment first">
|
||||
<div class="row event clearfix">
|
||||
<div class="col-sm-1">
|
||||
<div class="status-icon status-{{ $incident->status }}" data-toggle="tooltip" title="{{ $incident->humanStatus }}" data-placement="left">
|
||||
<i class="{{ $incident->icon }}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-10 col-xs-offset-2 col-sm-11 col-sm-offset-0">
|
||||
@include('partials.incident', ['incident' => $incident, 'with_link' => false])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
25
resources/views/partials/incident.blade.php
Normal file
25
resources/views/partials/incident.blade.php
Normal file
@ -0,0 +1,25 @@
|
||||
<div class="panel panel-message">
|
||||
<div class="panel-heading">
|
||||
@if($current_user)
|
||||
<div class="pull-right btn-group">
|
||||
<a href="{{ route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
|
||||
<a href="{{ route('dashboard.incidents.delete', ['id' => $incident->id]) }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($incident->component)
|
||||
<span class="label label-default">{{ $incident->component->name }}</span>
|
||||
@endif
|
||||
<strong>{{ $incident->name }}</strong>{{ $incident->isScheduled ? trans("cachet.incidents.scheduled_at", ["timestamp" => $incident->scheduled_at_diff]) : null }}
|
||||
<br>
|
||||
<small class="date">
|
||||
@if($with_link)
|
||||
<a href="{{ route('incident', ['id' => $incident->id]) }}"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}"></abbr></a>
|
||||
@else
|
||||
<abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}"></abbr>
|
||||
@endif
|
||||
</small>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! $incident->formattedMessage !!}
|
||||
</div>
|
||||
</div>
|
@ -10,28 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-10 col-xs-offset-2 col-sm-11 col-sm-offset-0">
|
||||
<div class="panel panel-message">
|
||||
<div class="panel-heading">
|
||||
@if($current_user)
|
||||
<div class="pull-right btn-group">
|
||||
<a href="{{ route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
|
||||
<a href="{{ route('dashboard.incidents.delete', ['id' => $incident->id]) }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($incident->component)
|
||||
<span class="label label-default">{{ $incident->component->name }}</span>
|
||||
@endif
|
||||
<strong>{{ $incident->name }}</strong>{{ $incident->isScheduled ? trans("cachet.incidents.scheduled_at", ["timestamp" => $incident->scheduled_at_diff]) : null }}
|
||||
<br>
|
||||
<small class="date">
|
||||
<abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->created_at_formatted }}" data-timeago="{{ $incident->created_at_iso }}">
|
||||
</abbr>
|
||||
</small>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! $incident->formattedMessage !!}
|
||||
</div>
|
||||
</div>
|
||||
@include('partials.incident', ['incident' => $incident, 'with_link' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user