Merge pull request #3089 from CachetHQ/laravel-56
Upgrade to Laravel 5.6
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -1,5 +1,5 @@
|
||||
language: php
|
||||
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
branches:
|
||||
@@ -7,9 +7,8 @@ branches:
|
||||
- l10n_2.4
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
||||
before_install:
|
||||
- cp .env.example .env
|
||||
@@ -17,4 +16,10 @@ before_install:
|
||||
|
||||
install: travis_retry composer install --no-interaction --no-suggest
|
||||
|
||||
script: vendor/bin/phpunit
|
||||
script:
|
||||
- if [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then vendor/bin/phpunit; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
|
||||
|
||||
after_script:
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
|
||||
|
||||
@@ -16,7 +16,7 @@ use CachetHQ\Cachet\Models\Invite;
|
||||
/**
|
||||
* This is the user was invited event class.
|
||||
*
|
||||
* @author Joseph Cohen <joealt-three.com>
|
||||
* @author Joseph Cohen <joe@alt-three.com>
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
|
||||
@@ -61,7 +61,7 @@ class CreateComponentCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\CreateComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Component\CreateComponentCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -64,7 +64,7 @@ class UpdateComponentCommandHandler
|
||||
/**
|
||||
* Filter the command data.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateComponentCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand $command
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -116,7 +116,7 @@ class CreateIncidentCommandHandler
|
||||
|
||||
// Update the component.
|
||||
if ($component = Component::find($command->component_id)) {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
Component::find($command->component_id),
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -88,7 +88,7 @@ class UpdateIncidentCommandHandler
|
||||
|
||||
// Update the component.
|
||||
if ($component = Component::find($command->component_id)) {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
Component::find($command->component_id),
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -63,7 +63,7 @@ class CreateIncidentUpdateCommandHandler
|
||||
$update = IncidentUpdate::create($data);
|
||||
|
||||
// Update the original incident with the new status.
|
||||
dispatch(new UpdateIncidentCommand(
|
||||
execute(new UpdateIncidentCommand(
|
||||
$command->incident,
|
||||
null,
|
||||
$command->status,
|
||||
|
||||
@@ -20,7 +20,7 @@ class ClaimInviteCommandHandler
|
||||
/**
|
||||
* Handle the claim invite command.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\User\ClaimInviteCommand $command
|
||||
* @param \CachetHQ\Cachet\Bus\Commands\Invite\ClaimInviteCommand $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -58,7 +58,7 @@ class SubscribeSubscriberCommandHandler
|
||||
});
|
||||
|
||||
if ($command->verified) {
|
||||
dispatch(new VerifySubscriberCommand($subscriber));
|
||||
execute(new VerifySubscriberCommand($subscriber));
|
||||
} else {
|
||||
$subscriber->notify(new VerifySubscriptionNotification());
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class SendBeaconJobHandler
|
||||
/**
|
||||
* Handle the send beacon job.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Bus\Jobs\SendBeaconJob $job
|
||||
* @param \CachetHQ\Cachet\Bus\Jobs\System\SendBeaconJob $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -50,6 +50,9 @@ class StatusComposer
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
$view->with($this->system->getStatus());
|
||||
$status = $this->system->getStatus();
|
||||
|
||||
$view->withSystemStatus(array_get($status, 'system_status'));
|
||||
$view->withSystemMessage(array_get($status, 'system_message'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class BeaconCommand extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
dispatch(new SendBeaconJob());
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class DemoMetricPointSeederCommand extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->confirmToProceed()) {
|
||||
return;
|
||||
|
||||
@@ -79,7 +79,7 @@ class DemoSeederCommand extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->confirmToProceed()) {
|
||||
return;
|
||||
|
||||
@@ -41,7 +41,7 @@ class InstallCommand extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->confirm('Do you want to install Cachet?')) {
|
||||
$this->line('Installation aborted. Goodbye!');
|
||||
|
||||
@@ -39,7 +39,7 @@ class VersionCommand extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function fire()
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Cachet '.CACHET_VERSION.' is installed ⚡');
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class JsonValidationDisplayer extends JsonDisplayer implements DisplayerInterfac
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function display(Exception $exception, $id, $code, array $headers)
|
||||
public function display(Exception $exception, string $id, int $code, array $headers)
|
||||
{
|
||||
$info = $this->info->generate($exception, $id, 400);
|
||||
|
||||
@@ -47,7 +47,7 @@ class JsonValidationDisplayer extends JsonDisplayer implements DisplayerInterfac
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDisplay(Exception $original, Exception $transformed, $code)
|
||||
public function canDisplay(Exception $original, Exception $transformed, int $code)
|
||||
{
|
||||
return $transformed instanceof ValidationException;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class MaintenanceDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function display(Exception $exception, $id, $code, array $headers)
|
||||
public function display(Exception $exception, string $id, int $code, array $headers)
|
||||
{
|
||||
return new Response($this->render(), $code, array_merge($headers, ['Content-Type' => $this->contentType()]));
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class MaintenanceDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDisplay(Exception $original, Exception $transformed, $code)
|
||||
public function canDisplay(Exception $original, Exception $transformed, int $code)
|
||||
{
|
||||
return $transformed instanceof MaintenanceModeException;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class RedirectDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function display(Exception $exception, $id, $code, array $headers)
|
||||
public function display(Exception $exception, string $id, int $code, array $headers)
|
||||
{
|
||||
return redirect()->guest('auth/login');
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class RedirectDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDisplay(Exception $original, Exception $transformed, $code)
|
||||
public function canDisplay(Exception $original, Exception $transformed, int $code)
|
||||
{
|
||||
$redirect = $transformed instanceof HttpExceptionInterface && $transformed->getStatusCode() === 401;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class ThrottleDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function display(Exception $exception, $id, $code, array $headers)
|
||||
public function display(Exception $exception, string $id, int $code, array $headers)
|
||||
{
|
||||
return cachet_redirect('auth.login')->withError(trans('forms.login.rate-limit'));
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class ThrottleDisplayer implements DisplayerInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDisplay(Exception $original, Exception $transformed, $code)
|
||||
public function canDisplay(Exception $original, Exception $transformed, int $code)
|
||||
{
|
||||
return $transformed instanceof TooManyRequestsHttpException && $this->request->is('auth*');
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class ApiFilter
|
||||
*
|
||||
* @return \GrahamCampbell\Exceptions\Displayers\DisplayerInterface[]
|
||||
*/
|
||||
public function filter(array $displayers, Request $request, Exception $original, Exception $transformed, $code)
|
||||
public function filter(array $displayers, Request $request, Exception $original, Exception $transformed, int $code)
|
||||
{
|
||||
if ($request->is('api*')) {
|
||||
foreach ($displayers as $index => $displayer) {
|
||||
|
||||
@@ -33,6 +33,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
* Boot the service provider.
|
||||
*
|
||||
* @param \AltThree\Bus\Dispatcher $dispatcher
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Dispatcher $dispatcher)
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ class ComponentController extends AbstractApiController
|
||||
public function store()
|
||||
{
|
||||
try {
|
||||
$component = dispatch(new CreateComponentCommand(
|
||||
$component = execute(new CreateComponentCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('description'),
|
||||
Binput::get('status'),
|
||||
@@ -97,9 +97,9 @@ class ComponentController extends AbstractApiController
|
||||
Collection::make(preg_split('/ ?, ?/', $tags))->map(function ($tag) {
|
||||
return trim($tag);
|
||||
})->map(function ($tag) {
|
||||
return dispatch(new CreateTagCommand($tag));
|
||||
return execute(new CreateTagCommand($tag));
|
||||
})->each(function ($tag) use ($component) {
|
||||
dispatch(new ApplyTagCommand($component, $tag));
|
||||
execute(new ApplyTagCommand($component, $tag));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class ComponentController extends AbstractApiController
|
||||
public function update(Component $component)
|
||||
{
|
||||
try {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
$component,
|
||||
Binput::get('name'),
|
||||
Binput::get('description'),
|
||||
@@ -139,9 +139,9 @@ class ComponentController extends AbstractApiController
|
||||
Collection::make(preg_split('/ ?, ?/', $tags))->map(function ($tag) {
|
||||
return trim($tag);
|
||||
})->map(function ($tag) {
|
||||
return dispatch(new CreateTagCommand($tag));
|
||||
return execute(new CreateTagCommand($tag));
|
||||
})->each(function ($tag) use ($component) {
|
||||
dispatch(new ApplyTagCommand($component, $tag));
|
||||
execute(new ApplyTagCommand($component, $tag));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ class ComponentController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Component $component)
|
||||
{
|
||||
dispatch(new RemoveComponentCommand($component));
|
||||
execute(new RemoveComponentCommand($component));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ class ComponentGroupController extends AbstractApiController
|
||||
public function store()
|
||||
{
|
||||
try {
|
||||
$group = dispatch(new CreateComponentGroupCommand(
|
||||
$group = execute(new CreateComponentGroupCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('order', 0),
|
||||
Binput::get('collapsed', 0),
|
||||
@@ -115,7 +115,7 @@ class ComponentGroupController extends AbstractApiController
|
||||
public function update(ComponentGroup $group)
|
||||
{
|
||||
try {
|
||||
$group = dispatch(new UpdateComponentGroupCommand(
|
||||
$group = execute(new UpdateComponentGroupCommand(
|
||||
$group,
|
||||
Binput::get('name'),
|
||||
Binput::get('order'),
|
||||
@@ -138,7 +138,7 @@ class ComponentGroupController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(ComponentGroup $group)
|
||||
{
|
||||
dispatch(new RemoveComponentGroupCommand($group));
|
||||
execute(new RemoveComponentGroupCommand($group));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class IncidentController extends AbstractApiController
|
||||
public function store()
|
||||
{
|
||||
try {
|
||||
$incident = dispatch(new CreateIncidentCommand(
|
||||
$incident = execute(new CreateIncidentCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('status'),
|
||||
Binput::get('message', null, false, false),
|
||||
@@ -98,7 +98,7 @@ class IncidentController extends AbstractApiController
|
||||
public function update(Incident $incident)
|
||||
{
|
||||
try {
|
||||
$incident = dispatch(new UpdateIncidentCommand(
|
||||
$incident = execute(new UpdateIncidentCommand(
|
||||
$incident,
|
||||
Binput::get('name'),
|
||||
Binput::get('status'),
|
||||
@@ -128,7 +128,7 @@ class IncidentController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Incident $incident)
|
||||
{
|
||||
dispatch(new RemoveIncidentCommand($incident));
|
||||
execute(new RemoveIncidentCommand($incident));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
public function store(Incident $incident)
|
||||
{
|
||||
try {
|
||||
$update = dispatch(new CreateIncidentUpdateCommand(
|
||||
$update = execute(new CreateIncidentUpdateCommand(
|
||||
$incident,
|
||||
Binput::get('status'),
|
||||
Binput::get('message'),
|
||||
@@ -100,7 +100,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
public function update(Incident $incident, IncidentUpdate $update)
|
||||
{
|
||||
try {
|
||||
$update = dispatch(new UpdateIncidentUpdateCommand(
|
||||
$update = execute(new UpdateIncidentUpdateCommand(
|
||||
$update,
|
||||
Binput::get('status'),
|
||||
Binput::get('message'),
|
||||
@@ -124,7 +124,7 @@ class IncidentUpdateController extends AbstractApiController
|
||||
public function destroy(Incident $incident, IncidentUpdate $update)
|
||||
{
|
||||
try {
|
||||
dispatch(new RemoveIncidentUpdateCommand($update));
|
||||
execute(new RemoveIncidentUpdateCommand($update));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class MetricController extends AbstractApiController
|
||||
public function store()
|
||||
{
|
||||
try {
|
||||
$metric = dispatch(new CreateMetricCommand(
|
||||
$metric = execute(new CreateMetricCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('suffix'),
|
||||
Binput::get('description'),
|
||||
@@ -92,7 +92,7 @@ class MetricController extends AbstractApiController
|
||||
public function update(Metric $metric)
|
||||
{
|
||||
try {
|
||||
$metric = dispatch(new UpdateMetricCommand(
|
||||
$metric = execute(new UpdateMetricCommand(
|
||||
$metric,
|
||||
Binput::get('name'),
|
||||
Binput::get('suffix'),
|
||||
@@ -122,7 +122,7 @@ class MetricController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Metric $metric)
|
||||
{
|
||||
dispatch(new RemoveMetricCommand($metric));
|
||||
execute(new RemoveMetricCommand($metric));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class MetricPointController extends AbstractApiController
|
||||
public function store(Metric $metric)
|
||||
{
|
||||
try {
|
||||
$metricPoint = dispatch(new CreateMetricPointCommand(
|
||||
$metricPoint = execute(new CreateMetricPointCommand(
|
||||
$metric,
|
||||
Binput::get('value'),
|
||||
Binput::get('timestamp')
|
||||
@@ -64,13 +64,13 @@ class MetricPointController extends AbstractApiController
|
||||
* Updates a metric point.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Models\Metric $metric
|
||||
* @param \CachetHQ\Cachet\Models\MetircPoint $metricPoint
|
||||
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function update(Metric $metric, MetricPoint $metricPoint)
|
||||
{
|
||||
$metricPoint = dispatch(new UpdateMetricPointCommand(
|
||||
$metricPoint = execute(new UpdateMetricPointCommand(
|
||||
$metricPoint,
|
||||
$metric,
|
||||
Binput::get('value'),
|
||||
@@ -90,7 +90,7 @@ class MetricPointController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Metric $metric, MetricPoint $metricPoint)
|
||||
{
|
||||
dispatch(new RemoveMetricPointCommand($metricPoint));
|
||||
execute(new RemoveMetricPointCommand($metricPoint));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class ScheduleController extends AbstractApiController
|
||||
public function store()
|
||||
{
|
||||
try {
|
||||
$schedule = dispatch(new CreateScheduleCommand(
|
||||
$schedule = execute(new CreateScheduleCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('message', null, false, false),
|
||||
Binput::get('status'),
|
||||
@@ -92,7 +92,7 @@ class ScheduleController extends AbstractApiController
|
||||
public function update(Schedule $schedule)
|
||||
{
|
||||
try {
|
||||
$schedule = dispatch(new UpdateScheduleCommand(
|
||||
$schedule = execute(new UpdateScheduleCommand(
|
||||
$schedule,
|
||||
Binput::get('name'),
|
||||
Binput::get('message'),
|
||||
@@ -118,7 +118,7 @@ class ScheduleController extends AbstractApiController
|
||||
public function destroy(Schedule $schedule)
|
||||
{
|
||||
try {
|
||||
dispatch(new DeleteScheduleCommand($schedule));
|
||||
execute(new DeleteScheduleCommand($schedule));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class SubscriberController extends AbstractApiController
|
||||
$verified = Binput::get('verify', app(Repository::class)->get('setting.skip_subscriber_verification'));
|
||||
|
||||
try {
|
||||
$subscriber = dispatch(new SubscribeSubscriberCommand(Binput::get('email'), $verified, Binput::get('components', null)));
|
||||
$subscriber = execute(new SubscribeSubscriberCommand(Binput::get('email'), $verified, Binput::get('components', null)));
|
||||
} catch (QueryException $e) {
|
||||
throw new BadRequestHttpException();
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class SubscriberController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Subscriber $subscriber)
|
||||
{
|
||||
dispatch(new UnsubscribeSubscriberCommand($subscriber));
|
||||
execute(new UnsubscribeSubscriberCommand($subscriber));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class SubscriptionController extends AbstractApiController
|
||||
*/
|
||||
public function destroy(Subscription $subscription)
|
||||
{
|
||||
dispatch(new UnsubscribeSubscriptionCommand($subscription));
|
||||
execute(new UnsubscribeSubscriptionCommand($subscription));
|
||||
|
||||
return $this->noContent();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class ApiController extends AbstractApiController
|
||||
public function postUpdateComponent(Component $component)
|
||||
{
|
||||
try {
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
$component,
|
||||
$component->name,
|
||||
$component->description,
|
||||
@@ -68,7 +68,7 @@ class ApiController extends AbstractApiController
|
||||
try {
|
||||
$component = Component::find($componentId);
|
||||
|
||||
dispatch(new UpdateComponentCommand(
|
||||
execute(new UpdateComponentCommand(
|
||||
$component,
|
||||
$component->name,
|
||||
$component->description,
|
||||
@@ -100,7 +100,7 @@ class ApiController extends AbstractApiController
|
||||
foreach ($groupData as $order => $groupId) {
|
||||
$group = ComponentGroup::find($groupId);
|
||||
|
||||
dispatch(new UpdateComponentGroupCommand(
|
||||
execute(new UpdateComponentGroupCommand(
|
||||
$group,
|
||||
$group->name,
|
||||
$order + 1,
|
||||
|
||||
@@ -61,8 +61,8 @@ class ComponentController extends Controller
|
||||
];
|
||||
|
||||
View::share([
|
||||
'sub_menu' => $this->subMenu,
|
||||
'sub_title' => trans_choice('dashboard.components.components', 2),
|
||||
'subMenu' => $this->subMenu,
|
||||
'subTitle' => trans_choice('dashboard.components.components', 2),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class ComponentController extends Controller
|
||||
$tags = array_pull($componentData, 'tags');
|
||||
|
||||
try {
|
||||
$component = dispatch(new UpdateComponentCommand(
|
||||
$component = execute(new UpdateComponentCommand(
|
||||
$component,
|
||||
$componentData['name'],
|
||||
$componentData['description'],
|
||||
@@ -140,9 +140,9 @@ class ComponentController extends Controller
|
||||
Collection::make(preg_split('/ ?, ?/', $tags))->map(function ($tag) {
|
||||
return trim($tag);
|
||||
})->map(function ($tag) {
|
||||
return dispatch(new CreateTagCommand($tag));
|
||||
return execute(new CreateTagCommand($tag));
|
||||
})->each(function ($tag) use ($component) {
|
||||
dispatch(new ApplyTagCommand($component, $tag));
|
||||
execute(new ApplyTagCommand($component, $tag));
|
||||
});
|
||||
|
||||
return cachet_redirect('dashboard.components.edit', [$component->id])
|
||||
@@ -172,7 +172,7 @@ class ComponentController extends Controller
|
||||
$tags = array_pull($componentData, 'tags');
|
||||
|
||||
try {
|
||||
$component = dispatch(new CreateComponentCommand(
|
||||
$component = execute(new CreateComponentCommand(
|
||||
$componentData['name'],
|
||||
$componentData['description'],
|
||||
$componentData['status'],
|
||||
@@ -193,9 +193,9 @@ class ComponentController extends Controller
|
||||
Collection::make(preg_split('/ ?, ?/', $tags))->map(function ($tag) {
|
||||
return trim($tag);
|
||||
})->map(function ($tag) {
|
||||
return dispatch(new CreateTagCommand($tag));
|
||||
return execute(new CreateTagCommand($tag));
|
||||
})->each(function ($tag) use ($component) {
|
||||
dispatch(new ApplyTagCommand($component, $tag));
|
||||
execute(new ApplyTagCommand($component, $tag));
|
||||
});
|
||||
|
||||
return cachet_redirect('dashboard.components')
|
||||
@@ -211,7 +211,7 @@ class ComponentController extends Controller
|
||||
*/
|
||||
public function deleteComponentAction(Component $component)
|
||||
{
|
||||
dispatch(new RemoveComponentCommand($component));
|
||||
execute(new RemoveComponentCommand($component));
|
||||
|
||||
return cachet_redirect('dashboard.components')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
|
||||
|
||||
@@ -87,7 +87,7 @@ class ComponentGroupController extends Controller
|
||||
*/
|
||||
public function deleteComponentGroupAction(ComponentGroup $group)
|
||||
{
|
||||
dispatch(new RemoveComponentGroupCommand($group));
|
||||
execute(new RemoveComponentGroupCommand($group));
|
||||
|
||||
return cachet_redirect('dashboard.components.groups')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
|
||||
@@ -126,7 +126,7 @@ class ComponentGroupController extends Controller
|
||||
public function postAddComponentGroup()
|
||||
{
|
||||
try {
|
||||
$group = dispatch(new CreateComponentGroupCommand(
|
||||
$group = execute(new CreateComponentGroupCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('order', 0),
|
||||
Binput::get('collapsed'),
|
||||
@@ -153,7 +153,7 @@ class ComponentGroupController extends Controller
|
||||
public function updateComponentGroupAction(ComponentGroup $group)
|
||||
{
|
||||
try {
|
||||
$group = dispatch(new UpdateComponentGroupCommand(
|
||||
$group = execute(new UpdateComponentGroupCommand(
|
||||
$group,
|
||||
Binput::get('name'),
|
||||
$group->order,
|
||||
|
||||
@@ -101,7 +101,7 @@ class DashboardController extends Controller
|
||||
|
||||
$welcomeUser = !Auth::user()->welcomed;
|
||||
if ($welcomeUser) {
|
||||
dispatch(new WelcomeUserCommand(Auth::user()));
|
||||
execute(new WelcomeUserCommand(Auth::user()));
|
||||
}
|
||||
|
||||
$entries = null;
|
||||
|
||||
@@ -65,7 +65,7 @@ class IncidentController extends Controller
|
||||
$this->auth = $auth;
|
||||
$this->system = $system;
|
||||
|
||||
View::share('sub_title', trans('dashboard.incidents.title'));
|
||||
View::share('subTitle', trans('dashboard.incidents.title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ class IncidentController extends Controller
|
||||
public function createIncidentAction()
|
||||
{
|
||||
try {
|
||||
$incident = dispatch(new CreateIncidentCommand(
|
||||
$incident = execute(new CreateIncidentCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('status'),
|
||||
Binput::get('message', null, false, false),
|
||||
@@ -213,7 +213,7 @@ class IncidentController extends Controller
|
||||
*/
|
||||
public function deleteIncidentAction(Incident $incident)
|
||||
{
|
||||
dispatch(new RemoveIncidentCommand($incident));
|
||||
execute(new RemoveIncidentCommand($incident));
|
||||
|
||||
return cachet_redirect('dashboard.incidents')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.delete.success')));
|
||||
@@ -246,7 +246,7 @@ class IncidentController extends Controller
|
||||
public function editIncidentAction(Incident $incident)
|
||||
{
|
||||
try {
|
||||
$incident = dispatch(new UpdateIncidentCommand(
|
||||
$incident = execute(new UpdateIncidentCommand(
|
||||
$incident,
|
||||
Binput::get('name'),
|
||||
Binput::get('status'),
|
||||
|
||||
@@ -101,7 +101,7 @@ class IncidentUpdateController extends Controller
|
||||
public function createIncidentUpdateAction(Incident $incident)
|
||||
{
|
||||
try {
|
||||
$incidentUpdate = dispatch(new CreateIncidentUpdateCommand(
|
||||
$incidentUpdate = execute(new CreateIncidentUpdateCommand(
|
||||
$incident,
|
||||
Binput::get('status'),
|
||||
Binput::get('message'),
|
||||
@@ -151,7 +151,7 @@ class IncidentUpdateController extends Controller
|
||||
public function editIncidentUpdateAction(Incident $incident, IncidentUpdate $incidentUpdate)
|
||||
{
|
||||
try {
|
||||
$incidentUpdate = dispatch(new UpdateIncidentUpdateCommand(
|
||||
$incidentUpdate = execute(new UpdateIncidentUpdateCommand(
|
||||
$incidentUpdate,
|
||||
Binput::get('status'),
|
||||
Binput::get('message'),
|
||||
|
||||
@@ -71,7 +71,7 @@ class MetricController extends Controller
|
||||
$metricData = Binput::get('metric');
|
||||
|
||||
try {
|
||||
dispatch(new CreateMetricCommand(
|
||||
execute(new CreateMetricCommand(
|
||||
$metricData['name'],
|
||||
$metricData['suffix'],
|
||||
$metricData['description'],
|
||||
@@ -115,7 +115,7 @@ class MetricController extends Controller
|
||||
*/
|
||||
public function deleteMetricAction(Metric $metric)
|
||||
{
|
||||
dispatch(new RemoveMetricCommand($metric));
|
||||
execute(new RemoveMetricCommand($metric));
|
||||
|
||||
return cachet_redirect('dashboard.metrics')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.delete.success')));
|
||||
@@ -146,7 +146,7 @@ class MetricController extends Controller
|
||||
public function editMetricAction(Metric $metric)
|
||||
{
|
||||
try {
|
||||
dispatch(new UpdateMetricCommand(
|
||||
execute(new UpdateMetricCommand(
|
||||
$metric,
|
||||
Binput::get('name', null, false),
|
||||
Binput::get('suffix', null, false),
|
||||
|
||||
@@ -42,7 +42,7 @@ class ScheduleController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
View::share('sub_title', trans('dashboard.schedule.title'));
|
||||
View::share('subTitle', trans('dashboard.schedule.title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ class ScheduleController extends Controller
|
||||
public function addScheduleAction()
|
||||
{
|
||||
try {
|
||||
dispatch(new CreateScheduleCommand(
|
||||
execute(new CreateScheduleCommand(
|
||||
Binput::get('name'),
|
||||
Binput::get('message', null, false, false),
|
||||
Binput::get('status', Schedule::UPCOMING),
|
||||
@@ -127,7 +127,7 @@ class ScheduleController extends Controller
|
||||
public function editScheduleAction(Schedule $schedule)
|
||||
{
|
||||
try {
|
||||
$schedule = dispatch(new UpdateScheduleCommand(
|
||||
$schedule = execute(new UpdateScheduleCommand(
|
||||
$schedule,
|
||||
Binput::get('name', null),
|
||||
Binput::get('message', null),
|
||||
@@ -156,7 +156,7 @@ class ScheduleController extends Controller
|
||||
*/
|
||||
public function deleteScheduleAction(Schedule $schedule)
|
||||
{
|
||||
dispatch(new DeleteScheduleCommand($schedule));
|
||||
execute(new DeleteScheduleCommand($schedule));
|
||||
|
||||
return cachet_redirect('dashboard.schedule')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.delete.success')));
|
||||
|
||||
@@ -18,12 +18,12 @@ use CachetHQ\Cachet\Notifications\System\SystemTestNotification;
|
||||
use CachetHQ\Cachet\Settings\Repository;
|
||||
use Exception;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Log\Writer;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\View;
|
||||
@@ -116,8 +116,8 @@ class SettingsController extends Controller
|
||||
];
|
||||
|
||||
View::share([
|
||||
'sub_title' => trans('dashboard.settings.settings'),
|
||||
'sub_menu' => $this->subMenu,
|
||||
'subTitle' => trans('dashboard.settings.settings'),
|
||||
'subMenu' => $this->subMenu,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ class SettingsController extends Controller
|
||||
{
|
||||
$this->subMenu['log']['active'] = true;
|
||||
|
||||
$log = app(Writer::class)->getMonolog();
|
||||
$log = Log::getLogger();
|
||||
|
||||
$logContents = '';
|
||||
|
||||
@@ -319,7 +319,7 @@ class SettingsController extends Controller
|
||||
{
|
||||
$config = Binput::get('config');
|
||||
|
||||
dispatch(new UpdateConfigCommand($config));
|
||||
execute(new UpdateConfigCommand($config));
|
||||
|
||||
return cachet_redirect('dashboard.settings.mail')
|
||||
->withInput(Binput::all())
|
||||
|
||||
@@ -58,7 +58,7 @@ class SubscriberController extends Controller
|
||||
$subscribers = preg_split("/\r\n|\n|\r/", Binput::get('email'));
|
||||
|
||||
foreach ($subscribers as $subscriber) {
|
||||
dispatch(new SubscribeSubscriberCommand($subscriber, $verified));
|
||||
execute(new SubscribeSubscriberCommand($subscriber, $verified));
|
||||
}
|
||||
} catch (ValidationException $e) {
|
||||
return cachet_redirect('dashboard.subscribers.create')
|
||||
@@ -82,7 +82,7 @@ class SubscriberController extends Controller
|
||||
*/
|
||||
public function deleteSubscriberAction(Subscriber $subscriber)
|
||||
{
|
||||
dispatch(new UnsubscribeSubscriberCommand($subscriber));
|
||||
execute(new UnsubscribeSubscriberCommand($subscriber));
|
||||
|
||||
return cachet_redirect('dashboard.subscribers');
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class TeamController extends Controller
|
||||
public function postAddUser()
|
||||
{
|
||||
try {
|
||||
dispatch(new CreateUserCommand(
|
||||
execute(new CreateUserCommand(
|
||||
Binput::get('username'),
|
||||
Binput::get('password'),
|
||||
Binput::get('email'),
|
||||
@@ -129,7 +129,7 @@ class TeamController extends Controller
|
||||
public function postInviteUser()
|
||||
{
|
||||
try {
|
||||
dispatch(new InviteUserCommand(
|
||||
execute(new InviteUserCommand(
|
||||
array_unique(array_filter((array) Binput::get('emails')))
|
||||
));
|
||||
} catch (ValidationException $e) {
|
||||
@@ -152,7 +152,7 @@ class TeamController extends Controller
|
||||
*/
|
||||
public function deleteUser(User $user)
|
||||
{
|
||||
dispatch(new RemoveUserCommand($user));
|
||||
execute(new RemoveUserCommand($user));
|
||||
|
||||
return cachet_redirect('dashboard.team')
|
||||
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.delete.success')));
|
||||
|
||||
@@ -258,7 +258,7 @@ class SetupController extends Controller
|
||||
$envData = array_pull($postData, 'env');
|
||||
|
||||
// Write the env to the .env file.
|
||||
dispatch(new UpdateConfigCommand($envData));
|
||||
execute(new UpdateConfigCommand($envData));
|
||||
|
||||
if (Request::ajax()) {
|
||||
return Response::json(['status' => 1]);
|
||||
|
||||
@@ -69,7 +69,7 @@ class SignupController extends Controller
|
||||
}
|
||||
|
||||
try {
|
||||
dispatch(new SignupUserCommand(
|
||||
execute(new SignupUserCommand(
|
||||
Binput::get('username'),
|
||||
Binput::get('password'),
|
||||
Binput::get('email'),
|
||||
@@ -82,7 +82,7 @@ class SignupController extends Controller
|
||||
->withErrors($e->getMessageBag());
|
||||
}
|
||||
|
||||
dispatch(new ClaimInviteCommand($invite));
|
||||
execute(new ClaimInviteCommand($invite));
|
||||
|
||||
return cachet_redirect('status-page')
|
||||
->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.signup.success')));
|
||||
|
||||
@@ -80,7 +80,7 @@ class SubscribeController extends Controller
|
||||
$verified = app(Repository::class)->get('setting.skip_subscriber_verification');
|
||||
|
||||
try {
|
||||
$subscription = dispatch(new SubscribeSubscriberCommand($email, $verified));
|
||||
$subscription = execute(new SubscribeSubscriberCommand($email, $verified));
|
||||
} catch (ValidationException $e) {
|
||||
return cachet_redirect('status-page')
|
||||
->withInput(Binput::all())
|
||||
@@ -116,7 +116,7 @@ class SubscribeController extends Controller
|
||||
}
|
||||
|
||||
if (!$subscriber->is_verified) {
|
||||
dispatch(new VerifySubscriberCommand($subscriber));
|
||||
execute(new VerifySubscriberCommand($subscriber));
|
||||
}
|
||||
|
||||
return cachet_redirect('status-page')
|
||||
@@ -144,9 +144,9 @@ class SubscribeController extends Controller
|
||||
}
|
||||
|
||||
if ($subscription) {
|
||||
dispatch(new UnsubscribeSubscriptionCommand(Subscription::forSubscriber($subscriber->id)->firstOrFail()));
|
||||
execute(new UnsubscribeSubscriptionCommand(Subscription::forSubscriber($subscriber->id)->firstOrFail()));
|
||||
} else {
|
||||
dispatch(new UnsubscribeSubscriberCommand($subscriber));
|
||||
execute(new UnsubscribeSubscriberCommand($subscriber));
|
||||
}
|
||||
|
||||
return cachet_redirect('status-page')
|
||||
@@ -204,7 +204,7 @@ class SubscribeController extends Controller
|
||||
}
|
||||
|
||||
try {
|
||||
dispatch(new UpdateSubscriberSubscriptionCommand($subscriber, Binput::get('subscriptions')));
|
||||
execute(new UpdateSubscriberSubscriptionCommand($subscriber, Binput::get('subscriptions')));
|
||||
} catch (ValidationException $e) {
|
||||
return cachet_redirect('subscribe.manage', $subscriber->verify_code)
|
||||
->withInput(Binput::all())
|
||||
|
||||
@@ -11,7 +11,19 @@
|
||||
|
||||
namespace CachetHQ\Cachet\Http;
|
||||
|
||||
use AltThree\Throttle\ThrottlingMiddleware;
|
||||
use CachetHQ\Cachet\Http\Middleware\Admin;
|
||||
use CachetHQ\Cachet\Http\Middleware\ApiAuthentication;
|
||||
use CachetHQ\Cachet\Http\Middleware\Authenticate;
|
||||
use CachetHQ\Cachet\Http\Middleware\Localize;
|
||||
use CachetHQ\Cachet\Http\Middleware\ReadyForUse;
|
||||
use CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated;
|
||||
use CachetHQ\Cachet\Http\Middleware\SetupAlreadyCompleted;
|
||||
use CachetHQ\Cachet\Http\Middleware\SubscribersConfigured;
|
||||
use CachetHQ\Cachet\Http\Middleware\TrustProxies;
|
||||
use Illuminate\Auth\Middleware\Authorize;
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
@@ -21,8 +33,8 @@ class Kernel extends HttpKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
'Fideloper\Proxy\TrustProxies',
|
||||
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
|
||||
TrustProxies::class,
|
||||
CheckForMaintenanceMode::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -31,15 +43,15 @@ class Kernel extends HttpKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'admin' => 'CachetHQ\Cachet\Http\Middleware\Admin',
|
||||
'can' => 'Illuminate\Auth\Middleware\Authorize',
|
||||
'auth' => 'CachetHQ\Cachet\Http\Middleware\Authenticate',
|
||||
'auth.api' => 'CachetHQ\Cachet\Http\Middleware\ApiAuthentication',
|
||||
'guest' => 'CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated',
|
||||
'localize' => 'CachetHQ\Cachet\Http\Middleware\Localize',
|
||||
'ready' => 'CachetHQ\Cachet\Http\Middleware\ReadyForUse',
|
||||
'setup' => 'CachetHQ\Cachet\Http\Middleware\SetupAlreadyCompleted',
|
||||
'subscribers' => 'CachetHQ\Cachet\Http\Middleware\SubscribersConfigured',
|
||||
'throttle' => 'AltThree\Throttle\ThrottlingMiddleware',
|
||||
'admin' => Admin::class,
|
||||
'can' => Authorize::class,
|
||||
'auth' => Authenticate::class,
|
||||
'auth.api' => ApiAuthentication::class,
|
||||
'guest' => RedirectIfAuthenticated::class,
|
||||
'localize' => Localize::class,
|
||||
'ready' => ReadyForUse::class,
|
||||
'setup' => SetupAlreadyCompleted::class,
|
||||
'subscribers' => SubscribersConfigured::class,
|
||||
'throttle' => ThrottlingMiddleware::class,
|
||||
];
|
||||
}
|
||||
|
||||
47
app/Http/Middleware/TrustProxies.php
Normal file
47
app/Http/Middleware/TrustProxies.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Middleware;
|
||||
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* This is the trust proxies middleware class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
|
||||
/**
|
||||
* Create new trust proxies instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->proxies = empty(env('TRUSTED_PROXIES')) ? '*' : explode(',', trim(env('TRUSTED_PROXIES')));
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
use CachetHQ\Cachet\Settings\Repository;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Jenssegers\Date\Date;
|
||||
@@ -159,3 +160,17 @@ if (!function_exists('cachet_redirect')) {
|
||||
return app('redirect')->to($url, $status, $headers);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('execute')) {
|
||||
/**
|
||||
* Send the given command to the dispatcher for execution.
|
||||
*
|
||||
* @param object $command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function execute($command)
|
||||
{
|
||||
return app(Dispatcher::class)->dispatchNow($command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ $app->singleton(Illuminate\Contracts\Http\Kernel::class, CachetHQ\Cachet\Http\Ke
|
||||
|
||||
$app->singleton(Illuminate\Contracts\Console\Kernel::class, CachetHQ\Cachet\Console\Kernel::class);
|
||||
|
||||
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, GrahamCampbell\Exceptions\NewExceptionHandler::class);
|
||||
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, GrahamCampbell\Exceptions\ExceptionHandler::class);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -25,45 +25,44 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.6.4",
|
||||
"php": "^7.0",
|
||||
"ext-xml": "*",
|
||||
"alt-three/badger": "^3.1",
|
||||
"alt-three/bus": "^2.0",
|
||||
"alt-three/emoji": "^4.1",
|
||||
"alt-three/logger": "^1.3",
|
||||
"alt-three/throttle": "^1.0",
|
||||
"alt-three/twitter": "^1.0",
|
||||
"alt-three/validator": "^2.0",
|
||||
"alt-three/badger": "^5.0",
|
||||
"alt-three/bus": "^4.0",
|
||||
"alt-three/emoji": "^6.0",
|
||||
"alt-three/throttle": "^3.0",
|
||||
"alt-three/twitter": "^3.0",
|
||||
"alt-three/validator": "^4.0",
|
||||
"aws/aws-sdk-php": "^3.7",
|
||||
"backup-manager/laravel": "dev-master#df53f9c9d8c6be5d7a2638f45d54b8fb7bc51e2b",
|
||||
"barryvdh/laravel-cors": "^0.8",
|
||||
"barryvdh/laravel-cors": "^0.11.0",
|
||||
"doctrine/dbal": "2.5.13",
|
||||
"fideloper/proxy": "^3.1",
|
||||
"graham-campbell/binput": "^3.5",
|
||||
"graham-campbell/exceptions": "^9.1",
|
||||
"graham-campbell/markdown": "^7.1",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"graham-campbell/binput": "^5.0",
|
||||
"graham-campbell/exceptions": "^11.0",
|
||||
"graham-campbell/markdown": "^10.0",
|
||||
"guzzlehttp/guzzle": "^6.2.1",
|
||||
"jenssegers/date": "^3.2",
|
||||
"laravel/framework": "^5.4",
|
||||
"laravel/framework": "5.6.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
"laravolt/avatar": "^1.8",
|
||||
"mccool/laravel-auto-presenter": "^5.0",
|
||||
"mccool/laravel-auto-presenter": "^7.0",
|
||||
"nexmo/client": "@beta",
|
||||
"pragmarx/google2fa": "^0.7.1",
|
||||
"predis/predis": "^1.1",
|
||||
"roumen/feed": "^2.10",
|
||||
"spatie/laravel-backup": "^5.9",
|
||||
"twig/twig": "^1.26.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-sqlite3": "*",
|
||||
"alt-three/testbench": "^1.11",
|
||||
"barryvdh/laravel-debugbar": "^2.4",
|
||||
"alt-three/testbench": "^4.0",
|
||||
"barryvdh/laravel-debugbar": "^3.0",
|
||||
"filp/whoops": "^2.1",
|
||||
"fzaninotto/faker": "^1.6",
|
||||
"graham-campbell/testbench-core": "^1.1",
|
||||
"mockery/mockery": "0.9.9",
|
||||
"nikic/php-parser": "^3.0",
|
||||
"phpunit/phpunit": "5.7.20",
|
||||
"graham-campbell/analyzer": "^2.0",
|
||||
"graham-campbell/testbench-core": "^3.0",
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"symfony/css-selector": "^3.1",
|
||||
"symfony/dom-crawler": "^3.1",
|
||||
"tightenco/mailthief": "^0.3.2"
|
||||
@@ -89,24 +88,17 @@
|
||||
},
|
||||
"scripts": {
|
||||
"post-root-package-install": [
|
||||
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"php artisan key:generate"
|
||||
"@php artisan key:generate"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postInstall",
|
||||
"php artisan optimize"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
|
||||
"php artisan optimize"
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6.4"
|
||||
},
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"optimize-autoloader": true
|
||||
|
||||
2515
composer.lock
generated
2515
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -175,12 +175,9 @@ return [
|
||||
*/
|
||||
AltThree\Badger\BadgerServiceProvider::class,
|
||||
AltThree\Emoji\EmojiServiceProvider::class,
|
||||
AltThree\Logger\LoggerServiceProvider::class,
|
||||
AltThree\Twitter\TwitterServiceProvider::class,
|
||||
BackupManager\Laravel\Laravel5ServiceProvider::class,
|
||||
Barryvdh\Cors\ServiceProvider::class,
|
||||
env('APP_DEBUG') ? Barryvdh\Debugbar\ServiceProvider::class : null,
|
||||
Fideloper\Proxy\TrustedProxyServiceProvider::class,
|
||||
GrahamCampbell\Binput\BinputServiceProvider::class,
|
||||
GrahamCampbell\Exceptions\ExceptionsServiceProvider::class,
|
||||
GrahamCampbell\Markdown\MarkdownServiceProvider::class,
|
||||
@@ -190,6 +187,7 @@ return [
|
||||
Laravolt\Avatar\ServiceProvider::class,
|
||||
McCool\LaravelAutoPresenter\AutoPresenterServiceProvider::class,
|
||||
PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class,
|
||||
Spatie\Backup\BackupServiceProvider::class,
|
||||
Roumen\Feed\FeedServiceProvider::class,
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
'local' => [
|
||||
'type' => 'Local',
|
||||
'root' => database_path('backups'),
|
||||
],
|
||||
's3' => [
|
||||
'type' => 'AwsS3',
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
'region' => 'us-east-1',
|
||||
'bucket' => '',
|
||||
'root' => '',
|
||||
],
|
||||
'gcs' => [
|
||||
'type' => 'Gcs',
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
'bucket' => '',
|
||||
'root' => '',
|
||||
],
|
||||
'rackspace' => [
|
||||
'type' => 'Rackspace',
|
||||
'username' => '',
|
||||
'key' => '',
|
||||
'container' => '',
|
||||
'zone' => '',
|
||||
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
|
||||
'root' => '',
|
||||
],
|
||||
'dropbox' => [
|
||||
'type' => 'Dropbox',
|
||||
'token' => '',
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
'app' => '',
|
||||
'root' => '',
|
||||
],
|
||||
'ftp' => [
|
||||
'type' => 'Ftp',
|
||||
'host' => '',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'port' => 21,
|
||||
'passive' => true,
|
||||
'ssl' => true,
|
||||
'timeout' => 30,
|
||||
'root' => '',
|
||||
],
|
||||
'sftp' => [
|
||||
'type' => 'Sftp',
|
||||
'host' => '',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'port' => 21,
|
||||
'timeout' => 10,
|
||||
'privateKey' => '',
|
||||
'root' => '',
|
||||
],
|
||||
];
|
||||
196
config/backup.php
Normal file
196
config/backup.php
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
'backup' => [
|
||||
|
||||
/*
|
||||
* The name of this application. You can use this name to monitor
|
||||
* the backups.
|
||||
*/
|
||||
'name' => config('app.name'),
|
||||
|
||||
'source' => [
|
||||
|
||||
'files' => [
|
||||
|
||||
/*
|
||||
* The list of directories and files that will be included in the backup.
|
||||
*/
|
||||
'include' => [
|
||||
base_path(),
|
||||
],
|
||||
|
||||
/*
|
||||
* These directories and files will be excluded from the backup.
|
||||
*
|
||||
* Directories used by the backup process will automatically be excluded.
|
||||
*/
|
||||
'exclude' => [
|
||||
base_path('vendor'),
|
||||
base_path('node_modules'),
|
||||
],
|
||||
|
||||
/*
|
||||
* Determines if symlinks should be followed.
|
||||
*/
|
||||
'followLinks' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
* The names of the connections to the databases that should be backed up
|
||||
* MySQL, PostgreSQL, SQLite and Mongo databases are supported.
|
||||
*/
|
||||
'databases' => [
|
||||
'mysql',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* The database dump can be gzipped to decrease diskspace usage.
|
||||
*/
|
||||
'gzip_database_dump' => false,
|
||||
|
||||
'destination' => [
|
||||
|
||||
/*
|
||||
* The filename prefix used for the backup zip file.
|
||||
*/
|
||||
'filename_prefix' => '',
|
||||
|
||||
/*
|
||||
* The disk names on which the backups will be stored.
|
||||
*/
|
||||
'disks' => [
|
||||
'database',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* The directory where the temporary files will be stored.
|
||||
*/
|
||||
'temporary_directory' => storage_path('app/backup-temp'),
|
||||
],
|
||||
|
||||
/*
|
||||
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
|
||||
* For Slack you need to install guzzlehttp/guzzle.
|
||||
*
|
||||
* You can also use your own notification classes, just make sure the class is named after one of
|
||||
* the `Spatie\Backup\Events` classes.
|
||||
*/
|
||||
'notifications' => [
|
||||
|
||||
'notifications' => [
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
|
||||
],
|
||||
|
||||
/*
|
||||
* Here you can specify the notifiable to which the notifications should be sent. The default
|
||||
* notifiable will use the variables specified in this config file.
|
||||
*/
|
||||
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
|
||||
|
||||
'mail' => [
|
||||
'to' => 'your@example.com',
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'webhook_url' => '',
|
||||
|
||||
/*
|
||||
* If this is set to null the default channel of the webhook will be used.
|
||||
*/
|
||||
'channel' => null,
|
||||
|
||||
'username' => null,
|
||||
|
||||
'icon' => null,
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* Here you can specify which backups should be monitored.
|
||||
* If a backup does not meet the specified requirements the
|
||||
* UnHealthyBackupWasFound event will be fired.
|
||||
*/
|
||||
'monitorBackups' => [
|
||||
[
|
||||
'name' => config('app.name'),
|
||||
'disks' => ['local'],
|
||||
'newestBackupsShouldNotBeOlderThanDays' => 1,
|
||||
'storageUsedMayNotBeHigherThanMegabytes' => 5000,
|
||||
],
|
||||
|
||||
/*
|
||||
[
|
||||
'name' => 'name of the second app',
|
||||
'disks' => ['local', 's3'],
|
||||
'newestBackupsShouldNotBeOlderThanDays' => 1,
|
||||
'storageUsedMayNotBeHigherThanMegabytes' => 5000,
|
||||
],
|
||||
*/
|
||||
],
|
||||
|
||||
'cleanup' => [
|
||||
/*
|
||||
* The strategy that will be used to cleanup old backups. The default strategy
|
||||
* will keep all backups for a certain amount of days. After that period only
|
||||
* a daily backup will be kept. After that period only weekly backups will
|
||||
* be kept and so on.
|
||||
*
|
||||
* No matter how you configure it the default strategy will never
|
||||
* delete the newest backup.
|
||||
*/
|
||||
'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
|
||||
|
||||
'defaultStrategy' => [
|
||||
|
||||
/*
|
||||
* The number of days for which backups must be kept.
|
||||
*/
|
||||
'keepAllBackupsForDays' => 7,
|
||||
|
||||
/*
|
||||
* The number of days for which daily backups must be kept.
|
||||
*/
|
||||
'keepDailyBackupsForDays' => 16,
|
||||
|
||||
/*
|
||||
* The number of weeks for which one weekly backup must be kept.
|
||||
*/
|
||||
'keepWeeklyBackupsForWeeks' => 8,
|
||||
|
||||
/*
|
||||
* The number of months for which one monthly backup must be kept.
|
||||
*/
|
||||
'keepMonthlyBackupsForMonths' => 4,
|
||||
|
||||
/*
|
||||
* The number of years for which one yearly backup must be kept.
|
||||
*/
|
||||
'keepYearlyBackupsForYears' => 2,
|
||||
|
||||
/*
|
||||
* After cleaning up the backups remove the oldest backup until
|
||||
* this amount of megabytes has been reached.
|
||||
*/
|
||||
'deleteOldestBackupsWhenUsingMoreMegabytesThan' => 5000,
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -57,6 +57,11 @@ return [
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'local',
|
||||
'root' => database_path('backups'),
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
|
||||
61
config/hashing.php
Normal file
61
config/hashing.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 1024,
|
||||
'threads' => 2,
|
||||
'time' => 2,
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Loggers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the loggers to call under the hood while logging.
|
||||
|
|
||||
*/
|
||||
|
||||
'loggers' => [
|
||||
'Illuminate\Log\Writer' => ['warning', 'error', 'critical', 'alert', 'emergency'],
|
||||
],
|
||||
|
||||
];
|
||||
90
config/logging.php
Normal file
90
config/logging.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => 'debug',
|
||||
'days' => 7,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => 'critical',
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => StreamHandler::class,
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => 'debug',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Trusted Proxies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set trusted proxy IP addresses. Both IPv4 and IPv6 addresses are
|
||||
| supported, along with CIDR notation. The "*" character is syntactic sugar
|
||||
| within TrustedProxy to trust any proxy; a requirement when you cannot
|
||||
| know the address of your proxy (e.g. if using Rackspace balancers).
|
||||
|
|
||||
| By default, we are trusting local IPs and CloudFlare only.
|
||||
|
|
||||
*/
|
||||
|
||||
'proxies' => empty(env('TRUSTED_PROXIES')) ? '*' : explode(',', trim(env('TRUSTED_PROXIES'))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Respected Headers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Change these if the proxy does not send the default header names. Note
|
||||
| that headers such as X-Forwarded-For are transformed to
|
||||
| HTTP_X_FORWARDED_FOR format.
|
||||
|
|
||||
| By default, we are using the Symfony defaults.
|
||||
|
|
||||
*/
|
||||
|
||||
'headers' => [
|
||||
Request::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
|
||||
Request::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
|
||||
Request::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
|
||||
Request::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
|
||||
],
|
||||
|
||||
];
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<input type="hidden" name="component[user_id]" value="{{ $component->agent_id || $current_user->id }}">
|
||||
<input type="hidden" name="component[user_id]" value="{{ $component->agent_id || $currentUser->id }}">
|
||||
<input type="hidden" name="component[order]" value="{{ $component->order ?: 0 }}">
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(!$notifications_enabled)
|
||||
@if(!$notificationsEnabled)
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ trans('forms.incidents.notify_disabled') }}
|
||||
</div>
|
||||
@@ -23,12 +23,12 @@
|
||||
<form class="form-vertical" name="IncidentForm" role="form" method="POST" autocomplete="off">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<fieldset>
|
||||
@if($incident_templates->count() > 0)
|
||||
@if($incidentTemplates->count() > 0)
|
||||
<div class="form-group">
|
||||
<label for="incident-template">{{ trans('forms.incidents.templates.template') }}</label>
|
||||
<select class="form-control" name="template" v-model="template">
|
||||
<option selected></option>
|
||||
@foreach($incident_templates as $tpl)
|
||||
@foreach($incidentTemplates as $tpl)
|
||||
<option value="{{ $tpl->slug }}">{{ $tpl->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@@ -75,19 +75,19 @@
|
||||
<option value="0" selected>{{ trans('forms.incidents.not_stickied') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
@if(!$components_in_groups->isEmpty() || !$components_out_groups->isEmpty())
|
||||
@if(!$componentsInGroups->isEmpty() || !$componentsOutGroups->isEmpty())
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.incidents.component') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
|
||||
<select name="component_id" class="form-control" v-model="component.id">
|
||||
<option value="" selected></option>
|
||||
@foreach($components_in_groups as $group)
|
||||
@foreach($componentsInGroups as $group)
|
||||
<optgroup label="{{ $group->name }}">
|
||||
@foreach($group->components as $component)
|
||||
<option value="{{ $component->id }}">{{ $component->name }}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
@endforeach
|
||||
@foreach($components_out_groups as $component)
|
||||
@foreach($componentsOutGroups as $component)
|
||||
<option value="{{ $component->id }}">{{ $component->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@@ -120,7 +120,7 @@
|
||||
<label>{{ trans('forms.incidents.occurred_at') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
|
||||
<input type="text" name="occurred_at" class="form-control" rel="datepicker-custom" data-date-format="YYYY-MM-DD HH:mm" placeholder="{{ trans('forms.optional') }}">
|
||||
</div>
|
||||
@if($notifications_enabled)
|
||||
@if($notificationsEnabled)
|
||||
<input type="hidden" name="notify" value="0">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(!$notifications_enabled)
|
||||
@if(!$notificationsEnabled)
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ trans('forms.incidents.notify_disabled') }}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(!$notifications_enabled)
|
||||
@if(!$notificationsEnabled)
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ trans('forms.incidents.notify_disabled') }}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(!$notifications_enabled)
|
||||
@if(!$notificationsEnabled)
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ trans('forms.incidents.notify_disabled') }}
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@extends('layout.dashboard')
|
||||
|
||||
@section('content')
|
||||
<div>
|
||||
<dashboard inline-template :welcome-user="{{ $welcomeUser ? 'true' : 'false' }}" :user="{{ $currentUser }}">
|
||||
<div>
|
||||
<div class="header">
|
||||
<div class="sidebar-toggler visible-xs">
|
||||
<i class="ion ion-navicon"></i>
|
||||
@@ -20,7 +21,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="section-components no-select">
|
||||
@if(!$component_groups->isEmpty() || !$ungrouped_components->isEmpty())
|
||||
@if(!$componentGroups->isEmpty() || !$ungroupedComponents->isEmpty())
|
||||
@include('dashboard.partials.components')
|
||||
@else
|
||||
<ul class="list-group components">
|
||||
@@ -87,7 +88,8 @@
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@includeWhen($welcomeUser, 'dashboard.partials.welcome-modal')
|
||||
</div>
|
||||
</div>
|
||||
@includeWhen($welcome_user, 'dashboard.partials.welcome-modal')
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<form class="form-vertical" name="ScheduleForm" role="form" method="POST" autocomplete="off">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<fieldset>
|
||||
@if($incident_templates->count() > 0)
|
||||
@if($incidentTemplates->count() > 0)
|
||||
<div class="form-group">
|
||||
<label for="incident-template">{{ trans('forms.schedules.templates.template') }}</label>
|
||||
<select class="form-control" name="template">
|
||||
<option selected></option>
|
||||
@foreach($incident_templates as $tpl)
|
||||
@foreach($incidentTemplates as $tpl)
|
||||
<option value="{{ $tpl->slug }}">{{ $tpl->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="visible" value="1">
|
||||
<fieldset>
|
||||
@if($incident_templates->count() > 0)
|
||||
@if($incidentTemplates->count() > 0)
|
||||
<div class="form-group">
|
||||
<label for="incident-template">{{ trans('forms.schedules.templates.template') }}</label>
|
||||
<select class="form-control" name="template">
|
||||
<option selected></option>
|
||||
@foreach($incident_templates as $tpl)
|
||||
@foreach($incidentTemplates as $tpl)
|
||||
<option value="{{ $tpl->slug }}">{{ $tpl->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="form-group">
|
||||
<label for="metric-places">{{ trans('forms.metrics.threshold') }}</label>
|
||||
<select name="metric[threshold]" class="form-control" required>
|
||||
@foreach ($acceptable_thresholds as $threshold)
|
||||
@foreach ($acceptableThresholds as $threshold)
|
||||
<option {{ (int) Binput::old('metric.threshold') === $threshold ? 'selected' : null }}>{{ $threshold }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<div class="form-group">
|
||||
<label for="metric-places">{{ trans('forms.metrics.threshold') }}</label>
|
||||
<select name="threshold" class="form-control" required>
|
||||
@foreach ($acceptable_thresholds as $threshold)
|
||||
@foreach ($acceptableThresholds as $threshold)
|
||||
<option {{ (int) Binput::old('metric.threshold') === $threshold || $metric->threshold === $threshold ? 'selected' : null }}>{{ $threshold }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@if($component_groups->count() > 0)
|
||||
@foreach($component_groups as $componentGroup)
|
||||
@if($componentGroups->count() > 0)
|
||||
@foreach($componentGroups as $componentGroup)
|
||||
@if($componentGroup->enabled_components->count() > 0)
|
||||
<ul class="list-group components">
|
||||
<li class="list-group-item group-name">
|
||||
@@ -16,14 +16,14 @@
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($ungrouped_components->count() > 0)
|
||||
@if($ungroupedComponents->count() > 0)
|
||||
<ul class="list-group components">
|
||||
@if($component_groups->count() > 0)
|
||||
@if($componentGroups->count() > 0)
|
||||
<li class="list-group-item group-name">
|
||||
<span class="component-group-other">{{ trans('cachet.components.group.other') }}</span>
|
||||
</li>
|
||||
@endif
|
||||
@foreach($ungrouped_components as $component)
|
||||
@foreach($ungroupedComponents as $component)
|
||||
@include('dashboard.partials.component', compact($component))
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="sidebar-inner">
|
||||
<div class="profile">
|
||||
<a href="{{ cachet_route('dashboard.user') }}">
|
||||
<span class="avatar"><img src="{{ $current_user->avatar }}"></span>
|
||||
<span class="avatar"><img src="{{ $currentUser->avatar }}"></span>
|
||||
</a>
|
||||
<a href="{{ cachet_route('dashboard.user') }}">
|
||||
<h4 class="username">{{ $current_user->username }}</h4>
|
||||
<h4 class="username">{{ $currentUser->username }}</h4>
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
@@ -26,28 +26,28 @@
|
||||
<a href="{{ cachet_route('dashboard.incidents') }}">
|
||||
<i class="ion ion-ios-information-outline"></i>
|
||||
<span>{{ trans('dashboard.incidents.incidents') }}</span>
|
||||
<span class="label label-info">{{ $incident_count }}</span>
|
||||
<span class="label label-info">{{ $incidentCount }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {!! set_active('dashboard/templates*') !!}>
|
||||
<a href="{{ cachet_route('dashboard.templates') }}">
|
||||
<i class="ion ion-ios-paper-outline"></i>
|
||||
<span>{{ trans('dashboard.incidents.incident-templates') }}</span>
|
||||
<span class="label label-info">{{ $incident_template_count }}</span>
|
||||
<span class="label label-info">{{ $incidentTemplateCount }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {!! set_active('dashboard/schedule*') !!}>
|
||||
<a href="{{ cachet_route('dashboard.schedule') }}">
|
||||
<i class="ion ion-android-calendar"></i>
|
||||
<span>{{ trans('dashboard.schedule.schedule') }}</span>
|
||||
<span class="label label-info">{{ $schedule_count }}</span>
|
||||
<span class="label label-info">{{ $scheduleCount }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {!! set_active('dashboard/components*') !!}>
|
||||
<a href="{{ cachet_route('dashboard.components') }}">
|
||||
<i class="ion ion-ios-browsers-outline"></i>
|
||||
<span>{{ trans('dashboard.components.components') }}</span>
|
||||
<span class="label label-info">{{ $component_count }}</span>
|
||||
<span class="label label-info">{{ $componentCount }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {!! set_active('dashboard/metrics*') !!}>
|
||||
@@ -60,7 +60,7 @@
|
||||
<a href="{{ cachet_route('dashboard.subscribers') }}">
|
||||
<i class="ion ion-ios-email-outline"></i>
|
||||
<span>{{ trans('dashboard.subscribers.subscribers') }}</span>
|
||||
<span class="label label-info">{{ $subscriber_count }}</span>
|
||||
<span class="label label-info">{{ $subscriberCount }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {!! set_active('dashboard/team*') !!}>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="sidebar-toggler visible-xs">
|
||||
<i class="ion ion-navicon"></i>
|
||||
</div>
|
||||
<h3>{{ $sub_title }}</h3>
|
||||
<h3>{{ $subTitle }}</h3>
|
||||
<hr>
|
||||
<ul class="menu">
|
||||
@foreach($sub_menu as $key => $item)
|
||||
@foreach($subMenu as $key => $item)
|
||||
<li><a href="{{ $item['url'] }}" class="{{ $item['active'] ? 'active' : null }}"><i class="ion {{ $item['icon'] }}"></i> {{ $item['title'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<header>
|
||||
{{ trans('dashboard.welcome.welcome', ['username' => $current_user->username]) }}
|
||||
{{ trans('dashboard.welcome.welcome', ['username' => $currentUser->username]) }}
|
||||
</header>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.analytics.analytics_google') }}</label>
|
||||
<input type="text" name="app_analytics" class="form-control" value="{{ $app_analytics }}" placeholder="UA-12345-12">
|
||||
<input type="text" name="app_analytics" class="form-control" value="{{ $appAnalytics }}" placeholder="UA-12345-12">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.analytics.analytics_gosquared') }}</label>
|
||||
<input type="text" name="app_analytics_go_squared" class="form-control" value="{{ $app_analytics_go_squared }}" placeholder="GSN-12345-A">
|
||||
<input type="text" name="app_analytics_go_squared" class="form-control" value="{{ $appAnalyticsGoSquared }}" placeholder="GSN-12345-A">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.analytics.analytics_piwik_url') }}</label>
|
||||
<input type="text" name="app_analytics_piwik_url" class="form-control" value="{{ $app_analytics_piwik_url }}" placeholder="{{ trans('forms.settings.analytics.analytics_piwik_url') }}">
|
||||
<input type="text" name="app_analytics_piwik_url" class="form-control" value="{{ $appAnalyticsPiwikURL }}" placeholder="{{ trans('forms.settings.analytics.analytics_piwik_url') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.analytics.analytics_piwik_siteid') }}</label>
|
||||
<input type="number" min="1" max="100" name="app_analytics_piwik_site_id" class="form-control" value="{{ $app_analytics_piwik_site_id }}" placeholder="{{ trans('forms.settings.analytics.analytics_piwik_siteid') }}">
|
||||
<input type="number" min="1" max="100" name="app_analytics_piwik_site_id" class="form-control" value="{{ $appAnalyticsPiwikSiteID }}" placeholder="{{ trans('forms.settings.analytics.analytics_piwik_siteid') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.app-setup.site-name') }}</label>
|
||||
<input type="text" class="form-control" name="app_name" value="{{ $app_name }}" required placeholder="{{ trans('forms.settings.app-setup.site-name') }}">
|
||||
<input type="text" class="form-control" name="app_name" value="{{ $appName }}" required placeholder="{{ trans('forms.settings.app-setup.site-name') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.app-setup.site-url') }}</label>
|
||||
<input type="text" class="form-control" name="app_domain" value="{{ $app_domain }}" required placeholder="{{ trans('forms.settings.app-setup.site-url') }}">
|
||||
<input type="text" class="form-control" name="app_domain" value="{{ $appDomain }}" required placeholder="{{ trans('forms.settings.app-setup.site-url') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.app-setup.about-this-page') }}</label>
|
||||
<div class='markdown-control'>
|
||||
<textarea name="app_about" class="form-control autosize" rows="4" placeholder="{{ trans('forms.settings.app-setup.about-this-page') }}">{{ $raw_app_about }}</textarea>
|
||||
<textarea name="app_about" class="form-control autosize" rows="4" placeholder="{{ trans('forms.settings.app-setup.about-this-page') }}">{{ $rawAppAbout }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="display_graphs">
|
||||
<input type="checkbox" value="1" name="display_graphs" {{ $app_graphs ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="display_graphs" {{ $appGraphs ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.app-setup.display-graphs') }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="show_support">
|
||||
<input type="checkbox" value="1" name="show_support" {{ $show_support ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="show_support" {{ $showSupport ? 'checked' : null }}>
|
||||
{{ trans('setup.show_support') }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -125,7 +125,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="enable_external_dependencies">
|
||||
<input type="checkbox" value="1" name="enable_external_dependencies" {{ $enable_external_dependencies ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="enable_external_dependencies" {{ $enableExternalDependencies ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.app-setup.enable_external_dependencies') }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="show_timezone">
|
||||
<input type="checkbox" value="1" name="show_timezone" {{ $show_timezone ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="show_timezone" {{ $showTimezone ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.app-setup.show_timezone') }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="only_disrupted_days">
|
||||
<input type="checkbox" value="1" name="only_disrupted_days" {{ $only_disrupted_days ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="only_disrupted_days" {{ $onlyDisruptedDays ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.app-setup.only_disrupted_days') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
@@ -63,7 +63,7 @@
|
||||
<select name="app_locale" class="form-control" required>
|
||||
<option value="">Select Language</option>
|
||||
@foreach($langs as $key => $lang)
|
||||
<option value="{{ $key }}" @if($app_locale === $key) selected @endif>
|
||||
<option value="{{ $key }}" @if($appLocale === $key) selected @endif>
|
||||
{{ $lang['name'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
@@ -76,7 +76,7 @@
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="automatic_localization">
|
||||
<input type="checkbox" value="1" name="automatic_localization" {{ $automatic_localization ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="automatic_localization" {{ $automaticLocalization ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.app-setup.automatic_localization') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
@@ -19,7 +19,7 @@
|
||||
<label>{{ trans('forms.setup.mail_driver') }}</label>
|
||||
<select name="config[mail_driver]" class="form-control" required>
|
||||
<option disabled>{{ trans('forms.setup.mail_driver') }}</option>
|
||||
@foreach($mail_drivers as $driver => $driverName)
|
||||
@foreach($mailDrivers as $driver => $driverName)
|
||||
<option value="{{ $driver }}" {{ Binput::old('config.mail_driver', $config['driver']) == $driver ? "selected" : null }}>{{ $driverName }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="security">
|
||||
<span class="uppercase">
|
||||
@@ -48,13 +48,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!$unsecure_users->isEmpty())
|
||||
@if(!$unsecureUsers->isEmpty())
|
||||
<hr>
|
||||
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">{{ trans('dashboard.settings.security.two-factor') }}</div>
|
||||
<div class="list-group">
|
||||
@foreach($unsecure_users as $user)
|
||||
@foreach($unsecureUsers as $user)
|
||||
<div class="list-group-item">
|
||||
<strong>{{ $user->username }}</strong>
|
||||
<span class="label label-danger pull-right"><i class="ion ion-ios-unlocked"></i></span>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="stylesheet">
|
||||
<span class="uppercase">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@includeWhen(isset($sub_menu), 'dashboard.partials.sub-sidebar')
|
||||
@includeWhen(isset($subMenu), 'dashboard.partials.sub-sidebar')
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="theme">
|
||||
<span class="uppercase">
|
||||
@@ -18,9 +18,9 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.app-setup.banner') }}</label>
|
||||
@if($app_banner)
|
||||
@if($appBanner)
|
||||
<div id="banner-view" class="well">
|
||||
<img src="data:{{ $app_banner_type }};base64,{{ $app_banner }}" style="max-width: 100%">
|
||||
<img src="data:{{ $app_banner_type }};base64,{{ $appBanner }}" style="max-width: 100%">
|
||||
<br><br>
|
||||
<button id="remove-banner" class="btn btn-danger">{{ trans('forms.remove') }}</button>
|
||||
</div>
|
||||
@@ -37,13 +37,13 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.background-color') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.background_color" value="{{ $theme_background_color }}" placeholder="{{ trans('forms.settings.theme.background-color') }}">
|
||||
<input type="text" class="form-control color-code" name="style.background_color" value="{{ $themeBackgroundColor }}" placeholder="{{ trans('forms.settings.theme.background-color') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.text-color') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.text_color" value="{{ $theme_text_color }}" placeholder="{{ trans('forms.settings.theme.text-color') }}">
|
||||
<input type="text" class="form-control color-code" name="style.text_color" value="{{ $themeTextColor }}" placeholder="{{ trans('forms.settings.theme.text-color') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,20 +52,20 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.banner-background-color') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.banner_background_color" value="{{ $theme_banner_background_color }}" placeholder="{{ trans('forms.settings.theme.banner-background-color') }}">
|
||||
<input type="text" class="form-control color-code" name="style.banner_background_color" value="{{ $themeBannerBackgroundColor }}" placeholder="{{ trans('forms.settings.theme.banner-background-color') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.banner-padding') }}</label>
|
||||
<input type="text" class="form-control" name="style.banner_padding" value="{{ $theme_banner_padding }}" placeholder="{{ trans('forms.settings.theme.banner-padding') }}">
|
||||
<input type="text" class="form-control" name="style.banner_padding" value="{{ $themeBannerPadding }}" placeholder="{{ trans('forms.settings.theme.banner-padding') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="hidden" value="0" name="style.fullwidth_header">
|
||||
<input type="checkbox" value="1" name="style.fullwidth_header" {{ $app_banner_style_full_width ? 'checked' : null }}>
|
||||
<input type="checkbox" value="1" name="style.fullwidth_header" {{ $appBannerStyleFullWidth ? 'checked' : null }}>
|
||||
{{ trans('forms.settings.theme.fullwidth-banner') }}
|
||||
</label>
|
||||
</div>
|
||||
@@ -76,13 +76,13 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.reds') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.reds" value="{{ $theme_reds }}" placeholder="{{ trans('forms.settings.theme.reds') }}">
|
||||
<input type="text" class="form-control color-code" name="style.reds" value="{{ $themeReds }}" placeholder="{{ trans('forms.settings.theme.reds') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.blues') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.blues" value="{{ $theme_blues }}" placeholder="{{ trans('forms.settings.theme.blues') }}">
|
||||
<input type="text" class="form-control color-code" name="style.blues" value="{{ $themeBlues }}" placeholder="{{ trans('forms.settings.theme.blues') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,13 +90,13 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.greens') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.greens" value="{{ $theme_greens }}" placeholder="{{ trans('forms.settings.theme.greens') }}">
|
||||
<input type="text" class="form-control color-code" name="style.greens" value="{{ $themeGreens }}" placeholder="{{ trans('forms.settings.theme.greens') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.yellows') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.yellows" value="{{ $theme_yellows }}" placeholder="{{ trans('forms.settings.theme.yellows') }}">
|
||||
<input type="text" class="form-control color-code" name="style.yellows" value="{{ $themeYellows }}" placeholder="{{ trans('forms.settings.theme.yellows') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,13 +104,13 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.oranges') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.oranges" value="{{ $theme_oranges }}" placeholder="{{ trans('forms.settings.theme.oranges') }}">
|
||||
<input type="text" class="form-control color-code" name="style.oranges" value="{{ $themeOranges }}" placeholder="{{ trans('forms.settings.theme.oranges') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.metrics') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.metrics" value="{{ $theme_metrics }}" placeholder="{{ trans('forms.settings.theme.metrics') }}">
|
||||
<input type="text" class="form-control color-code" name="style.metrics" value="{{ $themeMetrics }}" placeholder="{{ trans('forms.settings.theme.metrics') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,13 +118,13 @@
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.links') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.links" value="{{ $theme_links }}" placeholder="{{ trans('forms.settings.theme.links') }}">
|
||||
<input type="text" class="form-control color-code" name="style.links" value="{{ $themeLinks }}" placeholder="{{ trans('forms.settings.theme.links') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.settings.theme.background-fills') }}</label>
|
||||
<input type="text" class="form-control color-code" name="style.background_fills" value="{{ $theme_background_fills }}" placeholder="{{ trans('forms.settings.theme.background-fills') }}">
|
||||
<input type="text" class="form-control color-code" name="style.background_fills" value="{{ $themeBackgroundFills }}" placeholder="{{ trans('forms.settings.theme.background-fills') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="uppercase">
|
||||
<i class="ion ion-ios-email-outline"></i> {{ trans('dashboard.subscribers.subscribers') }}
|
||||
</span>
|
||||
@if($current_user->isAdmin && $enable_subscribers)
|
||||
@if($currentUser->isAdmin && $enableSubscribers)
|
||||
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.subscribers.create') }}">
|
||||
{{ trans('dashboard.subscribers.add.title') }}
|
||||
</a>
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<p class="lead">
|
||||
@if($enable_subscribers)
|
||||
@if($enableSubscribers)
|
||||
{{ trans('dashboard.subscribers.description') }}
|
||||
@else
|
||||
{{ trans('dashboard.subscribers.description_disabled') }}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<input type="password" class="form-control password-strength" name="password" value="" placeholder="{{ trans('forms.user.password') }}">
|
||||
<div class="strengthify-wrapper"></div>
|
||||
</div>
|
||||
@if($current_user->isAdmin)
|
||||
@if($currentUser->isAdmin)
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.user_level') }}</label>
|
||||
<select name="level" class="form-control">
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.password') }}</label>
|
||||
<input type="password" class="form-control password-strength" name="password" value="" {{ !$current_user->isAdmin ? "disabled": "" }} placeholder="{{ trans('forms.user.password') }}">
|
||||
<input type="password" class="form-control password-strength" name="password" value="" {{ !$currentUser->isAdmin ? "disabled": "" }} placeholder="{{ trans('forms.user.password') }}">
|
||||
<div class="strengthify-wrapper"></div>
|
||||
</div>
|
||||
@if($current_user->isAdmin)
|
||||
@if($currentUser->isAdmin)
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.user_level') }}</label>
|
||||
<select name="level" class="form-control">
|
||||
@@ -42,9 +42,9 @@
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
|
||||
@if($current_user->isAdmin)
|
||||
@if($currentUser->isAdmin)
|
||||
<a class="btn btn-info" href="{{ cachet_route('dashboard.user.api.regen', [$user->id]) }}">{{ trans('cachet.api.revoke') }}</a>
|
||||
@if($current_user->id != $user->id)
|
||||
@if($currentUser->id != $user->id)
|
||||
<a class="btn btn-danger confirm-action" href="{{ cachet_route('dashboard.team.delete', [$user->id], 'delete') }}" data-method="DELETE">{{ trans('forms.delete') }}</a>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="uppercase">
|
||||
<i class="ion ion-ios-people-outline"></i> {{ trans('dashboard.team.team') }}
|
||||
</span>
|
||||
@if($current_user->isAdmin)
|
||||
@if($currentUser->isAdmin)
|
||||
<div class="button-group pull-right">
|
||||
<a class="btn btn-sm btn-success" href="{{ cachet_route('dashboard.team.invite') }}">
|
||||
{{ trans('dashboard.team.invite.title') }}
|
||||
@@ -26,9 +26,9 @@
|
||||
<p class="lead">{{ trans('dashboard.team.description') }}</p>
|
||||
|
||||
<div class="user-grid">
|
||||
@foreach($team_members as $member)
|
||||
@foreach($teamMembers as $member)
|
||||
<div class="user col-sm-3 col-xs-6">
|
||||
<a href="@if($current_user->id == $member->id) {{ url('dashboard/user') }} @else /dashboard/team/{{ $member->id }} @endif">
|
||||
<a href="@if($currentUser->id == $member->id) {{ url('dashboard/user') }} @else /dashboard/team/{{ $member->id }} @endif">
|
||||
<img src="{{ $member->avatar }}">
|
||||
</a>
|
||||
<div class="name">{{ $member->username }}</div>
|
||||
|
||||
@@ -33,10 +33,10 @@ window.addEventListener("DOMContentLoaded", function(e) {
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if($updated_template = Session::get('updated_template'))
|
||||
<div class="alert alert-{{ ($template_errors = Session::get('template_errors')) ? 'danger' : 'success' }}">
|
||||
@if($template_errors)
|
||||
{{ sprintf("%s - %s", trans('dashboard.notifications.whoops'), trans('dashboard.incidents.templates.edit.failure').' '.$template_errors) }}
|
||||
@if($updatedTemplate = Session::get('updated_template'))
|
||||
<div class="alert alert-{{ ($templateErrors = Session::get('template_errors')) ? 'danger' : 'success' }}">
|
||||
@if($templateErrors)
|
||||
{{ sprintf("%s - %s", trans('dashboard.notifications.whoops'), trans('dashboard.incidents.templates.edit.failure').' '.$templateErrors) }}
|
||||
@else
|
||||
{{ sprintf("%s - %s", trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.edit.success')) }}
|
||||
@endif
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="col-sm-12">
|
||||
@include('partials.errors')
|
||||
<div class="striped-list">
|
||||
@forelse($incident_templates as $template)
|
||||
@forelse($incidentTemplates as $template)
|
||||
<div class="row striped-list-item">
|
||||
<div class="col-xs-6">
|
||||
<strong>{{ $template->name }}</strong>
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
<a href="https://gravatar.com"><img src="{{ $current_user->avatar }}" class="img-responsive img-thumbnail" title="{{ trans('forms.user.gravatar') }}" data-toggle="tooltip"></a>
|
||||
<a href="https://gravatar.com"><img src="{{ $currentUser->avatar }}" class="img-responsive img-thumbnail" title="{{ trans('forms.user.gravatar') }}" data-toggle="tooltip"></a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.username') }}</label>
|
||||
<input type="text" class="form-control" name="username" value="{{ $current_user->username }}" required placeholder="{{ trans('forms.user.username') }}">
|
||||
<input type="text" class="form-control" name="username" value="{{ $currentUser->username }}" required placeholder="{{ trans('forms.user.username') }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.email') }}</label>
|
||||
<input type="email" class="form-control" name="email" value="{{ $current_user->email }}" required placeholder="{{ trans('forms.user.email') }}">
|
||||
<input type="email" class="form-control" name="email" value="{{ $currentUser->email }}" required placeholder="{{ trans('forms.user.email') }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.password') }}</label>
|
||||
@@ -38,8 +38,8 @@
|
||||
<div class="form-group">
|
||||
<label>{{ trans('forms.user.api-token') }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="api_key" readonly value="{{ $current_user->api_key }}" placeholder="{{ trans('forms.user.api-token') }}">
|
||||
<a href="{{ cachet_route('dashboard.user.api.regen', [$current_user->id]) }}" class="input-group-addon btn btn-danger">{{ trans('cachet.api.regenerate') }}</a>
|
||||
<input type="text" class="form-control" name="api_key" readonly value="{{ $currentUser->api_key }}" placeholder="{{ trans('forms.user.api-token') }}">
|
||||
<a href="{{ cachet_route('dashboard.user.api.regen', [$currentUser->id]) }}" class="input-group-addon btn btn-danger">{{ trans('cachet.api.regenerate') }}</a>
|
||||
</div>
|
||||
<span class="help-block">{{ trans('forms.user.api-token-help') }}</span>
|
||||
</div>
|
||||
@@ -47,17 +47,17 @@
|
||||
<div class="form-group">
|
||||
<label class="checkbox-inline">
|
||||
<input type="hidden" name="google2fa" value="0">
|
||||
<input type='checkbox' name="google2fa" value="1" {{ $current_user->hasTwoFactor ? "checked" : "" }}>
|
||||
<input type='checkbox' name="google2fa" value="1" {{ $currentUser->hasTwoFactor ? "checked" : "" }}>
|
||||
{{ trans('forms.setup.enable_google2fa') }}
|
||||
</label>
|
||||
</div>
|
||||
@if($current_user->hasTwoFactor)
|
||||
@if($currentUser->hasTwoFactor)
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$google2fa_url = PragmaRX\Google2FA\Vendor\Laravel\Facade::getQRCodeGoogleUrl(
|
||||
'Cachet',
|
||||
$current_user->email,
|
||||
$current_user->google_2fa_secret
|
||||
$currentUser->email,
|
||||
$currentUser->google_2fa_secret
|
||||
);
|
||||
?>
|
||||
<img src="{{ $google2fa_url }}" class="img-responsive">
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('/img/apple-touch-icon-144x144.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('/img/apple-touch-icon-152x152.png') }}">
|
||||
|
||||
<title>{{ $page_title or $site_title }}</title>
|
||||
<title>{{ $pageTitle or $siteTitle }}</title>
|
||||
|
||||
@if($enable_external_dependencies)
|
||||
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $font_subset }}" rel="stylesheet" type="text/css"> --}}
|
||||
@if($enableExternalDependencies)
|
||||
{{-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $fontSubset }}" rel="stylesheet" type="text/css"> --}}
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ mix('dist/css/dashboard/dashboard.css') }}">
|
||||
@yield('css')
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var Global = {};
|
||||
Global.locale = '{{ $app_locale }}';
|
||||
Global.locale = '{{ $appLocale }}';
|
||||
</script>
|
||||
|
||||
<script src="{{ mix('dist/js/manifest.js') }}"></script>
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('/img/apple-touch-icon-144x144.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('/img/apple-touch-icon-152x152.png') }}">
|
||||
|
||||
<title>{{ $page_title or $site_title }}</title>
|
||||
<title>{{ $pageTitle or $siteTitle }}</title>
|
||||
|
||||
<script>
|
||||
window.Global = {}
|
||||
Global.locale = '{{ $app_locale }}';
|
||||
Global.locale = '{{ $appLocale }}';
|
||||
Global.csrfToken = '{{ csrf_token() }}';
|
||||
</script>
|
||||
|
||||
@if($enable_external_dependencies)
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $font_subset }}" rel="stylesheet" type="text/css">
|
||||
@if($enableExternalDependencies)
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $fontSubset }}" rel="stylesheet" type="text/css">
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ mix('dist/css/dashboard/dashboard.css') }}">
|
||||
@yield('css')
|
||||
@@ -42,11 +42,9 @@
|
||||
|
||||
<body class="dashboard">
|
||||
<div class="wrapper" id="app">
|
||||
<dashboard inline-template :user="{{ $current_user }}">
|
||||
<div>
|
||||
@include('dashboard.partials.sidebar')
|
||||
<div class="page-content">
|
||||
@if(!$is_writeable)
|
||||
@if(!$isWriteable)
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@@ -61,8 +59,6 @@
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
</dashboard>
|
||||
</div>
|
||||
</body>
|
||||
@yield('js')
|
||||
<script src="{{ mix('dist/js/all.js') }}"></script>
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
<meta name="env" content="{{ app('env') }}">
|
||||
<meta name="token" content="{{ csrf_token() }}">
|
||||
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ cachet_route('feed.atom') }}" title="{{ $site_title }} - Atom Feed">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ cachet_route('feed.rss') }}" title="{{ $site_title }} - RSS Feed">
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ cachet_route('feed.atom') }}" title="{{ $siteTitle }} - Atom Feed">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ cachet_route('feed.rss') }}" title="{{ $siteTitle }} - RSS Feed">
|
||||
|
||||
<!-- Mobile friendliness -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $app_name]))">
|
||||
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
||||
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $site_title }}">
|
||||
<meta property="og:title" content="{{ $siteTitle }}">
|
||||
<meta property="og:image" content="/img/favicon.png">
|
||||
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $app_name]))">
|
||||
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $appName]))">
|
||||
|
||||
<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
|
||||
<meta name="msapplication-TileColor" content="{{ $theme_greens }}" />
|
||||
<meta name="msapplication-TileColor" content="{{ $themeGreens }}" />
|
||||
<meta name="msapplication-TileImage" content="{{ asset('/img/favicon.png') }}" />
|
||||
|
||||
@if (isset($favicon))
|
||||
@@ -44,10 +44,10 @@
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('/img/apple-touch-icon-144x144.png') }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('/img/apple-touch-icon-152x152.png') }}">
|
||||
|
||||
<title>@yield('title', $site_title)</title>
|
||||
<title>@yield('title', $siteTitle)</title>
|
||||
|
||||
@if($enable_external_dependencies)
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $font_subset }}" rel="stylesheet" type="text/css">
|
||||
@if($enableExternalDependencies)
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset={{ $fontSubset }}" rel="stylesheet" type="text/css">
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ mix('dist/css/app.css') }}">
|
||||
|
||||
@@ -55,26 +55,25 @@
|
||||
|
||||
@include('partials.crowdin')
|
||||
|
||||
@if($app_stylesheet)
|
||||
@if($appStylesheet)
|
||||
<style type="text/css">
|
||||
{!! $app_stylesheet !!}
|
||||
{!! $appStylesheet !!}
|
||||
</style>
|
||||
@endif
|
||||
|
||||
<script type="text/javascript">
|
||||
var Global = {};
|
||||
|
||||
var refreshRate = parseInt("{{ $app_refresh_rate }}");
|
||||
var refreshRate = parseInt("{{ $appRefreshRate }}");
|
||||
|
||||
function refresh() {
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
if(refreshRate > 0) {
|
||||
if (refreshRate > 0) {
|
||||
setTimeout(refresh, refreshRate * 1000);
|
||||
}
|
||||
|
||||
Global.locale = '{{ $app_locale }}';
|
||||
Global.locale = '{{ $appLocale }}';
|
||||
</script>
|
||||
<script src="{{ mix('dist/js/manifest.js') }}"></script>
|
||||
<script src="{{ mix('dist/js/vendor.js') }}"></script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@if($about_app)
|
||||
@if($aboutApp)
|
||||
<div class="about-app">
|
||||
<h2>{{ trans('cachet.about_this_site') }}</h2>
|
||||
{!! $about_app !!}
|
||||
{!! $aboutApp !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
@if($enable_external_dependencies)
|
||||
@if($app_analytics)
|
||||
@if($enableExternalDependencies)
|
||||
@if($appAnalytics)
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', '{{ $app_analytics }}', 'auto');
|
||||
ga('create', '{{ $appAnalytics }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
@endif
|
||||
@if($app_analytics_go_squared)
|
||||
@if($appAnalyticsGoSquared)
|
||||
<script>
|
||||
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(
|
||||
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0];
|
||||
d.src='https://d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode.
|
||||
insertBefore(d,q)}(window,document,'script','_gs');
|
||||
_gs('{{ $app_analytics_go_squared }}');
|
||||
_gs('{{ $appAnalyticsGoSquared }}');
|
||||
</script>
|
||||
@endif
|
||||
@if($app_analytics_piwik_url)
|
||||
@if($appAnalyticsPiwikUrl)
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="{{ $app_analytics_piwik_url }}";
|
||||
var u="{{ $appAnalyticsPiwikUrl }}";
|
||||
_paq.push(['setTrackerUrl', u+'/piwik.php']);
|
||||
_paq.push(['setSiteId', {{ $app_analytics_piwik_site_id }}]);
|
||||
_paq.push(['setSiteId', {{ $appAnalyticsPiwikSiteID }}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'/piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="{{ $app_analytics_piwik_url }}/piwik.php?idsite={{ $app_analytics_piwik_site_id }}" style="border:0;" alt="" /></p></noscript>
|
||||
<noscript><p><img src="{{ $appAnalyticsPiwikUrl }}/piwik.php?idsite={{ $appAnalyticsPiwikSiteID }}" style="border:0;" alt="" /></p></noscript>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
@if($app_header)
|
||||
{!! $app_header !!}
|
||||
@if($appHeader)
|
||||
{!! $appHeader !!}
|
||||
@else
|
||||
@if($app_banner)
|
||||
<div @if($app_banner_style_full_width)class="app-banner"@endif>
|
||||
@if($appBanner)
|
||||
<div @if($appBannerStyleFullWidth)class="app-banner"@endif>
|
||||
<div class="container">
|
||||
<div class="row app-banner-padding @if(!$app_banner_style_full_width) app-banner @endif">
|
||||
<div class="row app-banner-padding @if(!$appBannerStyleFullWidth) app-banner @endif">
|
||||
<div class="col-md-12 text-center">
|
||||
@if($app_domain)
|
||||
<a href="{{ $app_domain }}" class="links"><img src="data:{{ $app_banner_type }};base64, {{ $app_banner }}" class="banner-image img-responsive"></a>
|
||||
@if($appDomain)
|
||||
<a href="{{ $appDomain }}" class="links"><img src="data:{{ $app_banner_type }};base64, {{ $appBanner }}" class="banner-image img-responsive"></a>
|
||||
@else
|
||||
<img src="data:{{ $app_banner_type }};base64, {{ $app_banner }}" class="banner-image img-responsive">
|
||||
<img src="data:{{ $appBannerType }};base64, {{ $appBanner }}" class="banner-image img-responsive">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user