Commit Graph

326 Commits

Author SHA1 Message Date
sassanix a56229ab99 Update README.md 2025-10-01 18:29:00 -03:00
sassanix 74d49ffeab Update README.md 2025-10-01 18:27:29 -03:00
sassanix 8f4369f389 Update README.md
Adding Turkish language
2025-10-01 18:25:08 -03:00
sassanix a3f0c7264f Fixed nowrap as it was introduced in latest PR
New warranty add modal, will need to work similar to the edit modal. Removing the added code, to fix the mobile issues.
2025-10-01 17:37:43 -03:00
sassanix b4f15a8c5e Merge pull request #138 from tecosaur/main
Mixed bag: Update compatability + depreceations + bugfixes + OIDC enhancements
2025-09-30 20:26:53 -03:00
TEC 9295338b88 Prevent warranty tabs from wrapping
Otherwise the icon and text can end up on different lines, in certain
browsers and window sizes.
2025-09-30 21:48:29 +08:00
TEC 4a0f529848 Attempt to generate a secure secret on-the-fly
If it works, great. If not, we just get the original default.
2025-09-30 20:58:34 +08:00
TEC d1e7080847 Add OIDC admin group to site_settings 2025-09-30 20:58:34 +08:00
TEC 336c1700bf Make entire user item menu clickable not just text 2025-09-30 20:58:34 +08:00
TEC 220c9c89c5 Support reading secrets from files
This makes it easier to integrate Warracker with modern secret
management workflows like Docker secrets and Systemd service
credentials.
2025-09-30 20:58:34 +08:00
TEC 2c7947d533 Make upload folder configurable
Also have a go at creating the directory, if it doesn't exist
on startup.
2025-09-30 20:58:34 +08:00
TEC 6f5081d27b Sync OIDC attribute on login 2025-09-30 20:58:34 +08:00
TEC 48aec134ba Hide/disable user's OIDC-managed settings 2025-09-30 20:58:34 +08:00
TEC d887aadc3b Allow determining admin status from OIDC groups 2025-09-30 20:58:34 +08:00
TEC bb886a5ff3 Have OIDC first name fallback to name
If given/family names are unset, it seems reasonable to default to the
first name.
2025-09-30 20:58:34 +08:00
TEC f29b1b5784 Token userinfo is no substitute for the endpoint
It is not appropriate to (ab)use OIDC authentication claims for user
information, there is a dedicated userinfo endpoint that should always
be used. If the information we want is in the token claims, great, but
the endpoint info should always be available too.
2025-09-30 20:58:34 +08:00
TEC 88b02bbdc2 Fix OIDC reload by moving init_oidc_client
In 60239bd637 the assumption that init_oidc_client could be imported
from oidc_handler was introduced into admin_routes.py.

However, init_oidc_client was defined in __init__.py, leaving us with
the options of:
1. Importing from .
2. Moving the implementation to oidc_handler, and importing in
   __init__.py

I've gone with option 2.
2025-09-30 20:58:34 +08:00
TEC ee96ba5311 Update deprecated utcnow() usage
DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
2025-09-30 20:58:34 +08:00
TEC dac76148c0 Support PyJWT 2.10
The payload 'sub' must now be a string.
2025-09-30 20:58:34 +08:00
sassanix 69c44a2ab6 Add Turkish translations, archive feature, and major UI/UX enhancements
Introduced Turkish language support and non-destructive warranty archiving. Modernized login page, filters, sorting, and tag management with responsive, theme-aware UI updates. Persisted filter/sort state across sessions, improved mobile layout, and fixed dark mode, i18n, and SSO alignment issues.
0.10.1.13
2025-09-29 14:01:30 -03:00
sassanix 6b035b59a8 Fix Paperless-ngx issues, restores missing assets, and improves stability.
- Fixed: Paperless-ngx document uploads were being incorrectly flagged as duplicates due to invalid API parameter usage (checksum → checksum__iexact).

- Fixed: API token authentication with Paperless-ngx now works properly when Two-Factor Authentication (2FA) is enabled, ensuring secure token-only integration.

- Fixed: Restored missing i18next JavaScript libraries for non-Docker installations, ensuring status page and i18n features function correctly.

- Enhanced: Replaced psycopg2-binary with psycopg2 for production stability and compatibility.

