diff --git a/.env.example b/.env.example index 32be104..a1635ae 100644 --- a/.env.example +++ b/.env.example @@ -18,6 +18,12 @@ DB_SSLROOTCERT=/var/www/html/config/ssl/ca.crt DB_SSLCERT=/var/www/html/config/ssl/client.crt DB_SSLKEY=/var/www/html/config/ssl/client.key +DB_JOBS_CONNECTION=jobs +DB_JOBS_HOST=jobs +DB_JOBS_DATABASE= +DB_JOBS_USERNAME= +DB_JOBS_PASSWORD= + DB_MONGO_HOST=mongo DB_MONGO_USERNAME=mongo DB_MONGO_PASSWORD=password diff --git a/app/Http/Requests/SystemRegister.php b/app/Http/Requests/SystemRegister.php index 70fe914..4ad988c 100644 --- a/app/Http/Requests/SystemRegister.php +++ b/app/Http/Requests/SystemRegister.php @@ -46,7 +46,7 @@ class SystemRegister extends FormRequest ], ($this->so->exists || ($request->action != 'create')) ? [ 'location' => 'required|min:3', - 'hold' => 'required|boolean', + 'sysop' => 'required|min:3', 'phone' => 'nullable|regex:/^([0-9-]+)$/', 'address' => 'nullable|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i', @@ -57,7 +57,10 @@ class SystemRegister extends FormRequest 'mailer_port' => 'nullable|digits_between:2,5', 'zt_id' => 'nullable|size:10|regex:/^([A-Fa-f0-9]){10}$/|unique:systems,zt_id,'.($this->so->exists ? $this->so->id : 0), ] : [], - $this->so->exists ? ['active' => 'required|boolean'] : [], + $this->so->exists ? [ + 'active' => 'required|boolean', + 'hold' => 'required|boolean', + ] : [], )); } } \ No newline at end of file diff --git a/config/database.php b/config/database.php index 235fca5..7116258 100644 --- a/config/database.php +++ b/config/database.php @@ -118,6 +118,23 @@ return [ 'database' => env('DB_AUTHENTICATION_DATABASE', 'admin'), // required with Mongo 3+ ], ], + + 'jobs' => [ + 'driver' => 'pgsql', + 'host' => env('DB_JOBS_HOST', '127.0.0.1'), + 'port' => env('DB_JOBS_PORT', '5432'), + 'database' => env('DB_JOBS_DATABASE', 'forge'), + 'username' => env('DB_JOBS_USERNAME', 'forge'), + 'password' => env('DB_JOBS_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + 'schema' => 'public', + 'sslmode' => 'disable', //depends on your security level https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS + 'sslrootcert' => env('DB_JOBS_SSLROOTCERT', 'config/ssl/ca.crt'), + 'sslcert' => env('DB_JOBS_SSLCERT', 'config/ssl/client.crt'), + 'sslkey' => env('DB_JOBS_SSLKEY', 'config/ssl/client.key'), + ], ], /* diff --git a/config/queue.php b/config/queue.php index c1430b4..ffb1b6b 100644 --- a/config/queue.php +++ b/config/queue.php @@ -35,6 +35,7 @@ return [ ], 'database' => [ + 'connection' => 'jobs', 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', @@ -79,7 +80,8 @@ return [ */ 'failed' => [ - 'database' => env('DB_CONNECTION', 'mysql'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'database' => env('DB_JOBS_CONNECTION', 'jobs'), 'table' => 'failed_jobs', ], diff --git a/database/seeders/InitialSetupSeeder.php b/database/seeders/InitialSetupSeeder.php index 329fe7b..5d71f72 100644 --- a/database/seeders/InitialSetupSeeder.php +++ b/database/seeders/InitialSetupSeeder.php @@ -45,7 +45,6 @@ class InitialSetupSeeder extends Seeder $do = new Domain; $do->forceFill([ 'name'=>'private', - 'default'=>TRUE, 'active'=>TRUE, 'public'=>TRUE, 'notes'=>'PrivateNet: Internal Testing Network' @@ -55,6 +54,7 @@ class InitialSetupSeeder extends Seeder $zo = new Zone; $zo->forceFill([ 'zone_id'=>'10', + 'default'=>TRUE, 'active'=>TRUE, 'system_id'=>$so->id, ]); @@ -83,6 +83,7 @@ class InitialSetupSeeder extends Seeder 'name'=>'-BAD_AREA', 'description'=>'Inbound invalid echomail', 'active'=>TRUE, + 'public'=>TRUE, 'domain_id'=>$do->id, ]); @@ -90,6 +91,7 @@ class InitialSetupSeeder extends Seeder 'name'=>'-BAD_AREA', 'description'=>'Inbound invalid files', 'active'=>TRUE, + 'public'=>TRUE, 'domain_id'=>$do->id, ]); } diff --git a/resources/views/system/widget/form-system.blade.php b/resources/views/system/widget/form-system.blade.php index f3d73f3..76a04f3 100644 --- a/resources/views/system/widget/form-system.blade.php +++ b/resources/views/system/widget/form-system.blade.php @@ -9,6 +9,8 @@
+ +
@error('name') {{ $message }} diff --git a/resources/views/user/system/register.blade.php b/resources/views/user/system/register.blade.php index 86c1314..3676ece 100644 --- a/resources/views/user/system/register.blade.php +++ b/resources/views/user/system/register.blade.php @@ -15,11 +15,12 @@
+
- +