Commit graph

977 commits

Author SHA1 Message Date
Jan Böhmer
1adfec16e2 Added an console command to turn maintenance mode on or off 2026-02-02 21:53:55 +01:00
Jan Böhmer
903716ad62 Added missing translations 2026-02-02 21:39:01 +01:00
Jan Böhmer
427778e4eb Moved "Cant auto update panel higher" to make it more visible 2026-02-02 21:37:04 +01:00
Sebastian Almberg
10c192edd1 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
2026-02-01 19:17:22 +01:00
Sebastian Almberg
6b27f3aa14 Merge upstream/master and resolve translation conflict
Merged new Conrad info provider and generic web provider translations
from upstream while keeping Update Manager translations.
2026-02-01 19:07:15 +01:00
Jan Böhmer
909cab0044 Added an web page to quickly add a new part from a web URL 2026-02-01 18:18:58 +01:00
Jan Böhmer
722eb7ddab Added settings and docs for the generic Web info provider 2026-02-01 17:47:04 +01:00
Jan Böhmer
df3f069a76 Added translations for conrad settings
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2026-01-31 22:11:50 +01:00
Sebastian Almberg
1637fd63f4 Add backup restore feature
- Add restoreBackup() method to UpdateExecutor with full restore workflow
- Add getBackupDetails() to retrieve backup metadata and contents info
- Add restore controller routes (backup details API, restore action)
- Add restore button to backups table in UI
- Create backup_restore_controller.js Stimulus controller for confirmation
- Add translation strings for restore feature

The restore process:
1. Acquires lock and enables maintenance mode
2. Extracts backup to temp directory
3. Restores database (MySQL/PostgreSQL SQL or SQLite file)
4. Optionally restores config files and attachments
5. Clears and warms cache
6. Disables maintenance mode

Fix backup restore database import

The restore feature was using a non-existent doctrine:database:import
command. Now properly uses mysql/psql commands directly to import
database dumps.

Changes:
- Add EntityManagerInterface dependency to UpdateExecutor
- Use mysql command with shell input redirection for MySQL restore
- Use psql -f command for PostgreSQL restore
- Properly handle database connection parameters
- Add error handling for failed imports
2026-01-30 23:24:48 +01:00
Sebastian Almberg
97e3b0aa09 Add downgrade warning for versions without Update Manager
When downgrading to versions before v2.6.0, show a warning that the
Update Manager will not be available in older versions and that future
updates will need to be done manually via command line.
2026-01-30 21:56:14 +01:00
Sebastian Almberg
42fe781ef8 Add Update Manager for automated Part-DB updates
This feature adds a comprehensive Update Manager similar to Mainsail's
update system, allowing administrators to update Part-DB directly from
the web interface.

Features:
- Web UI at /admin/update-manager showing current and available versions
- Support for Git-based installations with automatic update execution
- Maintenance mode during updates to prevent user access
- Automatic database backup before updates
- Git rollback points for recovery (tags created before each update)
- Progress tracking with real-time status updates
- Update history and log viewing
- Downgrade support with appropriate UI messaging
- CLI command `php bin/console partdb:update` for server-side updates

New files:
- UpdateManagerController: Handles all web UI routes
- UpdateCommand: CLI command for running updates
- UpdateExecutor: Core update execution logic with safety mechanisms
- UpdateChecker: GitHub API integration for version checking
- InstallationTypeDetector: Detects installation type (Git/Docker/ZIP)
- MaintenanceModeSubscriber: Blocks user access during maintenance
- UpdateExtension: Twig functions for update notifications

