Closes #568, adds copyright information.

This commit is contained in:
James Brooks
2015-04-19 08:52:39 +01:00
parent dc139ef09f
commit 80e3d9167d
210 changed files with 1880 additions and 215 deletions

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;
@@ -112,7 +121,7 @@ class ComponentController extends AbstractController
$component->update($_component);
if (! $component->isValid()) {
if (!$component->isValid()) {
segment_track('Dashboard', [
'event' => 'Edit Component',
'success' => false,
@@ -182,7 +191,7 @@ class ComponentController extends AbstractController
$component = Component::create($_component);
if (! $component->isValid()) {
if (!$component->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Component',
'success' => false,
@@ -301,7 +310,7 @@ class ComponentController extends AbstractController
{
$group = ComponentGroup::create(Binput::get('group'));
if (! $group->isValid()) {
if (!$group->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Component Group',
'success' => false,
@@ -342,7 +351,7 @@ class ComponentController extends AbstractController
$groupData = Binput::get('group');
$group->update($groupData);
if (! $group->isValid()) {
if (!$group->isValid()) {
segment_track('Dashboard', [
'event' => 'Edit Component Group',
'success' => false,

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;
@@ -106,7 +115,7 @@ class IncidentController extends AbstractController
$incident = Incident::create($incidentData);
if (! $incident->isValid()) {
if (!$incident->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Incident',
'success' => false,
@@ -197,7 +206,7 @@ class IncidentController extends AbstractController
$_template = Binput::get('template');
$template = IncidentTemplate::create($_template);
if (! $template->isValid()) {
if (!$template->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Incident Template',
'success' => false,
@@ -277,7 +286,7 @@ class IncidentController extends AbstractController
$incidentData['user_id'] = Auth::user()->id;
$incident->update($incidentData);
if (! $incident->isValid()) {
if (!$incident->isValid()) {
segment_track('Dashboard', [
'event' => 'Edited Incident',
'success' => false,

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;
@@ -62,7 +71,7 @@ class MetricController extends AbstractController
$metricData = Binput::get('metric');
$metric = Metric::create($metricData);
if (! $metric->isValid()) {
if (!$metric->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Metric',
'success' => false,
@@ -113,7 +122,7 @@ class MetricController extends AbstractController
$_point = Binput::get('point');
$point = MetricPoint::create($_point);
if (! $point->isValid()) {
if (!$point->isValid()) {
return Redirect::back()->withInput(Binput::all())
->with('title', sprintf(
'<strong>%s</strong> %s',
@@ -173,7 +182,7 @@ class MetricController extends AbstractController
$_metric = Binput::get('metric');
$metric->update($_metric);
if (! $metric->isValid()) {
if (!$metric->isValid()) {
segment_track('Dashboard', [
'event' => 'Edited Metric',
'success' => false,

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Facades\Setting;
@@ -104,7 +113,7 @@ class ScheduleController extends AbstractController
$incident = Incident::create($scheduleData);
if (! $incident->isValid()) {
if (!$incident->isValid()) {
segment_track('Dashboard', [
'event' => 'Created Scheduled Maintenance',
'success' => false,
@@ -180,7 +189,7 @@ class ScheduleController extends AbstractController
$schedule->update($scheduleData);
if (! $schedule->isValid()) {
if (!$schedule->isValid()) {
segment_track('Dashboard', [
'event' => 'Edited Schedule',
'success' => false,

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;
@@ -59,7 +68,7 @@ class TeamController extends AbstractController
{
$user = User::create(Binput::all());
if (! $user->isValid()) {
if (!$user->isValid()) {
segment_track('Dashboard', [
'event' => 'Added User',
'success' => false,
@@ -107,7 +116,7 @@ class TeamController extends AbstractController
$user->update($items);
if (! $user->isValid()) {
if (!$user->isValid()) {
segment_track('Dashboard', [
'event' => 'Updated User',
'success' => false,

View File

@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Http\Controllers\Admin;
use CachetHQ\Cachet\Http\Controllers\AbstractController;
@@ -37,14 +46,14 @@ class UserController extends AbstractController
$enable2FA = (bool) array_pull($items, 'google2fa');
// Let's enable/disable auth
if ($enable2FA && ! Auth::user()->hasTwoFactor) {
if ($enable2FA && !Auth::user()->hasTwoFactor) {
$items['google_2fa_secret'] = Google2FA::generateSecretKey();
segment_track('User Management', [
'event' => 'enabled_two_factor',
'value' => true,
]);
} elseif (! $enable2FA) {
} elseif (!$enable2FA) {
$items['google_2fa_secret'] = '';
segment_track('User Management', [
@@ -60,7 +69,7 @@ class UserController extends AbstractController
$user = Auth::user();
$user->update($items);
if (! $user->isValid()) {
if (!$user->isValid()) {
return Redirect::back()->withInput(Binput::except('password'))
->with('title', sprintf(
'<strong>%s</strong> %s',