#123: Added the dropdown to the settings page to select from storage locations

This commit is contained in:
Andy Heathershaw 2019-07-11 09:01:20 +01:00
parent ebbc5ba097
commit f26f545b76
3 changed files with 89 additions and 58 deletions

View File

@ -8,6 +8,7 @@ use App\AlbumSources\LocalFilesystemSource;
use App\AlbumSources\OpenStackSource;
use App\AlbumSources\RackspaceSource;
use App\Configuration;
use App\Storage;
class ConfigHelper
{
@ -102,6 +103,7 @@ class ConfigHelper
'allow_photo_comments' => false,
'allow_photo_comments_anonymous' => true,
'allow_self_registration' => true,
'analysis_queue_storage_location' => Storage::where('is_default', true)->first()->id,
'analytics_code' => '',
'app_name' => trans('global.app_name'),
'date_format' => $this->allowedDateFormats()[0],

View File

@ -260,6 +260,10 @@ return [
'albums_menu_heading' => 'Albums Navigation Menu',
'albums_menu_number_items' => 'Number of albums to display:',
'albums_menu_parents_only' => 'Only show top-level albums',
'analysis_queue_storage' => 'Analysis Queue Storage Driver',
'analysis_queue_storage_intro' => 'The analysis queue is a temporary storage location for images waiting to be analysed after an upload or a meta-data refresh.',
'analysis_queue_storage_intro_2' => 'Select the storage location to use for the analysis queue. If you are using RabbitMQ, it is recommended this is a cloud storage location.',
'analysis_queue_storage_warning' => 'Using a cloud storage location may incur additional transfer costs. Consult your storage provider to check these costs.',
'analytics_cookie_link_1' => 'Information about the EU Cookie Law directive',
'analytics_cookie_link_2' => 'Cookie Consent by Insites',
'analytics_cookie_warning_1' => 'If you are based in Europe and you enable visitor tracking, you will need to comply with the EU Cookie Law. The easiest way to do so is using a script like Cookie Consent by Insites.',

View File

@ -129,7 +129,6 @@
<div class="alert alert-info mb-5">
<p class="mb-0">@lang('admin.settings.image_processing_queue_intro_3')</p>
</div>
</fieldset>
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" id="rabbitmq-enabled" name="rabbitmq_enabled" @if (UserConfig::get('rabbitmq_enabled'))checked="checked"@endif>
@ -193,6 +192,32 @@
</div>
@endif
</div>
</fieldset>
<hr/>
<fieldset>
<legend>@lang('admin.settings.analysis_queue_storage')</legend>
<p>@lang('admin.settings.analysis_queue_storage_intro')</p>
<p>@lang('admin.settings.analysis_queue_storage_intro_2')</p>
<div class="alert alert-warning mb-5">
<p class="mb-0">@lang('admin.settings.analysis_queue_storage_warning')</p>
</div>
<div class="form-group">
<label class="form-control-label" for="analysis-queue-storage-location">Analysis queue storage:</label>
<select class="form-control{{ $errors->has('analysis_queue_storage_location') ? ' is-invalid' : '' }}" id="analysis-queue-storage-location" name="analysis_queue_storage_location">
<option value="{{ old('analysis_queue_storage_location', $config['analysis_queue_storage_location']) }}"></option>
</select>
@if ($errors->has('analysis_queue_storage_location'))
<div class="invalid-feedback">
<strong>{{ $errors->first('analysis_queue_storage_location') }}</strong>
</div>
@endif
</div>
</fieldset>
</div>
{{-- E-mail --}}