- Enhanced: Adjusted .gitignore to track /lib directory, ensuring essential libraries are available across environments.
0.10.1.12
2025-09-18 10:56:43 -03:00
sassanix 2cd6cd407a Merge pull request #127 from sjafferali/main 2025-09-09 22:40:13 -03:00
Samir Jafferali 1a2b9c154b Fix querying params for checksum 2025-09-08 22:18:45 -07:00
sassanix b8b1a461bb Merge branch 'main' of https://github.com/sassanix/Warracker 0.10.1.11 2025-09-07 20:31:00 -03:00
sassanix 441358bea3 Enhances Global View with better document access, claim visibility, and critical bug fixes.
Description:

* Enhanced Global View integration with Paperless-ngx for seamless in-app document viewing.
* Added color-coded visual indicators for warranty claim statuses.
* Introduced read-only access to warranty claims in Global View.
* Fixed authorization issues blocking shared document access.
* Resolved claim creation errors with empty optional fields.
* Corrected JavaScript errors in Global View claims modals.
2025-09-07 20:30:55 -03:00
sassanix fcc45a8eb1 Update README.md 2025-08-30 11:21:31 -03:00
sassanix ac626ed922 warranty claims tracking update 2025-08-30 11:21:01 -03:00
sassanix 2e4cb7fa84 Warranty Claim Tracking
Added warranty claim tracking in key features
2025-08-30 11:20:01 -03:00
sassanix d9d52743e2 Added warranty claims tracking, document URL support, and custom database port configuration.
This release introduces three major enhancements:

1. Warranty claims tracking system with full database, API, and frontend integration to manage claims across their lifecycle.

2. Comprehensive URL/link support for documents and invoices, including database schema updates, API handling, responsive frontend integration, and error-resilient JavaScript improvements.

3. Database port configuration support via DB_PORT environment variable, ensuring flexible deployment while maintaining backward compatibility.

Additional improvements include UI/UX enhancements, null safety checks, error resolution in modals, and deployment configuration updates.
0.10.1.10
2025-08-30 11:10:42 -03:00
sassanix c45de7b1c0 Fix Apprise notification system, scheduler stability, and email configuration
Fixes & Enhancements

* Resolved five critical Apprise notification issues:
  • Ensured configuration reload during scheduled jobs
  • Fixed warranty data fetching for Apprise-only users
  • Refactored notification dispatch logic with dedicated helpers
  • Corrected handler scoping via Flask app context
  • Wrapped scheduler jobs with Flask app context to prevent context errors
  → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels.

* Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115)

* Fixed duplicate scheduled notifications in multi-worker environments:
  • Strengthened should\_run\_scheduler() logic
  • Now guarantees exactly one scheduler instance across all Gunicorn modes.

* Fixed stale database connection handling in scheduled jobs:
  • Fresh connection acquired each run, properly released via try/finally
  • Eliminates "server closed the connection" errors.

* Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance):
  • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset
  • Multi-worker: only worker 0 runs scheduler.

Impact

* Apprise and Email notifications are now stable, reliable, and production-ready
* No more duplicate or missed notifications across all memory modes
* Improved system efficiency and robustness
2025-08-24 12:47:45 -03:00
sassanix 7ce71a156c Fix Apprise notification system, scheduler stability, and email configuration
Fixes & Enhancements

* Resolved five critical Apprise notification issues:
  • Ensured configuration reload during scheduled jobs
  • Fixed warranty data fetching for Apprise-only users
  • Refactored notification dispatch logic with dedicated helpers
  • Corrected handler scoping via Flask app context
  • Wrapped scheduler jobs with Flask app context to prevent context errors
  → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels.

* Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115)

* Fixed duplicate scheduled notifications in multi-worker environments:
  • Strengthened should\_run\_scheduler() logic
  • Now guarantees exactly one scheduler instance across all Gunicorn modes.

* Fixed stale database connection handling in scheduled jobs:
  • Fresh connection acquired each run, properly released via try/finally
  • Eliminates "server closed the connection" errors.

* Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance):
  • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset
  • Multi-worker: only worker 0 runs scheduler.

Impact

* Apprise and Email notifications are now stable, reliable, and production-ready
* No more duplicate or missed notifications across all memory modes
* Improved system efficiency and robustness
0.10.1.9
2025-08-24 12:36:11 -03:00
sassanix 60239bd637 Fix Apprise notification system, scheduler stability, and email configuration
Fixes & Enhancements

* Resolved five critical Apprise notification issues:
  • Ensured configuration reload during scheduled jobs
  • Fixed warranty data fetching for Apprise-only users
  • Refactored notification dispatch logic with dedicated helpers
  • Corrected handler scoping via Flask app context
  • Wrapped scheduler jobs with Flask app context to prevent context errors
  → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels.

* Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115)

* Fixed duplicate scheduled notifications in multi-worker environments:
  • Strengthened should\_run\_scheduler() logic
  • Now guarantees exactly one scheduler instance across all Gunicorn modes.

