diff --git a/app/models/admin_dashboard_data.rb b/app/models/admin_dashboard_data.rb index 79fe3feac63..12c3bb8a07d 100644 --- a/app/models/admin_dashboard_data.rb +++ b/app/models/admin_dashboard_data.rb @@ -92,7 +92,7 @@ class AdminDashboardData add_problem_check :rails_env_check, :host_names_check, :force_https_check, :ram_check, :google_oauth2_config_check, :facebook_config_check, :twitter_config_check, - :github_config_check, :s3_config_check, + :github_config_check, :s3_config_check, :s3_cdn_check, :image_magick_check, :failing_emails_check, :subfolder_ends_in_slash_check, :pop3_polling_configuration, :email_polling_errored_recently, @@ -190,6 +190,12 @@ class AdminDashboardData nil end + def s3_cdn_check + if (GlobalSetting.use_s3? || SiteSetting.enable_s3_uploads) && SiteSetting.Upload.s3_cdn_url.blank? + I18n.t('dashboard.s3_config_warning') + end + end + def image_magick_check I18n.t('dashboard.image_magick_warning') if SiteSetting.create_thumbnails && !system("command -v convert >/dev/null;") end diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index d54b0596e95..0c13ad4e888 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1417,6 +1417,7 @@ en: github_config_warning: 'The server is configured to allow signup and login with GitHub (enable_github_logins), but the client id and secret values are not set. Go to the Site Settings and update the settings. See this guide to learn more.' s3_config_warning: 'The server is configured to upload files to S3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key, s3_use_iam_profile, or s3_upload_bucket. Go to the Site Settings and update the settings. See "How to set up image uploads to S3?" to learn more.' s3_backup_config_warning: 'The server is configured to upload backups to S3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key, s3_use_iam_profile, or s3_backup_bucket. Go to the Site Settings and update the settings. See "How to set up image uploads to S3?" to learn more.' + s3_cdn_warning: 'The server is configured to upload files to S3, but there is no S3 CDN configured. This can lead to expensive S3 costs and slower site performance. See "Using Object Storage for Uploads" to learn more.' image_magick_warning: 'The server is configured to create thumbnails of large images, but ImageMagick is not installed. Install ImageMagick using your favorite package manager or download the latest release.' failing_emails_warning: 'There are %{num_failed_jobs} email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. See the failed jobs in Sidekiq.' subfolder_ends_in_slash: "Your subfolder setup is incorrect; the DISCOURSE_RELATIVE_URL_ROOT ends in a slash."