UI improvements:
- Update notification in navbar for admins when update available
- Confirmation dialogs for update/downgrade actions
- Downgrade-specific text throughout the interface
- Progress page with auto-refresh
2026-01-30 21:36:33 +01:00
Jan Böhmer
e15d12c0bf Merge remote-tracking branch 'origin/l10n_master' 2026-01-25 21:27:51 +01:00
Jan Böhmer
2b723e05ff New translations frontend.en.xlf (English) 2026-01-25 21:16:04 +01:00
Jan Böhmer
a8d2204c7f New translations validators.en.xlf (German) 2026-01-25 21:15:51 +01:00
Jan Böhmer
29050178bd New translations messages.en.xlf (German) 2026-01-25 21:15:50 +01:00
Jan Böhmer
7b8f3aaf62 New translations messages.en.xlf (English) 2026-01-25 18:23:26 +01:00
Jan Böhmer
d93dfd577e Fail more gracefully when an error occurs in the info providers 2026-01-25 18:22:47 +01:00
Jan Böhmer
4095d0fd49 New translations frontend.en.xlf (Danish) 2026-01-25 10:50:30 +01:00
Jan Böhmer
6d3197497e New translations security.en.xlf (Danish) 2026-01-25 10:50:26 +01:00
Jan Böhmer
f438a8b4cd New translations validators.en.xlf (Danish) 2026-01-25 10:50:25 +01:00
Jan Böhmer
4636aa4e0d New translations frontend.en.xlf (Hungarian) 2026-01-18 22:00:38 +01:00
Jan Böhmer
006cfd7b5d New translations frontend.en.xlf (German) 2026-01-18 22:00:37 +01:00
Jan Böhmer
1923abecdf New translations messages.en.xlf (English) 2026-01-18 19:50:33 +01:00
Copilot
a3d992a016
Move frontend translations to separate domain to reduce bundle size (#1197)
* Initial plan

* Create frontend translation files and update configuration

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fix missing semicolon in password strength controller

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Remove frontend-only translations from messages domain and set frontend as default domain

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2026-01-18 18:50:38 +01:00
Jan Böhmer
3e071f2b74 New translations messages.en.xlf (English) 2026-01-04 22:00:55 +01:00
Marc
be35c36c58
Added info provider for Buerklin (#1151)
* Fixed Typos and mistranslations in GDPR mode (DSGVO Modus)
Fixed Typo enviroment

* Create BuerklinProvider based on LCSCProvider

* Update GET URLs for Buerklin

* Add getToken function analog to Octopart

* Remove line break in docs

* Remove trailing / in ENDPOINT_URL
Use Autowire to use values of environment variables
Remove unwanted Code from LCSC-Provider
Map json response to DTO variables

* Fix variable reference errors ($term → $keyword)
Ensure array keys exist before accessing them
Optimize API calls to prevent unnecessary requests
Improve error handling for better debugging
Enhance readability and maintainability of functions

* Bumped version v1.16.2

* Update BuerklinProvider.php

Change Order of Capabilities

* Change order of capabilities in LCSCProvider.php

* Change order of capabilities in PollinProvider.php

* Try to fix getToken BuerklinProvider.php

* Add ip_buerklin_oauth to knpu_oauth2_client.yaml

* Update buerklin authorize URL in knpu_oauth2_client.yaml

* Update knpu_oauth2_client.yaml

* Adapt Buerklin InfoProvider to new Settings mechanism

* According to Buerklin API spec it's really 'token' as urlAuthorize endpoint

* Rückgabewert ist schon ein Array deshalb kein toArray

* Fix API-Access, add image, price and parameter retrieval (Datasheets not yet implemented because it is not available in the API response)

* Add Caching of requests, use default query params (language and currency) using a function, Fix Footprint assignment, translate German code comments

* Remove DATASHEET from ProviderCapabilities because the Bürklin API doesn't include Datasheet URLs at the moment, more reverse engineering needed

* Update BuerklinSettings with existing translatable strings

* Improve Buerklin Settings Page

* Added Translation strings for Buerklin Info Provider

* Improve Buerklin Provider help message

* Adapt Buerklin-provider to new settings system

* Adapt Buerklin-provider to new settings system: add missing instance of BuerklinSettings

* Improve Compliance Parameters parsing

* Remove language-dependent RoHs Date code and use shortened ISO format, Add Customs Code without parseValueField

* Fix no results for keyword search

* Implement BatchInfoProviderInterface for Buerklin Provider

* Rename searchBatch to searchByKeywordsBatch to correctly implement BatchInfoProviderInterface

* Fix Bulk Info Provider Import for Buerklin

* Tranlate comments to English to prepare for Pull-Request

* Add phpUnit unit tests for BuerklinProvider

* Try fixing PHPStan issues

* Remove OAuthTokenManager from BuerklinProviderTest

Removed OAuthTokenManager mock from BuerklinProviderTest setup.

* Fix Settings must not be instantiated directly

* Fix UnitTest for value_typ

* edd5fb3319 (r2622249199)
Revert "Change order of capabilities in LCSCProvider.php"

This reverts commit dfd6f33e52.

* edd5fb3319 (r2622249861)
Revert "Change order of capabilities in PollinProvider.php"

This reverts commit fc2e7265be.

* Use language setting for ProductShortURL

* Update default language for Buerklin provider to English in documentation

* Add suggested improvements from SonarQube

* Removed unused use directives

* Revert SonarQube proposed change. Having more than one return is acceptable nowadays

* Improve getProviderInfo: disable oauth_app_name, add settings_class, improve disabled_help

* Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206

* Add missing ) to retrieveROPCToken

* add use OAuthTokenManager and create instance in constructor

* Revert the following commits that tried to implement getToken using OAuthTokenManager

Revert "add use OAuthTokenManager and create instance in constructor"This reverts commit 2a1e7c9b0974ebd7e082d5a2fa62753d6254a767.Revert "Add missing ) to retrieveROPCToken"This reverts commit 8df5cfc49e.
Revert "Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206"
This reverts commit 66cc732082.

* Remove OAuthTokenManager leftovers

* Disable buerklin provider if settings fields are empty

* Improved docs

* Added TODO comment

---------

Co-authored-by: root <root@part-db.fritz.box>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2026-01-04 21:05:47 +01:00
Jan Böhmer
89322d329c New translations messages.en.xlf (English) 2026-01-04 18:00:49 +01:00
Jan Böhmer
390206f529 Merge remote-tracking branch 'origin/l10n_master' 2026-01-04 17:04:44 +01:00
fsbrc
0e61a84ea6
Allow to view part ID in project BOM
* added feature of part-id in project bom view

* Made part id column label translatable

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2026-01-04 17:01:06 +01:00
Jan Böhmer
6fcdc0b0c3 New translations messages.en.xlf (English) 2025-12-07 14:12:08 +01:00
Copilot
60ff727896
Replace hardcoded entity type names with synonym placeholders in English and German translations (#1128)
* Initial plan

* Initial plan for replacing entity type names with placeholders

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Replace entity type names with synonym placeholders in English translations

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Add more synonym placeholders for storage location, project, and part patterns

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Update tree navigation labels with synonym placeholders

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fix remaining entity type placeholders identified in code review

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fix placeholder syntax: use [Type]/[[Type]] instead of {type}/{{type}} and add German translations

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fix German translation to avoid awkward word concatenation with placeholder

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Use capitalized placeholders in German translations (nouns are always capitalized in German)

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Fixed length menu for datatable views

* Capitalize placeholders at the beginning of sentences/titles in English translations

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Ensure that synonym placeholders get cached on a per locale level

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-12-07 14:09:22 +01:00
Jan Böhmer
225e347c24 New translations messages.en.xlf (English) 2025-12-06 23:32:23 +01:00
Copilot
a356eecd74
Replace type synonym placeholders with bracket notation for better DX (#1133)
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
* Initial plan

* Replace placeholder syntax for type synonyms to be more DX friendly

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Update translation files to use new placeholder syntax

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Use mb_strtoupper with mb_substr for Unicode consistency

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Make placeholder generation right

* Removed obsolete transltions

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-12-06 23:29:32 +01:00
Copilot
9dc17ad9d0
Remove 25 unused/obsolete translation keys (#1131)
* Initial plan

* Remove 25 unused/obsolete translation keys from all message files

Removed keys:
- admin.comment
- api_tokens.added_date
- attachment.external_file
- attachment.table.filename
- datatable.datatable.lengthMenu
- delete.caption
- edit.caption_short
- part.add.caption
- part.add.comment
- part.description.placeholder
- part.edited_flash.invalid
- part.instock.placeholder
- part.mininstock.placeholder
- part.order.price_per
- part.withdraw.btn
- part.withdraw.caption
- part.withdraw.comment:
- project.caption
- r_u2f_two_factor.name
- search.deactivateBarcode
- selectpicker.empty
- supplier.caption
- tfa_u2f.key_added_successful
- tree.root_node.text
- validator.part_lot.location_full.no_increasment (typo of fixed key)

These keys have zero occurrences in the codebase and are safe to remove.

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-06 22:55:02 +01:00
Copilot
d244400f4f
Add missing plural label translations to 12 language files (#1126)
* Initial plan

* Add missing plural label translations to 12 language files

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-06 22:24:14 +01:00
Jan Böhmer
fb805e2e0a New translations validators.en.xlf (English) 2025-12-05 00:40:29 +01:00
Jan Böhmer
8548237522 New translations messages.en.xlf (English) 2025-12-05 00:40:28 +01:00
Jan Böhmer
77819af9a8 New translations security.en.xlf (German) 2025-12-05 00:40:26 +01:00
Copilot
9a1dbe06dc
Fix spelling and grammar mistakes in German and English translations (#1125)
* Initial plan

* Fix spelling and grammar mistakes in German and English translations

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-04 23:44:03 +01:00
Copilot
a3d6f77fda
Add missing German translations to messages.de.xlf (#1124)
* Initial plan

* Add 41 missing German translations to messages.de.xlf

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2025-12-04 22:33:59 +01:00
Jan Böhmer
68217f50c4 New translations messages.en.xlf (English) 2025-12-03 22:01:49 +01:00
Jan Böhmer
1925a71f30 Added translations for new IPN suggestion settings 2025-12-03 21:52:48 +01:00
Jan Böhmer
d42f728fad New translations messages.en.xlf (English) 2025-12-02 00:13:06 +01:00
Jan Böhmer
023d38d170 Allow to configure seperators, category fallback and a global prefix for IPN generation
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
Translations still missing
2025-12-01 23:56:36 +01:00
Jan Böhmer
b1210bc3b5 New translations messages.en.xlf (English) 2025-11-30 15:57:13 +01:00
Jan Böhmer
161a9e930d Made IPN format help placeholder translatable 2025-11-30 15:38:46 +01:00
Jan Böhmer
3649fffde1 Made password toggle buttons labels translatable 2025-11-30 15:36:54 +01:00
Jan Böhmer
045362de0e New translations messages.en.xlf (English) 2025-11-30 14:53:03 +01:00
Jan Böhmer
3459731ca8 Show plural translation for entity type labels in synonym settings 2025-11-30 14:16:54 +01:00
Jan Böhmer
6a5039326c New translations validators.en.xlf (English) 2025-11-12 22:31:26 +01:00