diff --git a/app/Helpers/ConfigHelper.php b/app/Helpers/ConfigHelper.php index e050e5b..a7d2bc3 100644 --- a/app/Helpers/ConfigHelper.php +++ b/app/Helpers/ConfigHelper.php @@ -119,6 +119,11 @@ class ConfigHelper 'photo_comments_allowed_html' => 'p,div,span,a,b,i,u', 'photo_comments_thread_depth' => 3, 'public_statistics' => true, + 'rabbitmq_enabled' => false, + 'rabbitmq_server' => 'localhost', + 'rabbitmq_password' => encrypt('guest'), + 'rabbitmq_port' => 5672, + 'rabbitmq_username' => 'guest', 'recaptcha_enabled_registration' => false, 'recaptcha_secret_key' => '', 'recaptcha_site_key' => '', diff --git a/app/Http/Controllers/Admin/DefaultController.php b/app/Http/Controllers/Admin/DefaultController.php index 8e97e92..6198363 100644 --- a/app/Http/Controllers/Admin/DefaultController.php +++ b/app/Http/Controllers/Admin/DefaultController.php @@ -39,6 +39,7 @@ class DefaultController extends Controller View::share('is_admin', true); $this->passwordSettingKeys = [ + 'rabbitmq_password', 'smtp_password', 'facebook_app_secret', 'google_app_secret', @@ -241,6 +242,7 @@ class DefaultController extends Controller 'hotlink_protection', 'moderate_anonymous_users', 'moderate_known_users', + 'rabbitmq_enabled', 'recaptcha_enabled_registration', 'remove_copyright', 'require_email_verification', @@ -262,6 +264,10 @@ class DefaultController extends Controller 'google_app_secret', 'photo_comments_allowed_html', 'photo_comments_thread_depth', + 'rabbitmq_server', + 'rabbitmq_port', + 'rabbitmq_username', + 'rabbitmq_password', 'sender_address', 'sender_name', 'smtp_server', @@ -285,10 +291,17 @@ class DefaultController extends Controller // Bit of a hack when the browser returns an empty password field - meaning the user didn't change it // - don't touch it! if ( - $key == 'smtp_password' && - strlen($config->value) > 0 && - strlen($request->request->get($key)) == 0 && - strlen($request->request->get('smtp_username')) > 0 + ( + $key == 'smtp_password' && + strlen($config->value) > 0 && + strlen($request->request->get($key)) == 0 && + strlen($request->request->get('smtp_username')) > 0 + ) || ( + $key == 'rabbitmq_password' && + strlen($config->value) > 0 && + strlen($request->request->get($key)) == 0 && + strlen($request->request->get('rabbitmq_username')) > 0 + ) ) { continue; diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php index e1546be..276c278 100644 --- a/resources/lang/en/admin.php +++ b/resources/lang/en/admin.php @@ -270,6 +270,14 @@ return [ 'comments_tab' => 'Comments', 'default_album_permissions' => 'Default Album Permissions', 'default_album_permissions_intro' => 'Configure a set of permissions to apply to top-level albums that do not have their own permissions, and as a base set of permissions for newly-created albums.', + 'image_processing_queue' => 'Queue Intensive Operations in RabbitMQ', + 'image_processing_queue_beta' => 'Beta', + 'image_processing_queue_enabled' => 'Queue intensive operations in RabbitMQ', + 'image_processing_queue_enabled_help' => 'If you enable this option, you will also need to provide the connection details to your RabbitMQ server for this to take effect.', + 'image_processing_queue_intro' => 'Blue Twilight can off-load the processing of intensive operations (uploads, image analysis and bulk changes) to a secondary server using RabbitMQ.', + 'image_processing_queue_intro_2' => 'This requires a significant amount of configuration outside of Blue Twilight, so it is disabled by default. Only enable it if you know what you are doing.', + 'image_processing_queue_intro_3' => 'This is a beta-quality feature. We would appreciate feedback through the project\'s issue tracker.', + 'image_processing_tab' => 'Image Processing', 'permissions_cache' => 'Permissions Cache', 'permissions_cache_intro' => 'Blue Twilight maintains the permissions each user has to albums in the database. If you feel these aren\'t correct based on what\'s configured, you can rebuild the cache by clicking the button below.', 'rebuild_permissions_cache' => 'Rebuild Permissions Cache', diff --git a/resources/views/themes/base/admin/settings.blade.php b/resources/views/themes/base/admin/settings.blade.php index dae1233..3b61916 100644 --- a/resources/views/themes/base/admin/settings.blade.php +++ b/resources/views/themes/base/admin/settings.blade.php @@ -20,6 +20,7 @@ {{-- Nav tabs --}}