Convert tabs to spaces
This commit is contained in:
@@ -2,27 +2,27 @@
|
||||
|
||||
if ( ! function_exists('elixir'))
|
||||
{
|
||||
/**
|
||||
* Get the path to a versioned Elixir file.
|
||||
*
|
||||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
function elixir($file)
|
||||
{
|
||||
static $manifest = null;
|
||||
/**
|
||||
* Get the path to a versioned Elixir file.
|
||||
*
|
||||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
function elixir($file)
|
||||
{
|
||||
static $manifest = null;
|
||||
|
||||
if (is_null($manifest))
|
||||
{
|
||||
$manifest = json_decode(file_get_contents(public_path().'/build/rev-manifest.json'), true);
|
||||
}
|
||||
if (is_null($manifest))
|
||||
{
|
||||
$manifest = json_decode(file_get_contents(public_path().'/build/rev-manifest.json'), true);
|
||||
}
|
||||
|
||||
if (isset($manifest[$file]))
|
||||
{
|
||||
return '/build/'.$manifest[$file];
|
||||
}
|
||||
if (isset($manifest[$file]))
|
||||
{
|
||||
return '/build/'.$manifest[$file];
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
||||
}
|
||||
throw new InvalidArgumentException("File {$file} not defined in asset manifest.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
|
||||
View::composer('index', function($view) {
|
||||
$date = date('Y-m-d');
|
||||
$date = date('Y-m-d');
|
||||
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $date . '"')
|
||||
->groupBy('status')
|
||||
->orderBy('status', 'desc');
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $date . '"')
|
||||
->groupBy('status')
|
||||
->orderBy('status', 'desc');
|
||||
|
||||
$incidentCount = $incidents->count();
|
||||
$incidentCount = $incidents->count();
|
||||
|
||||
if ($incidentCount <= 1 || ($incidentCount > 1 && (int) $incidents->first()->status === 4)) {
|
||||
$status = 'success';
|
||||
$message = Lang::get('overview.good');
|
||||
} else {
|
||||
$status = 'danger';
|
||||
$message = Lang::get('overview.bad');
|
||||
}
|
||||
if ($incidentCount <= 1 || ($incidentCount > 1 && (int) $incidents->first()->status === 4)) {
|
||||
$status = 'success';
|
||||
$message = Lang::get('overview.good');
|
||||
} else {
|
||||
$status = 'danger';
|
||||
$message = Lang::get('overview.bad');
|
||||
}
|
||||
|
||||
$view->with([
|
||||
'systemStatus' => $status,
|
||||
'systemMessage' => $message
|
||||
]);
|
||||
$view->with([
|
||||
'systemStatus' => $status,
|
||||
'systemMessage' => $message
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -2,34 +2,34 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-6 col-md-offset-3'>
|
||||
{{ Form::open() }}
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<div class='row'>
|
||||
<div class='col-md-6 col-md-offset-3'>
|
||||
{{ Form::open() }}
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
|
||||
@if(Session::has('error'))
|
||||
<span class='text-danger'>{{ Session::get('error') }}</span>
|
||||
@endif
|
||||
@if(Session::has('error'))
|
||||
<span class='text-danger'>{{ Session::get('error') }}</span>
|
||||
@endif
|
||||
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Email</label>
|
||||
{{ Form::email('email', Input::old('email'), [
|
||||
'class' => 'form-control', 'placeholder' => 'Email', 'required' => 'required'
|
||||
]) }}
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Password</label>
|
||||
{{ Form::password('password', [
|
||||
'class' => 'form-control', 'placeholder' => 'Password', 'required' => 'required'
|
||||
]) }}
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<button type='submit' class='btn btn-default'>Login!</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Email</label>
|
||||
{{ Form::email('email', Input::old('email'), [
|
||||
'class' => 'form-control', 'placeholder' => 'Email', 'required' => 'required'
|
||||
]) }}
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Password</label>
|
||||
{{ Form::password('password', [
|
||||
'class' => 'form-control', 'placeholder' => 'Password', 'required' => 'required'
|
||||
]) }}
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<button type='submit' class='btn btn-default'>Login!</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
|
||||
@section('content')
|
||||
<div class='text-header'>
|
||||
<h1>Dashboard. <small>Manage Cachet.</small></h1>
|
||||
<h1>Dashboard. <small>Manage Cachet.</small></h1>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div role='tabpanel'>
|
||||
<ul class='nav nav-tabs' role='tablist'>
|
||||
<li role='presentation' class='active'><a href='#dash' role='tab' data-toggle='tab'>Home</a></li>
|
||||
<li role='presentation'><a href='#components' role='tab' data-toggle='tab'>Components</a></li>
|
||||
<li role='presentation'><a href='#incidents' role='tab' data-toggle='tab'>Incidents</a></li>
|
||||
<li role='presentation'><a href='#metrics' role='tab' data-toggle='tab'>Metrics</a></li>
|
||||
<li role='presentation'><a href='#users' role='tab' data-toggle='tab'>Users</a></li>
|
||||
</ul>
|
||||
<ul class='nav nav-tabs' role='tablist'>
|
||||
<li role='presentation' class='active'><a href='#dash' role='tab' data-toggle='tab'>Home</a></li>
|
||||
<li role='presentation'><a href='#components' role='tab' data-toggle='tab'>Components</a></li>
|
||||
<li role='presentation'><a href='#incidents' role='tab' data-toggle='tab'>Incidents</a></li>
|
||||
<li role='presentation'><a href='#metrics' role='tab' data-toggle='tab'>Metrics</a></li>
|
||||
<li role='presentation'><a href='#users' role='tab' data-toggle='tab'>Users</a></li>
|
||||
</ul>
|
||||
|
||||
<div class='tab-content'>
|
||||
<div role='tabpanel' class='tab-pane active' id='dash'>
|
||||
<p>Coming soon... <a href="/">Back to Status Page.</a></p>
|
||||
</div>
|
||||
<div role='tabpanel' class='tab-pane' id='components'>Components</div>
|
||||
<div role='tabpanel' class='tab-pane' id='incidents'>Incidents</div>
|
||||
<div role='tabpanel' class='tab-pane' id='metrics'>Metrics</div>
|
||||
<div role='tabpanel' class='tab-pane' id='users'>Users</div>
|
||||
</div>
|
||||
<div class='tab-content'>
|
||||
<div role='tabpanel' class='tab-pane active' id='dash'>
|
||||
<p>Coming soon... <a href="/">Back to Status Page.</a></p>
|
||||
</div>
|
||||
<div role='tabpanel' class='tab-pane' id='components'>Components</div>
|
||||
<div role='tabpanel' class='tab-pane' id='incidents'>Incidents</div>
|
||||
<div role='tabpanel' class='tab-pane' id='metrics'>Metrics</div>
|
||||
<div role='tabpanel' class='tab-pane' id='users'>Users</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@if($components->count() > 0)
|
||||
<div class='page-header'>
|
||||
<ul class='list-group components'>
|
||||
@foreach($components as $component)
|
||||
<li class='list-group-item component '>
|
||||
<h4>{{ $component->name }} <small class='text-component-{{ $component->status }}'>{{ $component->humanStatus }}</small></h4>
|
||||
<p>{{ $component->description }}</p>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<ul class='list-group components'>
|
||||
@foreach($components as $component)
|
||||
<li class='list-group-item component '>
|
||||
<h4>{{ $component->name }} <small class='text-component-{{ $component->status }}'>{{ $component->humanStatus }}</small></h4>
|
||||
<p>{{ $component->description }}</p>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<ul class='list-group'>
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
||||
?>
|
||||
<li class='list-group-item active'>
|
||||
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M Y') }}</h3>
|
||||
</li>
|
||||
<?php
|
||||
$incidentDate = Carbon::now()->subDays($i);
|
||||
$incidents = Incident::whereRaw('DATE(created_at) = "' . $incidentDate->format('Y-m-d') . '"')->orderBy('created_at', 'desc')->get();
|
||||
?>
|
||||
<li class='list-group-item active'>
|
||||
<h3 class='list-group-item-heading'>{{ $incidentDate->format('jS M Y') }}</h3>
|
||||
</li>
|
||||
|
||||
@unless($incidents->count() > 0)
|
||||
<li class='list-group-item'>No incidents reported.</li>
|
||||
@endunless
|
||||
@unless($incidents->count() > 0)
|
||||
<li class='list-group-item'>No incidents reported.</li>
|
||||
@endunless
|
||||
|
||||
@foreach($incidents as $incidentID => $incident)
|
||||
<li class='list-group-item'>
|
||||
<span class='badge badge-incident-{{ $incident->status }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
|
||||
<h4>{{ $incident->name }} <small><time>{{ $incident->created_at->format('H:i:s A') }}</time></small></h4>
|
||||
{{ $incident->message }}
|
||||
@if($incidentID < ($incident->count() - 1))
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
@foreach($incidents as $incidentID => $incident)
|
||||
<li class='list-group-item'>
|
||||
<span class='badge badge-incident-{{ $incident->status }}'><i class='glyphicon {{ $incident->icon }}'></i></span>
|
||||
<h4>{{ $incident->name }} <small><time>{{ $incident->created_at->format('H:i:s A') }}</time></small></h4>
|
||||
{{ $incident->message }}
|
||||
@if($incidentID < ($incident->count() - 1))
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@if(Setting::get('show_support'))
|
||||
<hr />
|
||||
<div class='footer'>
|
||||
<p>{{ Setting::get('app_name') }} Status Page is powered by <a href='https://github.com/jbrooksuk/Cachet' target="_blank">Cachet</a>.</p>
|
||||
<p>{{ Setting::get('app_name') }} Status Page is powered by <a href='https://github.com/jbrooksuk/Cachet' target="_blank">Cachet</a>.</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
<div class='alert alert-{{ $systemStatus }}'>{{ $systemMessage }}</div>
|
||||
<div class='alert alert-{{ $systemStatus }}'>{{ $systemMessage }}</div>
|
||||
|
||||
@if(Auth::check())
|
||||
<a class="pull-right" href="/auth/logout">Logout</a>
|
||||
<p>You're logged in. This will be a link to the Dashboard.</p>
|
||||
@endif
|
||||
@if(Auth::check())
|
||||
<a class="pull-right" href="/auth/logout">Logout</a>
|
||||
<p>You're logged in. This will be a link to the Dashboard.</p>
|
||||
@endif
|
||||
|
||||
@include('imports.components')
|
||||
@include('imports.components')
|
||||
|
||||
@if(Setting::get('display_graphs'))
|
||||
@include('imports.graphs')
|
||||
@endif
|
||||
@if(Setting::get('display_graphs'))
|
||||
@include('imports.graphs')
|
||||
@endif
|
||||
|
||||
@for($i=0; $i <= 7; $i++)
|
||||
@include('imports.incident', array('i', $i))
|
||||
@endfor
|
||||
@for($i=0; $i <= 7; $i++)
|
||||
@include('imports.incident', array('i', $i))
|
||||
@endfor
|
||||
|
||||
@include('imports.support-link')
|
||||
@include('imports.support-link')
|
||||
@stop
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ isset($pageTitle) ? $pageTitle : Setting::get('app_name') }} | Cachet</title>
|
||||
<!-- Set the viewport width to device width for mobile -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="http://james-brooks.uk">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700,300,600' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{{ elixir('css/application.css') }}">
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ isset($pageTitle) ? $pageTitle : Setting::get('app_name') }} | Cachet</title>
|
||||
<!-- Set the viewport width to device width for mobile -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="http://james-brooks.uk">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700,300,600' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{{ elixir('css/application.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class='container'>
|
||||
@yield('content')
|
||||
</div>
|
||||
<div class='container'>
|
||||
@yield('content')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
<div class='text-header'>
|
||||
<h1>Setup Cachet <small>Under construction.</small></h1>
|
||||
</div>
|
||||
<div class='text-header'>
|
||||
<h1>Setup Cachet <small>Under construction.</small></h1>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<hr />
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-8'>
|
||||
<div class='panel panel-default'>
|
||||
<div class='panel-heading'>Service Details</div>
|
||||
<div class='panel-body'>
|
||||
{{ Form::open(['name' => 'SetupForm', 'class' => 'form-vertical', 'role' => 'form']) }}
|
||||
<fieldset>
|
||||
<legend>Status Page Setup</legend>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Site Name</label>
|
||||
<input type='text' name='settings[app_name]' class='form-control' placeholder='Site Name' value='{{ Input::old('settings.app_name', '') }}' required />
|
||||
@if($errors->has('settings.app_name'))
|
||||
<span class='text-danger'>{{ $errors->first('settings.app_name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Site Domain</label>
|
||||
<input type='text' name='settings[app_domain]' class='form-control' placeholder='Site Domain' value='{{ Input::old('settings.app_domain', '') }}' required />
|
||||
@if($errors->has('settings.app_domain'))
|
||||
<span class='text-danger'>{{ $errors->first('settings.app_domain') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label>
|
||||
<input type='checkbox' name='settings[show_support]' value='1' checked />
|
||||
Show support for Cachet?
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class='row'>
|
||||
<div class='col-md-8'>
|
||||
<div class='panel panel-default'>
|
||||
<div class='panel-heading'>Service Details</div>
|
||||
<div class='panel-body'>
|
||||
{{ Form::open(['name' => 'SetupForm', 'class' => 'form-vertical', 'role' => 'form']) }}
|
||||
<fieldset>
|
||||
<legend>Status Page Setup</legend>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Site Name</label>
|
||||
<input type='text' name='settings[app_name]' class='form-control' placeholder='Site Name' value='{{ Input::old('settings.app_name', '') }}' required />
|
||||
@if($errors->has('settings.app_name'))
|
||||
<span class='text-danger'>{{ $errors->first('settings.app_name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Site Domain</label>
|
||||
<input type='text' name='settings[app_domain]' class='form-control' placeholder='Site Domain' value='{{ Input::old('settings.app_domain', '') }}' required />
|
||||
@if($errors->has('settings.app_domain'))
|
||||
<span class='text-danger'>{{ $errors->first('settings.app_domain') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label>
|
||||
<input type='checkbox' name='settings[show_support]' value='1' checked />
|
||||
Show support for Cachet?
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Administrator Account</legend>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Username</label>
|
||||
<input type='text' name='user[name]' class='form-control' placeholder='Username' value='{{ Input::old('user.name', '') }}' required />
|
||||
@if($errors->has('user.name'))
|
||||
<span class='text-danger'>{{ $errors->first('user.name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Email</label>
|
||||
<input type='email' name='user[email]' class='form-control' placeholder='Email' value='{{ Input::old('user.email', '') }}' required />
|
||||
@if($errors->has('user.email'))
|
||||
<span class='text-danger'>{{ $errors->first('user.email') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Password</label>
|
||||
<input type='password' name='user[password]' class='form-control' placeholder='Password' value='{{ Input::old('user.password', '') }}' required />
|
||||
@if($errors->has('user.password'))
|
||||
<span class='text-danger'>{{ $errors->first('user.password') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Administrator Account</legend>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Username</label>
|
||||
<input type='text' name='user[name]' class='form-control' placeholder='Username' value='{{ Input::old('user.name', '') }}' required />
|
||||
@if($errors->has('user.name'))
|
||||
<span class='text-danger'>{{ $errors->first('user.name') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Email</label>
|
||||
<input type='email' name='user[email]' class='form-control' placeholder='Email' value='{{ Input::old('user.email', '') }}' required />
|
||||
@if($errors->has('user.email'))
|
||||
<span class='text-danger'>{{ $errors->first('user.email') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label class='sr-only'>Password</label>
|
||||
<input type='password' name='user[password]' class='form-control' placeholder='Password' value='{{ Input::old('user.password', '') }}' required />
|
||||
@if($errors->has('user.password'))
|
||||
<span class='text-danger'>{{ $errors->first('user.password') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
<div class='form-group'>
|
||||
<button type='submit' class='btn btn-default'>Setup!</button>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<div class='panel panel-info'>
|
||||
<div class='panel-heading'>Ding!</div>
|
||||
<div class='panel-body'>
|
||||
<p>You'll be able to reconfigure Cachet later on.</p>
|
||||
<p>At least when there is a management panel…</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class='form-group'>
|
||||
<button type='submit' class='btn btn-default'>Setup!</button>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<div class='panel panel-info'>
|
||||
<div class='panel-heading'>Ding!</div>
|
||||
<div class='panel-body'>
|
||||
<p>You'll be able to reconfigure Cachet later on.</p>
|
||||
<p>At least when there is a management panel…</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user