Add admin notifications for new Mastodon versions (#26582)

This commit is contained in:
Claire 2023-09-01 17:47:07 +02:00 committed by GitHub
parent be991f1d18
commit 16681e0f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 892 additions and 8 deletions

View file

@ -309,6 +309,7 @@ en:
unpublish: Unpublish
unpublished_msg: Announcement successfully unpublished!
updated_msg: Announcement successfully updated!
critical_update_pending: Critical update pending
custom_emojis:
assign_category: Assign category
by_domain: Domain
@ -779,6 +780,18 @@ en:
site_uploads:
delete: Delete uploaded file
destroyed_msg: Site upload successfully deleted!
software_updates:
critical_update: Critical — please update quickly
description: It is recommended to keep your Mastodon installation up to date to benefit from the latest fixes and features. Moreover, it is sometimes critical to update Mastodon in a timely manner to avoid security issues. For these reasons, Mastodon checks for updates every 30 minutes, and will notify you according to your e-mail notification preferences.
documentation_link: Learn more
release_notes: Release notes
title: Available updates
type: Type
types:
major: Major release
minor: Minor release
patch: Patch release — bugfixes and easy to apply changes
version: Version
statuses:
account: Author
application: Application
@ -843,6 +856,12 @@ en:
message_html: You haven't defined any server rules.
sidekiq_process_check:
message_html: No Sidekiq process running for the %{value} queue(s). Please review your Sidekiq configuration
software_version_critical_check:
action: See available updates
message_html: A critical Mastodon update is available, please update as quickly as possible.
software_version_patch_check:
action: See available updates
message_html: A bugfix Mastodon update is available.
upload_check_privacy_error:
action: Check here for more information
message_html: "<strong>Your web server is misconfigured. The privacy of your users is at risk.</strong>"
@ -956,6 +975,9 @@ en:
body: "%{target} is appealing a moderation decision by %{action_taken_by} from %{date}, which was %{type}. They wrote:"
next_steps: You can approve the appeal to undo the moderation decision, or ignore it.
subject: "%{username} is appealing a moderation decision on %{instance}"
new_critical_software_updates:
body: New critical versions of Mastodon have been released, you may want to update as soon as possible!
subject: Critical Mastodon updates are available for %{instance}!
new_pending_account:
body: The details of the new account are below. You can approve or reject this application.
subject: New account up for review on %{instance} (%{username})
@ -963,6 +985,9 @@ en:
body: "%{reporter} has reported %{target}"
body_remote: Someone from %{domain} has reported %{target}
subject: New report for %{instance} (#%{id})
new_software_updates:
body: New Mastodon versions have been released, you may want to update!
subject: New Mastodon versions are available for %{instance}!
new_trends:
body: 'The following items need a review before they can be displayed publicly:'
new_trending_links:

View file

@ -291,6 +291,12 @@ en:
pending_account: New account needs review
reblog: Someone boosted your post
report: New report is submitted
software_updates:
all: Notify on all updates
critical: Notify on critical updates only
label: A new Mastodon version is available
none: Never notify of updates (not recommended)
patch: Notify on bugfix updates
trending_tag: New trend requires review
rule:
text: Rule

View file

@ -3,6 +3,9 @@
SimpleNavigation::Configuration.run do |navigation|
navigation.items do |n|
n.item :web, safe_join([fa_icon('chevron-left fw'), t('settings.back')]), root_path
n.item :software_updates, safe_join([fa_icon('exclamation-circle fw'), t('admin.critical_update_pending')]), admin_software_updates_path, if: -> { ENV['UPDATE_CHECK_URL'] != '' && current_user.can?(:view_devops) && SoftwareUpdate.urgent_pending? }, html: { class: 'warning' }
n.item :profile, safe_join([fa_icon('user fw'), t('settings.profile')]), settings_profile_path, if: -> { current_user.functional? }, highlights_on: %r{/settings/profile|/settings/featured_tags|/settings/verification|/settings/privacy}
n.item :preferences, safe_join([fa_icon('cog fw'), t('settings.preferences')]), settings_preferences_path, if: -> { current_user.functional? } do |s|

View file

@ -201,4 +201,6 @@ namespace :admin do
end
end
end
resources :software_updates, only: [:index]
end

View file

@ -58,3 +58,7 @@
interval: 1 minute
class: Scheduler::SuspendedUserCleanupScheduler
queue: scheduler
software_update_check_scheduler:
interval: 30 minutes
class: Scheduler::SoftwareUpdateCheckScheduler
queue: scheduler