23 Commits

Author SHA1 Message Date
9416a94a23 Refactor database utility functions and enhance audit logging
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Removed unnecessary console logging in the `SocketUser` class for cleaner output.
- Updated the `distributeNew` function to accept the entire object instead of just the ID, improving flexibility in handling new entries.
- Enhanced the `newAuditLog` and `editAuditLog` functions to filter out excluded models and changes, ensuring sensitive data is not logged.
- Introduced new utility functions for omitting specific paths and excluded changes from audit logs, enhancing data privacy and integrity.
2026-09-01 12:34:31 +01:00
c36765cc47 Add notification handling in editObject and utility functions
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Introduced notification functionality in the editObject method to notify users of changes when editing objects, enhancing user awareness of updates.
- Added utility functions for creating and managing notifications, including omitSensitive for filtering sensitive data and notificationUserFromOwner for user retrieval based on owner type.
- Updated SocketHost to support the new notify parameter, ensuring notifications can be triggered during object edits.
2026-08-19 18:58:37 +01:00
6e74e0dfec Remove TemplateManager and related PDF rendering functionality
- Deleted the TemplateManager class and its associated methods for rendering templates and PDFs, streamlining the socket handling code.
- Removed all references to PDF and image rendering in SocketHost, SocketUser, and their tests, ensuring a cleaner codebase.
- Updated package.json and pnpm-lock.yaml to remove dependencies related to PDF generation and image processing, enhancing project simplicity.
2026-08-19 18:18:49 +01:00
c2372f661e Update configuration, add dependencies, and enhance socket event handling
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Changed log level in config.json from "debug" to "trace" for more detailed logging.
- Added new dependencies "pdf-to-img" and "sharp" in package.json for image processing capabilities.
- Introduced 'renderTemplateJPG' event handling in SocketHost and SocketUser classes to support JPG rendering.
- Implemented the renderJPG method in TemplateManager for converting templates to JPG format, including error handling and logging.
2026-07-28 23:16:05 +01:00
8c445a7392 Enhance socket management and error handling in template events
- Increased the maximum HTTP buffer size for the Socket.IO server to improve data handling capabilities.
- Added error handling in `handlePreviewTemplateEvent` and `handleRenderTemplatePDFEvent` methods to log errors and return error messages through callbacks.
- Implemented a check for unknown object types in the `TemplateManager` to prevent processing errors and return appropriate error messages.
2026-07-28 01:50:24 +01:00
ef5cfd34e4 Refactor inventory and filament schemas for improved consistency and readability
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Enhanced the stock event schema by ensuring consistent formatting and removing unnecessary line breaks for better maintainability.
- Updated the filament schema to improve code readability and maintain required fields while maintaining functionality.
- Introduced a new `recalculate` method in the printer schema to manage printer state changes effectively.
- Added logic to handle host disconnection in the socket host, ensuring proper state management and logging.
2026-07-26 22:41:09 +01:00
49226290b6 Add ActivityManager and integrate activity tracking functionality
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced the ActivityManager class to handle object activity tracking, including viewing and editing events.
- Implemented methods for setting, clearing, and retrieving activities, as well as subscribing to activity updates via websockets.
- Replaced the LockManager with ActivityManager in SocketUser and SocketManager classes to streamline activity management.
- Added comprehensive tests for ActivityManager to ensure correct functionality and error handling.
- Removed LockManager and its associated tests to eliminate redundancy in functionality.
2026-07-26 00:43:24 +01:00
15132fefa0 Add user settings management functionality
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new UserSettingsManager class to handle user-specific settings, including retrieval and updates.
- Implemented user settings schema to define defaults and manage user-specific configurations.
- Enhanced SocketUser class to integrate user settings event handlers for getting and updating settings.
- Added comprehensive tests for UserSettingsManager to ensure correct functionality and error handling.
2026-07-18 14:48:46 +01:00
0d395d3cb0 Enhance SocketUser tests to verify removal of all listeners during disconnection.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Added verification for `removeAllListeners` method in both SocketUser and UpdateManager to ensure proper cleanup of event listeners during disconnection handling.
2026-07-04 16:54:55 +01:00
516402d40d Enhance UpdateManager and SocketUser classes to improve subscription management and disconnection handling.
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Added `removeAllListeners` method in UpdateManager to clear all subscriptions efficiently.
- Updated SocketUser's `handleDisconnect` method to log user disconnection more accurately based on user presence.
- Introduced subscription tracking in UpdateManager to manage active subscriptions.
2026-07-04 15:30:16 +01:00
7002e5a6c1 Enhance callback handling in SocketUser class to ensure callback is a function before invocation, preventing potential runtime errors. 2026-07-04 15:17:56 +01:00
4bfc7fae2a Implemented about page.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-06-21 13:19:18 +01:00
3196385c72 Updated configuration log level to debug, added product category model and references in product schema, enhanced stock schemas with recalculation methods, and improved socket event handling to support filters for subscriptions. 2026-06-14 23:52:03 +01:00
a955def849 Enhanced CORS configuration in SocketManager and added allowed origins to server settings in config.json.
Some checks reported warnings
farmcontrol/farmcontrol-ws/pipeline/head This commit is unstable
2026-03-06 23:54:01 +00:00
7a398c79a1 Implemented notifications.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-03-01 01:42:38 +00:00
ca3ba921be Added more tests. 2025-12-29 02:39:15 +00:00
f6e7fb3a41 Implement Jest testing framework and add initial test cases for various modules. Update configuration for test environment in config.json and add test results handling in Jenkinsfile. Include .gitignore entry for test results. Enhance package.json with Jest dependencies.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2025-12-29 01:13:01 +00:00
f72c27c588 Added stats support. 2025-12-13 21:03:55 +00:00
7f17f5f205 Rewrote subjob handling so it works and better progress updates too. 2025-12-02 18:29:59 +00:00
79ed7691f9 Added document printer support. 2025-11-29 01:28:20 +00:00
e1ba1f7871 Implement EventManager integration and enhance socket event handling
- Added EventManager to SocketHost and SocketUser for improved event handling.
- Introduced new socket event handlers for editing objects, listing objects, and subscribing to object actions.
- Refactored authentication logic to streamline host online status updates.
- Enhanced logging and callback mechanisms for better traceability and responsiveness in socket interactions.
2025-09-05 23:30:35 +01:00
3424c17ab3 Refactor socket management: replace SocketClient with SocketUser and SocketHost classes
- Removed SocketClient class and its associated functionality.
- Introduced SocketUser and SocketHost classes to handle user and host socket connections respectively.
- Updated SocketManager to manage user and host connections, including authentication and event handling.
- Enhanced event handling for user actions such as locking, unlocking, and subscribing to updates.
2025-08-18 01:07:14 +01:00
bf56234c4b Refactor project structure: remove app.js, update config.json for environment-specific settings, enhance package.json with new scripts and dependencies, and convert websockets.js to ES module syntax with Keycloak authentication integration. 2025-06-29 22:39:23 +01:00