mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-11 12:09:36 +00:00
Address PR feedback: add yarn build, env vars, and BackupManager
Changes based on maintainer feedback from PR #1217: 1. Add yarn install/build steps to update process - Added yarn availability check in validateUpdatePreconditions - Added yarn install and yarn build steps after composer install - Added yarn rebuild to rollback process - Updated total steps count from 12 to 14 2. Add environment variables to disable web features - DISABLE_WEB_UPDATES: Completely disable web-based updates - DISABLE_BACKUP_RESTORE: Disable backup restore from web UI - Added checks in controller and template 3. Extract BackupManager service - New service handles backup creation, listing, details, and restoration - UpdateExecutor now delegates backup operations to BackupManager - Cleaner separation of concerns for future reuse 4. Merge upstream/master and resolve translation conflicts - Added Conrad info provider and generic web provider translations - Kept Update Manager translations
This commit is contained in:
parent
6b27f3aa14
commit
10c192edd1
6 changed files with 653 additions and 293 deletions
|
|
@ -34,6 +34,23 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Web Updates Disabled Warning #}
|
||||
{% if web_updates_disabled %}
|
||||
<div class="alert alert-secondary" role="alert">
|
||||
<i class="fas fa-ban me-2"></i>
|
||||
<strong>{% trans %}update_manager.web_updates_disabled{% endtrans %}</strong>
|
||||
<p class="mb-0 mt-2">{% trans %}update_manager.web_updates_disabled_hint{% endtrans %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Backup Restore Disabled Warning #}
|
||||
{% if backup_restore_disabled %}
|
||||
<div class="alert alert-secondary" role="alert">
|
||||
<i class="fas fa-ban me-2"></i>
|
||||
<strong>{% trans %}update_manager.backup_restore_disabled{% endtrans %}</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
{# Current Version Card #}
|
||||
<div class="col-lg-6 mb-4">
|
||||
|
|
@ -132,7 +149,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if status.update_available and status.can_auto_update and validation.valid %}
|
||||
{% if status.update_available and status.can_auto_update and validation.valid and not web_updates_disabled %}
|
||||
<form action="{{ path('admin_update_manager_start') }}" method="post"
|
||||
data-controller="update-confirm"
|
||||
data-update-confirm-is-downgrade-value="false"
|
||||
|
|
@ -241,7 +258,7 @@
|
|||
title="{% trans %}update_manager.view_release_notes{% endtrans %}">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
</a>
|
||||
{% if release.version != status.current_version and status.can_auto_update and validation.valid %}
|
||||
{% if release.version != status.current_version and status.can_auto_update and validation.valid and not web_updates_disabled %}
|
||||
<form action="{{ path('admin_update_manager_start') }}" method="post" class="d-inline"
|
||||
data-controller="update-confirm"
|
||||
data-update-confirm-is-downgrade-value="{{ release.version < status.current_version ? 'true' : 'false' }}"
|
||||
|
|
@ -356,7 +373,7 @@
|
|||
{{ (backup.size / 1024 / 1024)|number_format(1) }} MB
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{% if status.can_auto_update and validation.valid %}
|
||||
{% if status.can_auto_update and validation.valid and not backup_restore_disabled %}
|
||||
<form action="{{ path('admin_update_manager_restore') }}" method="post" class="d-inline"
|
||||
data-controller="backup-restore"
|
||||
data-backup-restore-filename-value="{{ backup.file }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue