Merge branch '2.3'
This commit is contained in:
@@ -39,9 +39,15 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
'CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent' => [
|
'CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent' => [
|
||||||
'CachetHQ\Cachet\Bus\Handlers\Events\Component\SendComponentUpdateEmailNotificationHandler',
|
'CachetHQ\Cachet\Bus\Handlers\Events\Component\SendComponentUpdateEmailNotificationHandler',
|
||||||
],
|
],
|
||||||
|
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasRemovedEvent' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent' => [
|
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent' => [
|
||||||
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentEmailNotificationHandler',
|
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendIncidentEmailNotificationHandler',
|
||||||
],
|
],
|
||||||
|
'CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
'CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent' => [
|
'CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent' => [
|
||||||
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendMaintenanceEmailNotificationHandler',
|
'CachetHQ\Cachet\Bus\Handlers\Events\Incident\SendMaintenanceEmailNotificationHandler',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ class AuthController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function postLogin()
|
public function postLogin()
|
||||||
{
|
{
|
||||||
$loginData = Binput::only(['login', 'password']);
|
$loginData = Binput::only(['username', 'password']);
|
||||||
|
|
||||||
// Login with username or email.
|
// Login with username or email.
|
||||||
$loginKey = Str::contains($loginData['login'], '@') ? 'email' : 'username';
|
$loginKey = Str::contains($loginData['username'], '@') ? 'email' : 'username';
|
||||||
$loginData[$loginKey] = array_pull($loginData, 'login');
|
$loginData[$loginKey] = array_pull($loginData, 'username');
|
||||||
|
|
||||||
// Validate login credentials.
|
// Validate login credentials.
|
||||||
if (Auth::validate($loginData)) {
|
if (Auth::validate($loginData)) {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
|
|||||||
|
|
||||||
use CachetHQ\Cachet\Integrations\Feed;
|
use CachetHQ\Cachet\Integrations\Feed;
|
||||||
use CachetHQ\Cachet\Models\Component;
|
use CachetHQ\Cachet\Models\Component;
|
||||||
|
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||||
use CachetHQ\Cachet\Models\Incident;
|
use CachetHQ\Cachet\Models\Incident;
|
||||||
use CachetHQ\Cachet\Models\Subscriber;
|
use CachetHQ\Cachet\Models\Subscriber;
|
||||||
use Illuminate\Routing\Controller;
|
use Illuminate\Routing\Controller;
|
||||||
@@ -67,6 +68,9 @@ class DashboardController extends Controller
|
|||||||
$components = Component::orderBy('order')->get();
|
$components = Component::orderBy('order')->get();
|
||||||
$incidents = $this->getIncidents();
|
$incidents = $this->getIncidents();
|
||||||
$subscribers = $this->getSubscribers();
|
$subscribers = $this->getSubscribers();
|
||||||
|
$usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->pluck('group_id');
|
||||||
|
$componentGroups = ComponentGroup::whereIn('id', $usedComponentGroups)->orderBy('order')->get();
|
||||||
|
$ungroupedComponents = Component::enabled()->where('group_id', 0)->orderBy('order')->orderBy('created_at')->get();
|
||||||
|
|
||||||
$entries = null;
|
$entries = null;
|
||||||
if ($feed = $this->feed->latest()) {
|
if ($feed = $this->feed->latest()) {
|
||||||
@@ -78,7 +82,9 @@ class DashboardController extends Controller
|
|||||||
->withComponents($components)
|
->withComponents($components)
|
||||||
->withIncidents($incidents)
|
->withIncidents($incidents)
|
||||||
->withSubscribers($subscribers)
|
->withSubscribers($subscribers)
|
||||||
->withEntries($entries);
|
->withEntries($entries)
|
||||||
|
->withComponentGroups($componentGroups)
|
||||||
|
->withUngroupedComponents($ungroupedComponents);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,6 +42,22 @@ class SetupController extends Controller
|
|||||||
'redis' => 'Redis',
|
'redis' => 'Redis',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of cache drivers.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
protected $mailDrivers = [
|
||||||
|
'smtp' => 'SMTP',
|
||||||
|
'mail' => 'Mail',
|
||||||
|
'sendmail' => 'Sendmail',
|
||||||
|
'mailgun' => 'Mailgun',
|
||||||
|
'mandrill' => 'Mandrill',
|
||||||
|
// 'ses' => 'Amazon SES', this will be available only if aws/aws-sdk-php is installed
|
||||||
|
'sparkpost' => 'SparkPost',
|
||||||
|
'log' => 'Log (Testing)',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of step1 rules.
|
* Array of step1 rules.
|
||||||
*
|
*
|
||||||
@@ -73,6 +89,7 @@ class SetupController extends Controller
|
|||||||
$this->rulesStep1 = [
|
$this->rulesStep1 = [
|
||||||
'env.cache_driver' => 'required|in:'.implode(',', array_keys($this->cacheDrivers)),
|
'env.cache_driver' => 'required|in:'.implode(',', array_keys($this->cacheDrivers)),
|
||||||
'env.session_driver' => 'required|in:'.implode(',', array_keys($this->cacheDrivers)),
|
'env.session_driver' => 'required|in:'.implode(',', array_keys($this->cacheDrivers)),
|
||||||
|
'env.mail_driver' => 'required|in:'.implode(',', array_keys($this->mailDrivers)),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->rulesStep2 = [
|
$this->rulesStep2 = [
|
||||||
@@ -112,6 +129,7 @@ class SetupController extends Controller
|
|||||||
return View::make('setup')
|
return View::make('setup')
|
||||||
->withPageTitle(trans('setup.setup'))
|
->withPageTitle(trans('setup.setup'))
|
||||||
->withCacheDrivers($this->cacheDrivers)
|
->withCacheDrivers($this->cacheDrivers)
|
||||||
|
->withMailDrivers($this->mailDrivers)
|
||||||
->withUserLanguage($userLanguage)
|
->withUserLanguage($userLanguage)
|
||||||
->withAppUrl(Request::root());
|
->withAppUrl(Request::root());
|
||||||
}
|
}
|
||||||
@@ -127,6 +145,14 @@ class SetupController extends Controller
|
|||||||
|
|
||||||
$v = Validator::make($postData, $this->rulesStep1);
|
$v = Validator::make($postData, $this->rulesStep1);
|
||||||
|
|
||||||
|
$v->sometimes('env.mail_host', 'required', function ($input) {
|
||||||
|
return $input->mail_driver === 'smtp';
|
||||||
|
});
|
||||||
|
|
||||||
|
$v->sometimes(['env.mail_address', 'env.mail_username', 'env.mail_password'], 'required', function ($input) {
|
||||||
|
return $input->mail_driver !== 'log';
|
||||||
|
});
|
||||||
|
|
||||||
if ($v->passes()) {
|
if ($v->passes()) {
|
||||||
return Response::json(['status' => 1]);
|
return Response::json(['status' => 1]);
|
||||||
}
|
}
|
||||||
@@ -224,8 +250,10 @@ class SetupController extends Controller
|
|||||||
try {
|
try {
|
||||||
(new Dotenv($dir, $file))->load();
|
(new Dotenv($dir, $file))->load();
|
||||||
|
|
||||||
|
$envValue = env(strtoupper($key)) ?: 'null';
|
||||||
|
|
||||||
file_put_contents($path, str_replace(
|
file_put_contents($path, str_replace(
|
||||||
env(strtoupper($key)), $value, file_get_contents($path)
|
$envValue, $value, file_get_contents($path)
|
||||||
));
|
));
|
||||||
} catch (InvalidPathException $e) {
|
} catch (InvalidPathException $e) {
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.9",
|
"php": ">=5.5.9",
|
||||||
"laravel/framework": "5.2.37",
|
"laravel/framework": "5.2.39",
|
||||||
"alt-three/badger": "^3.1",
|
"alt-three/badger": "^3.1",
|
||||||
"alt-three/bus": "^1.1",
|
"alt-three/bus": "^1.1",
|
||||||
"alt-three/emoji": "^3.1",
|
"alt-three/emoji": "^3.1",
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
"database"
|
"database"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"app/Http/helpers.php"
|
"app/helpers.php"
|
||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"CachetHQ\\Cachet\\": "app/"
|
"CachetHQ\\Cachet\\": "app/"
|
||||||
|
|||||||
103
composer.lock
generated
103
composer.lock
generated
@@ -4,8 +4,8 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "bd74187402d65466fb19617859c8d507",
|
"hash": "85b73f3211babb4bf992e5628a862804",
|
||||||
"content-hash": "3f1683299582010eced0a6ebd4daf734",
|
"content-hash": "7b5f27f3d4ef54e83dd203203d704984",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "alt-three/badger",
|
"name": "alt-three/badger",
|
||||||
@@ -325,16 +325,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.18.17",
|
"version": "3.18.20",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "6c7849556f556da8615d22e675710c7a086ed5d0"
|
"reference": "e5a901dd3a42d0c46a90ee37a174938cd0ce55bf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6c7849556f556da8615d22e675710c7a086ed5d0",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e5a901dd3a42d0c46a90ee37a174938cd0ce55bf",
|
||||||
"reference": "6c7849556f556da8615d22e675710c7a086ed5d0",
|
"reference": "e5a901dd3a42d0c46a90ee37a174938cd0ce55bf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
"s3",
|
"s3",
|
||||||
"sdk"
|
"sdk"
|
||||||
],
|
],
|
||||||
"time": "2016-06-09 23:39:33"
|
"time": "2016-06-23 23:17:52"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "backup-manager/backup-manager",
|
"name": "backup-manager/backup-manager",
|
||||||
@@ -1759,16 +1759,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "31382fef2889136415751badebbd1cb022a4ed72"
|
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||||
"reference": "31382fef2889136415751badebbd1cb022a4ed72",
|
"reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1784,7 +1784,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0-dev"
|
"dev-master": "1.4-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1813,7 +1813,7 @@
|
|||||||
"stream",
|
"stream",
|
||||||
"uri"
|
"uri"
|
||||||
],
|
],
|
||||||
"time": "2016-04-13 19:56:01"
|
"time": "2016-06-24 23:00:38"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jakub-onderka/php-console-color",
|
"name": "jakub-onderka/php-console-color",
|
||||||
@@ -2019,16 +2019,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v5.2.37",
|
"version": "v5.2.39",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "bf199036b0e222a27e2133d841aee0d4238f804d"
|
"reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/bf199036b0e222a27e2133d841aee0d4238f804d",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/c2a77050269b4e03bd9a735a9f24e573a7598b8a",
|
||||||
"reference": "bf199036b0e222a27e2133d841aee0d4238f804d",
|
"reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2144,20 +2144,20 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2016-06-10 22:38:47"
|
"time": "2016-06-17 19:25:12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "0.13.3",
|
"version": "0.13.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/commonmark.git",
|
"url": "https://github.com/thephpleague/commonmark.git",
|
||||||
"reference": "35816f39eb2498484fbb7b1495633a976ee1a8de"
|
"reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/35816f39eb2498484fbb7b1495633a976ee1a8de",
|
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/83f8210427fb01f671e272bb8d44b4ed3a94d459",
|
||||||
"reference": "35816f39eb2498484fbb7b1495633a976ee1a8de",
|
"reference": "83f8210427fb01f671e272bb8d44b4ed3a94d459",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2213,7 +2213,7 @@
|
|||||||
"markdown",
|
"markdown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
"time": "2016-05-21 18:41:30"
|
"time": "2016-06-14 14:49:29"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
@@ -3177,16 +3177,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v3.1.0",
|
"version": "v3.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
"reference": "e17f386efef7258ac671c24e727673abd086b0cf"
|
"reference": "c526d7b3cb4fe1673c6a34e13be2ff63f519df99"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e17f386efef7258ac671c24e727673abd086b0cf",
|
"url": "https://api.github.com/repos/symfony/css-selector/zipball/c526d7b3cb4fe1673c6a34e13be2ff63f519df99",
|
||||||
"reference": "e17f386efef7258ac671c24e727673abd086b0cf",
|
"reference": "c526d7b3cb4fe1673c6a34e13be2ff63f519df99",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3226,7 +3226,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony CssSelector Component",
|
"description": "Symfony CssSelector Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-03-04 07:56:56"
|
"time": "2016-06-06 11:42:41"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
@@ -3287,16 +3287,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v3.1.0",
|
"version": "v3.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
"reference": "0343b2cedd0edb26cdc791212a8eb645c406018b"
|
"reference": "f5b7563f67779c6d3d5370e23448e707c858df3e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0343b2cedd0edb26cdc791212a8eb645c406018b",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f5b7563f67779c6d3d5370e23448e707c858df3e",
|
||||||
"reference": "0343b2cedd0edb26cdc791212a8eb645c406018b",
|
"reference": "f5b7563f67779c6d3d5370e23448e707c858df3e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3343,7 +3343,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony EventDispatcher Component",
|
"description": "Symfony EventDispatcher Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-04-12 18:27:47"
|
"time": "2016-06-06 11:42:41"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
@@ -4057,16 +4057,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
"version": "v2.2.1",
|
"version": "v2.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||||
"reference": "63f37b9395e8041cd4313129c08ece896d06ca8e"
|
"reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/63f37b9395e8041cd4313129c08ece896d06ca8e",
|
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9ca5644c536654e9509b9d257f53c58630eb2a6a",
|
||||||
"reference": "63f37b9395e8041cd4313129c08ece896d06ca8e",
|
"reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -4078,7 +4078,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.2-dev"
|
"dev-master": "2.3-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -4103,7 +4103,7 @@
|
|||||||
"env",
|
"env",
|
||||||
"environment"
|
"environment"
|
||||||
],
|
],
|
||||||
"time": "2016-04-15 10:48:49"
|
"time": "2016-06-14 14:14:52"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
@@ -5247,16 +5247,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
|
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
|
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
|
||||||
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
|
"reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5264,12 +5264,13 @@
|
|||||||
"sebastian/recursion-context": "~1.0"
|
"sebastian/recursion-context": "~1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"ext-mbstring": "*",
|
||||||
"phpunit/phpunit": "~4.4"
|
"phpunit/phpunit": "~4.4"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.2.x-dev"
|
"dev-master": "1.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -5309,7 +5310,7 @@
|
|||||||
"export",
|
"export",
|
||||||
"exporter"
|
"exporter"
|
||||||
],
|
],
|
||||||
"time": "2015-06-21 07:55:53"
|
"time": "2016-06-17 09:04:28"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/global-state",
|
"name": "sebastian/global-state",
|
||||||
@@ -5452,7 +5453,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dom-crawler",
|
"name": "symfony/dom-crawler",
|
||||||
"version": "v3.1.0",
|
"version": "v3.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/dom-crawler.git",
|
"url": "https://github.com/symfony/dom-crawler.git",
|
||||||
@@ -5508,16 +5509,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v3.1.0",
|
"version": "v3.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/yaml.git",
|
"url": "https://github.com/symfony/yaml.git",
|
||||||
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a"
|
"reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
|
"url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623",
|
||||||
"reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a",
|
"reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5553,7 +5554,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Yaml Component",
|
"description": "Symfony Yaml Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-05-26 21:46:24"
|
"time": "2016-06-14 11:18:07"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "webmozart/assert",
|
"name": "webmozart/assert",
|
||||||
|
|||||||
@@ -100,11 +100,11 @@ return [
|
|||||||
'subset' => 'latin,latin-ext',
|
'subset' => 'latin,latin-ext',
|
||||||
],
|
],
|
||||||
'pt-BR' => [
|
'pt-BR' => [
|
||||||
'name' => 'Portuguese',
|
'name' => 'Portuguese, Brazilian',
|
||||||
'subset' => 'latin,latin-ext',
|
'subset' => 'latin,latin-ext',
|
||||||
],
|
],
|
||||||
'pt-PT' => [
|
'pt-PT' => [
|
||||||
'name' => 'Portuguese, Brazilian',
|
'name' => 'Portuguese, Portugal',
|
||||||
'subset' => 'latin,latin-ext',
|
'subset' => 'latin,latin-ext',
|
||||||
],
|
],
|
||||||
'ro' => [
|
'ro' => [
|
||||||
|
|||||||
@@ -28,22 +28,22 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'mailgun' => [
|
'mailgun' => [
|
||||||
'domain' => env('MAILGUN_DOMAIN'),
|
'domain' => env('MAIL_USERNAME'),
|
||||||
'secret' => env('MAILGUN_SECRET'),
|
'secret' => env('MAIL_PASSWORD'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'mandrill' => [
|
'mandrill' => [
|
||||||
'secret' => env('MANDRILL_SECRET'),
|
'secret' => env('MAIL_PASSWORD'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
'key' => env('SES_KEY'),
|
'key' => env('MAIL_USERNAME'),
|
||||||
'secret' => env('SES_SECRET'),
|
'secret' => env('MAIL_PASSWORD'),
|
||||||
'region' => 'us-east-1',
|
'region' => 'us-east-1',
|
||||||
],
|
],
|
||||||
|
|
||||||
'sparkpost' => [
|
'sparkpost' => [
|
||||||
'secret' => env('SPARKPOST_SECRET'),
|
'secret' => env('MAIL_PASSWORD'),
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
11
resources/assets/sass/pages/_dashboard.scss
vendored
11
resources/assets/sass/pages/_dashboard.scss
vendored
@@ -1,4 +1,4 @@
|
|||||||
.componet-inline-update {
|
.component-inline-update {
|
||||||
@extend .text-right;
|
@extend .text-right;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
label {
|
label {
|
||||||
@@ -7,4 +7,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.component-group-name{
|
||||||
|
font-size: 18px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.component-group-other{
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
@import "modules/stats";
|
@import "modules/stats";
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ return [
|
|||||||
'enable_google2fa' => 'Enable Google Two Factor Authentication',
|
'enable_google2fa' => 'Enable Google Two Factor Authentication',
|
||||||
'cache_driver' => 'Cache Driver',
|
'cache_driver' => 'Cache Driver',
|
||||||
'session_driver' => 'Session Driver',
|
'session_driver' => 'Session Driver',
|
||||||
|
'mail_driver' => 'Mail Driver',
|
||||||
|
'mail_host' => 'Mail Host',
|
||||||
|
'mail_address' => 'Mail From',
|
||||||
|
'mail_username' => 'Mail Client User',
|
||||||
|
'mail_password' => 'Mail Client Password',
|
||||||
],
|
],
|
||||||
|
|
||||||
// Login form fields
|
// Login form fields
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="sr-only">{{ trans('forms.login.login') }}</label>
|
<label class="sr-only">{{ trans('forms.login.login') }}</label>
|
||||||
<input autocomplete="off" class="form-control login-input" placeholder="{{ trans('forms.login.login') }}" required="required" name="login" type="text" value="{{ Binput::old('login') }}" autofocus>
|
<input autocomplete="off" class="form-control login-input" placeholder="{{ trans('forms.login.login') }}" required="required" name="username" type="text" value="{{ Binput::old('username') }}" autofocus>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="sr-only">{{ trans('forms.login.password') }}</label>
|
<label class="sr-only">{{ trans('forms.login.password') }}</label>
|
||||||
|
|||||||
@@ -15,38 +15,22 @@
|
|||||||
<div class="alert alert-info hidden" id="update-alert">{!! trans('cachet.system.update') !!}</div>
|
<div class="alert alert-info hidden" id="update-alert">{!! trans('cachet.system.update') !!}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h4 class="sub-header">{{ trans('dashboard.components.component_statuses') }}</h4>
|
<h4 class="sub-header">{{ trans('dashboard.components.component_statuses') }}</h4>
|
||||||
<div class="panel panel-default">
|
<div class="section-components">
|
||||||
<div class="list-group">
|
@if(!$component_groups->isEmpty() || !$ungrouped_components->isEmpty())
|
||||||
@forelse($components as $component)
|
@include('dashboard.partials.components')
|
||||||
<div class="list-group-item">
|
@else
|
||||||
<form class='component-inline form-vertical' data-messenger="{{trans('dashboard.components.edit.success')}}">
|
<ul class="list-group components">
|
||||||
<div class="row striped-list-item">
|
<li class="list-group-item">
|
||||||
<div class="col-lg-4 col-md-3 col-sm-12">
|
<a href="{{ route('dashboard.components.add') }}">{{ trans('dashboard.components.add.message') }}</a>
|
||||||
<h4>{{ $component->name }}</h4>
|
</li>
|
||||||
</div>
|
</ul>
|
||||||
<div class="col-lg-8 col-md-9 col-sm-12 radio-items componet-inline-update">
|
@endif
|
||||||
@foreach(trans('cachet.components.status') as $statusID => $status)
|
</div>
|
||||||
<div class="radio-inline">
|
</div>
|
||||||
<label>
|
|
||||||
<input type="radio" name="status" value="{{ $statusID }}" {{ (int) $component->status === $statusID ? 'checked' : null }}>
|
|
||||||
{{ $status }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="component_id" value="{{ $component->id }}">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
@empty
|
|
||||||
<div class="list-group-item"><a href="{{ route('dashboard.components.add') }}">{{ trans('dashboard.components.add.message') }}</a></div>
|
|
||||||
@endforelse
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
20
resources/views/dashboard/partials/component.blade.php
Normal file
20
resources/views/dashboard/partials/component.blade.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<li class="list-group-item {{ $component->group_id ? "sub-component" : "component" }}">
|
||||||
|
<form class='component-inline form-vertical' data-messenger="{{trans('dashboard.components.edit.success')}}">
|
||||||
|
<div class="row striped-list-item">
|
||||||
|
<div class="col-lg-4 col-md-3 col-sm-12">
|
||||||
|
<h5 class="{{ $component->status_color }}">{{ $component->name }}</h5>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8 col-md-9 col-sm-12 radio-items component-inline-update">
|
||||||
|
@foreach(trans('cachet.components.status') as $statusID => $status)
|
||||||
|
<div class="radio-inline">
|
||||||
|
<label>
|
||||||
|
<input type="radio" name="status" value="{{ $statusID }}" {{ (int) $component->status === $statusID ? 'checked' : null }}>
|
||||||
|
{{ $status }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="component_id" value="{{ $component->id }}">
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
30
resources/views/dashboard/partials/components.blade.php
Normal file
30
resources/views/dashboard/partials/components.blade.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
@if($component_groups->count() > 0)
|
||||||
|
@foreach($component_groups as $componentGroup)
|
||||||
|
@if($componentGroup->enabled_components->count() > 0)
|
||||||
|
<ul class="list-group components">
|
||||||
|
<li class="list-group-item group-name">
|
||||||
|
<i class="{{ $componentGroup->collapse_class }} group-toggle"></i>
|
||||||
|
<span class="component-group-name">{{ $componentGroup->name }}</span>
|
||||||
|
</li>
|
||||||
|
<div class="group-items {{ $componentGroup->is_collapsed ? "hide" : null }}">
|
||||||
|
@foreach($componentGroup->enabled_components()->orderBy('order')->get() as $component)
|
||||||
|
@include('dashboard.partials.component', compact($component))
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($ungrouped_components->count() > 0)
|
||||||
|
<ul class="list-group components">
|
||||||
|
@if($component_groups->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)
|
||||||
|
@include('dashboard.partials.component', compact($component))
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
@@ -56,6 +56,46 @@
|
|||||||
<span class="text-danger">{{ $errors->first('env.session_driver') }}</span>
|
<span class="text-danger">{{ $errors->first('env.session_driver') }}</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.setup.mail_driver') }}</label>
|
||||||
|
<select name="env[mail_driver]" class="form-control" required>
|
||||||
|
<option disabled>{{ trans('forms.setup.mail_driver') }}</option>
|
||||||
|
@foreach($mail_drivers as $driver => $driverName)
|
||||||
|
<option value="{{ $driver }}" {{ Binput::old('env.mail_driver') == $driver ? "selected" : null }}>{{ $driverName }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
@if($errors->has('env.mail_driver'))
|
||||||
|
<span class="text-danger">{{ $errors->first('env.mail_driver') }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.setup.mail_host') }} (optional)</label>
|
||||||
|
<input type="text" class="form-control" name="env[mail_host]" value="{{ Binput::old('env.mail_host') }}">
|
||||||
|
@if($errors->has('env.mail_host'))
|
||||||
|
<span class="text-danger">{{ $errors->first('env.mail_host') }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.setup.mail_address') }}</label>
|
||||||
|
<input type="text" class="form-control" name="env[mail_address]" value="{{ Binput::old('env.mail_address') }}" placeholder="notifications@alt-three.com">
|
||||||
|
@if($errors->has('env.mail_address'))
|
||||||
|
<span class="text-danger">{{ $errors->first('env.mail_address') }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.setup.mail_username') }}</label>
|
||||||
|
<input type="text" class="form-control" name="env[mail_username]" value="{{ Binput::old('env.mail_username') }}">
|
||||||
|
@if($errors->has('env.mail_username'))
|
||||||
|
<span class="text-danger">{{ $errors->first('env.mail_username') }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.setup.mail_password') }}</label>
|
||||||
|
<input type="text" class="form-control" name="env[mail_password]" value="{{ Binput::old('env.mail_password') }}" autocomplete="off">
|
||||||
|
@if($errors->has('env.mail_password'))
|
||||||
|
<span class="text-danger">{{ $errors->first('env.mail_password') }}</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user