* Fixed stale database connection handling in scheduled jobs:
  • Fresh connection acquired each run, properly released via try/finally
  • Eliminates "server closed the connection" errors.

* Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance):
  • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset
  • Multi-worker: only worker 0 runs scheduler.

Impact

* Apprise and Email notifications are now stable, reliable, and production-ready
* No more duplicate or missed notifications across all memory modes
* Improved system efficiency and robustness
2025-08-24 12:34:40 -03:00
sassanix 2ece8d0d53 Merge pull request #115 from clmcavaney/from-address
adding SMTP_FROM_ADDRESS for email From address
2025-08-22 08:34:57 -03:00
Christopher McAvaney 982f86f60e adding SMTP_FROM_ADDRESS for email From address 2025-08-05 12:38:59 +10:00
sassanix d594ca5565 Fix notification scheduler init and mobile UI issues
Resolved critical scheduler initialization bug in Docker ultra-light mode by moving scheduler setup into the create_app() function and improving worker detection logic. Added missing /api/timezones and /api/locales endpoints to support frontend settings page. Ensured compatibility across all memory modes with single-worker and multi-worker setups. Also fixed mobile UI issues including text overflow on the "Manage Tags" button and oversized warranty cards in list view. Implemented responsive CSS adjustments for mobile screens to improve layout and usability.
0.10.1.8
2025-07-24 12:22:08 -03:00
sassanix 043891c7fa Update README.md 2025-07-21 18:31:52 -03:00
sassanix ec774872ef Updated the date 2025-07-20 23:07:06 -03:00
sassanix 154f57d73d Fix env var precedence, PostgreSQL migrations, and major blueprint refactor
### Highlights:
- **Environment Variable Precedence Fix:** Corrected config loading logic to prioritize environment variables over database defaults on fresh installations. Ensured OIDC, Apprise, and email settings are now correctly derived from `.env` files. Also fixed the `/api/auth/oidc-status` endpoint to reflect the true state.

- **PostgreSQL Migration Permissions:** Updated migration scripts to avoid `CREATEROLE` errors on standard DB users by using `DO` blocks with graceful fallbacks.

### Major Code Refactoring:
- **Blueprint Extraction:**
  - Moved admin, warranty, tag, file handling, and statistics routes into dedicated Flask Blueprints for improved maintainability.
  - Introduced `file_routes.py`, `tags_routes.py`, `admin_routes.py`, `warranties_routes.py`, and `statistics_routes.py`.

- **Application Factory Pattern:**
  - Adopted the Flask Application Factory pattern using `create_app()` for modular, testable architecture.
  - Added `config.py`, centralized `extensions.py`, and simplified `app.py` to a minimal entry point.

### Additional Fixes:
- Restored missing `/api/currencies` and `/api/settings/global-view-status` endpoints.
- Fixed status page warranty expansion and toast notification issues.
- Updated frontend logic to properly show Paperless-ngx documents on warranty cards and status page.

### Impact:
- Configuration via Docker `.env` now works reliably.
- Application can now run on standard PostgreSQL setups.
- Codebase is modular and easier to maintain.
- Frontend issues related to missing endpoints and document visibility are resolved.
0.10.1.7
2025-07-20 23:02:03 -03:00
sassanix 6b857ed70c Update README.md 2025-07-17 21:40:02 -03:00
sassanix eafd72bb5e Update README.md 2025-07-13 21:56:39 -03:00
sassanix 3802e4ba87 Delete images/demowarracker.gif 2025-07-13 21:56:19 -03:00
sassanix c4c1a372af Merge branch 'main' of https://github.com/sassanix/Warracker 2025-07-13 21:55:30 -03:00
sassanix 4c7d368937 Fixing the demo gif 2025-07-13 21:54:57 -03:00
sassanix 6dac831e7e Update README.md 2025-07-13 21:54:05 -03:00
sassanix 5a171240b7 Rename demo.gif to demowarracker.gif 2025-07-13 21:53:52 -03:00
sassanix 001f88020a Update README.md 2025-07-13 21:53:02 -03:00
sassanix 2fb6b15b33 Merge branch 'main' of https://github.com/sassanix/Warracker 2025-07-13 21:52:00 -03:00
sassanix d3c94b6a11 Updating demo.gif 2025-07-13 21:51:56 -03:00
sassanix 5132a5845d Update README.md 2025-07-13 21:26:16 -03:00
sassanix 0a06770d38 Merge branch 'main' of https://github.com/sassanix/Warracker 0.10.1.6 2025-07-13 21:06:04 -03:00