130 Commits

Author SHA1 Message Date
GotthardG
707c98c5ce Add validations and logging for puck beamtime assignment.
Introduced checks to prevent reassigning beamtime if puck samples have recorded events. Updated logging in beamline-related methods to provide more insight. Simplified data structure updates for dewars, pucks, and samples, ensuring consistency with beamtime assignments.
2025-05-09 13:51:01 +02:00
GotthardG
6a0953c913 Refactor beamtime relationships in models and related APIs
Updated relationships for beamtime in models to support many-to-many associations with pucks, samples, and dewars. Refactored API endpoints to accommodate these changes, ensuring accurate assignment and retrieval of data. Improved sample data generation logic and incremented the application version for the new updates.
2025-05-08 16:04:05 +02:00
GotthardG
0fa038be94 Add endpoints and logic for fetching associations by beamtime
Introduced endpoints to fetch pucks, dewars, and samples by beamtime ID. Updated backend logic to ensure consistency between dewars, pucks, and samples assignments. Enhanced frontend to display and handle beamline-specific associations dynamically.
2025-05-07 11:19:00 +02:00
GotthardG
e341459590 Update beamtime assignment logic for pucks and samples
Simplified and unified beamtime assignment handling for pucks and samples in the backend. Enhanced the frontend to display detailed assignment state, including shift, date, and beamline, for both pucks and dewars. This ensures consistent and accurate state management across the application.
2025-05-07 09:39:40 +02:00
GotthardG
9e5734f060 Add beamtime assignment functionality for dewars and pucks
Implemented API endpoints and frontend logic to assign/unassign beamtime to dewars and pucks. Enhanced schemas, models, and styles while refactoring related frontend components for better user experience and data handling.
2025-05-06 17:14:21 +02:00
GotthardG
26f8870d04 Refactor pgroup handling and routing logic.
Enable synchronization of active pgroup across components using a callback mechanism. Improve handling of query parameters, props, and redirection to ensure accurate user context and state across pages like ResultsView and BeamtimeOverview. Update ProtectedRoute to support additional props.
2025-05-06 12:14:39 +02:00
GotthardG
a169a39edd Update routing and components to handle activePgroup in URLs
Modified navigation to include activePgroup as a query parameter. Updated ResultsView, SampleTracker, and ResultGrid components to utilize activePgroup for contextual filtering based on the URL. This ensures proper grouping and improved parameter handling across the application.
2025-05-06 11:39:11 +02:00
GotthardG
4328b84795 Add beamtime relationships and enhance sample handling
This commit adds relationships to link Pucks and Samples to Beamtime in the models, enabling better data association. Includes changes to assign beamtime IDs during data generation and updates in API response models for improved data loading. Removed redundant code in testfunctions.ipynb to clean up the notebook.
2025-05-06 11:28:36 +02:00
GotthardG
102a11eed7 Add beamtime functionality to backend.
Introduce new endpoint and model for managing beamtimes, including shifts and user-specific access. Updated test scripts and data to reflect beamtime integration, along with minor fixes for job status enumeration and example notebook refinement.
2025-05-05 16:05:37 +02:00
GotthardG
db6474c86a Add job cancellation handling and periodic cleanup logic
Introduce new statuses, "to_cancel" and "cancelled", to improve job state tracking. Implement logic to nullify `slurm_id` for cancelled jobs and a background thread to clean up cancelled jobs older than 2 hours. Ensure periodic cleanup runs hourly to maintain database hygiene.
2025-05-02 15:54:54 +02:00
GotthardG
b13a3e23f4 Add job cancellation handling and periodic cleanup logic
Introduce new statuses, "to_cancel" and "cancelled", to improve job state tracking. Implement logic to nullify `slurm_id` for cancelled jobs and a background thread to clean up cancelled jobs older than 2 hours. Ensure periodic cleanup runs hourly to maintain database hygiene.
2025-05-02 10:48:54 +02:00
GotthardG
3eb4050d82 Refactor job model and optimize job streaming.
Updated the `JobModel` with foreign key relationships and string-based status to enhance database consistency, and improved job event streaming by using `jsonable_encoder` for better serialization. Also, streamlined dependencies by adding `urllib3` to handle HTTP requests.
2025-04-29 09:47:57 +02:00
GotthardG
ee9ed865ea Refactor Docker setup and migrate to PostgreSQL
Streamlined Dockerfiles with clearer ENV variables and build args. Switched backend database from MySQL to PostgreSQL, updated configurations accordingly, and added robust Docker Compose services for better orchestration, including health checks and persistent storage.
2025-04-10 00:09:17 +02:00
GotthardG
c0a43351e1 Refactor Docker setup and migrate to PostgreSQL
Streamlined Dockerfiles with clearer ENV variables and build args. Switched backend database from MySQL to PostgreSQL, updated configurations accordingly, and added robust Docker Compose services for better orchestration, including health checks and persistent storage.
2025-04-09 23:35:32 +02:00
GotthardG
fe80ba7be2 Refactor Docker setup and migrate to PostgreSQL
Streamlined Dockerfiles with clearer ENV variables and build args. Switched backend database from MySQL to PostgreSQL, updated configurations accordingly, and added robust Docker Compose services for better orchestration, including health checks and persistent storage.
2025-04-09 23:32:46 +02:00
GotthardG
bb6cca4f23 Refactor Docker setup and migrate to PostgreSQL
Streamlined Dockerfiles with clearer ENV variables and build args. Switched backend database from MySQL to PostgreSQL, updated configurations accordingly, and added robust Docker Compose services for better orchestration, including health checks and persistent storage.
2025-04-09 15:09:22 +02:00
GotthardG
248085b3c4 Update dependencies and improve Python path handling
Updated several frontend dependencies including MUI packages and added new ones like `@mui/x-charts`. Adjusted the Python path setup in the CI configuration to correctly point to the `aaredb` backend, ensuring accurate module resolution.
2025-03-19 12:04:50 +01:00
GotthardG
536cfcd34b Update dependencies and improve Python path handling
Updated several frontend dependencies including MUI packages and added new ones like `@mui/x-charts`. Adjusted the Python path setup in the CI configuration to correctly point to the `aaredb` backend, ensuring accurate module resolution.
2025-03-19 09:14:12 +01:00
GotthardG
68f87f0d8d Displaying Processing Results in the frontend 2025-03-17 16:45:50 +01:00
GotthardG
5a0047b6d5 Refactor AareDB backend and update schemas and paths.
Revised backend schema definitions, removing unnecessary attributes and adding new configurations. Updated file path references to align with the aaredb structure. Cleaned up redundant notebook content and commented out unused database regeneration logic in the backend.

Added posting a result to the database
2025-03-17 11:51:07 +01:00
GotthardG
db6164ac3f Add Dockerfiles and update package dependencies
Introduced Dockerfiles for logistics and frontend applications to streamline development and deployment. Updated package dependencies in the frontend to newer versions for improved stability and compatibility.
2025-03-14 13:47:54 +01:00
GotthardG
fbc32474ff Refine event types and update related models and logic
Standardized event types with stricter validation using `Literal`. Adjusted related data and logic to align with new types, including changes to PGROUP assignments, event timeline increments, and schema updates. Cleaned up unused code and clarified database initialization behavior.
2025-03-14 13:11:05 +01:00
GotthardG
3d55c42312 Refactor logistics and frontend code for better consistency.
Refactored several files to improve code clarity, error handling, and data integrity. Introduced type safety improvements, streamlined OpenAPI model integration, adjusted configuration settings, and enhanced QR code handling logic. Also updated scripts and tsconfig settings to temporarily bypass strict checks during development.
2025-03-06 13:24:12 +01:00
GotthardG
3a63e5a6d8 Add image modal functionality to RunDetails component
Introduce a modal for zooming images in the RunDetails component, enhancing UX by allowing users to click and view images in detail. Adjust styling in SampleImage.css to disable zoom effects in the details panel and ensure proper image rendering. Update ResultGrid to pass the basePath prop to support dynamic image paths.
2025-03-05 13:39:04 +01:00
GotthardG
91aebae473 Enhance dynamic height handling for RunDetails components.
Added support for dynamic height calculation in RunDetails and integrated it with ResultGrid to adjust detail panel heights based on content changes. This ensures proper rendering and improves responsiveness of the UI.
2025-03-05 11:13:20 +01:00
GotthardG
6bd4843d38 Add row-specific styling and improve image rendering
Introduced row-specific CSS classes for better UI distinction, highlighting rows based on run type and processing results. Enhanced image rendering logic with consistent styling, hover effects, and a smaller image size for better visual clarity.
2025-03-05 09:47:00 +01:00
GotthardG
266c8a81ac Refactor RunDetails and integrate with ResultGrid
Reworked `RunDetails` to enhance details presentation and added new UI components like images and processing results. Incorporated the `RunDetails` expansion panel into `ResultGrid` for better user interaction and streamlined grid functionalities.
2025-03-04 22:01:53 +01:00
GotthardG
75998a1d22 Refactor RunDetails and integrate with ResultGrid
Reworked `RunDetails` to enhance details presentation and added new UI components like images and processing results. Incorporated the `RunDetails` expansion panel into `ResultGrid` for better user interaction and streamlined grid functionalities.
2025-03-04 14:32:27 +01:00
GotthardG
fff3e9f884 Add image rendering to ResultGrid with zoom effect
This update introduces an "Images" column in the ResultGrid component, displaying thumbnails that expand on hover using CSS zoom effects. Adjustments were made to styles and grid cell overflow to ensure proper rendering and interaction with zoomed images.
2025-03-04 11:57:39 +01:00
GotthardG
2e1d87c31b Update dependencies and migrate to Node 18 minimum support
Upgraded multiple package versions, including `@esbuild` and dependencies like `@mui/x-data-grid-premium`. Adjusted `node` engine requirement to `>=18` for compatibility. This ensures modernization and alignment with current toolchain standards.
2025-03-04 10:42:24 +01:00
GotthardG
c3cf463f06 Refactor image rendering in ResultGrid with CSS enhancements
Simplified image rendering logic in `ResultGrid` by removing hover state management within JavaScript. Added `SampleImage.css` to handle hover effects for images and tooltips with scalable zoom. Cleaned up unnecessary comments and improved code readability.
2025-02-27 15:55:56 +01:00
GotthardG
da79115ba4 Refactor image rendering in ResultGrid with CSS enhancements
Simplified image rendering logic in `ResultGrid` by removing hover state management within JavaScript. Added `SampleImage.css` to handle hover effects for images and tooltips with scalable zoom. Cleaned up unnecessary comments and improved code readability.
2025-02-27 15:24:28 +01:00
GotthardG
37fe820f4a Refactor image rendering in ResultGrid with CSS enhancements
Simplified image rendering logic in `ResultGrid` by removing hover state management within JavaScript. Added `SampleImage.css` to handle hover effects for images and tooltips with scalable zoom. Cleaned up unnecessary comments and improved code readability.
2025-02-27 11:42:22 +01:00
GotthardG
de4a6d2db8 Refactor image rendering in ResultGrid with CSS enhancements
Simplified image rendering logic in `ResultGrid` by removing hover state management within JavaScript. Added `SampleImage.css` to handle hover effects for images and tooltips with scalable zoom. Cleaned up unnecessary comments and improved code readability.
2025-02-27 11:40:40 +01:00
GotthardG
548a86678b Update SampleTracker to support dynamic activePgroup
Enhanced the `SampleTracker` component to accept and utilize an `activePgroup` prop, allowing dynamic filtering of data based on the current project group. Adjusted related polling and data fetching logic to respond to changes in `activePgroup`. Removed excessive code from the test notebook for cleanup.
2025-02-27 11:20:04 +01:00
GotthardG
e070fd4662 Add Image models and clean up test code structure
Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
2025-02-26 15:41:29 +01:00
GotthardG
21d4181816 Add Image models and clean up test code structure
Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
2025-02-26 15:29:10 +01:00
GotthardG
ab6148a7e7 Add Image models and clean up test code structure
Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
2025-02-26 15:27:35 +01:00
GotthardG
303e6579cb Add Image models and clean up test code structure
Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
2025-02-26 15:25:15 +01:00
GotthardG
b04c7b8c95 Add Image models and clean up test code structure
Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
2025-02-26 15:11:20 +01:00
GotthardG
c2215860bf Refactor Dewar service methods and improve field handling
Updated Dewar API methods to use protected endpoints for enhanced security and consistency. Added `pgroups` handling in various frontend components and modified the LogisticsView contact field for clarity. Simplified backend router imports for better readability.
2025-01-30 13:39:49 +01:00
GotthardG
44582cf38e Add pgroup handling in dewars and enhance ShipmentDetails UI
Introduced a new `pgroups` attribute for dewars in the backend with schema and model updates. Modified the frontend to display `pgroups` as chips, integrate new visual icons for pucks and crystals, and enhance the UI/UX in `ShipmentDetails` and `DewarStepper` components. Added reusable SVG components for better modularity and design consistency.
2025-01-23 13:57:25 +01:00
GotthardG
173e192fc4 Integrate pgroups for shipment data security
Added `pgroups` to secure and associate data with specific permission groups. Updated backend routers, database models, and API endpoints to handle authorization based on `pgroups`. Adjusted frontend components and hooks to support `pgroups` in data fetching and management workflows.
2025-01-22 22:53:37 +01:00
GotthardG
4a1852882a Enhance handling of associated pgroups in Contacts and Address views.
Ensure `associatedPgroups` defaults to an empty array to avoid undefined behavior. Add non-editable pgroups input fields for new items and improve conditional rendering of pgroup chips in both views. Minor structural updates for consistency and clarity.
2025-01-22 16:44:03 +01:00
GotthardG
382b1eaba8 Refactor contact handling across backend and frontend
Replaced usage of "ContactPerson" with "Contact" for consistency across the codebase. Updated related component props, state variables, API calls, and database queries to align with the new model. Also enhanced backend functionality with stricter validations and added support for handling active pgroups in contact management.
2025-01-22 16:31:08 +01:00
GotthardG
6cde57f783 **Commit Message:**
Enhance app with active pgroup handling and token updates

Added active pgroup state management across the app for user-specific settings. Improved token handling with decoding, saving user data, and setting OpenAPI authorization. Updated components, API calls, and forms to support dynamic pgroup selection and user-specific features.
2025-01-22 13:55:26 +01:00
GotthardG
3b315f2997 Add mount_count and unmount_count tracking for samples
Introduced `mount_count` and `unmount_count` fields to track mounting events for samples. Updated models, schemas, and front-end components to support dynamic calculation and display of these counts. Enhanced backend queries and API responses to include the new data.
2025-01-20 11:02:56 +01:00
GotthardG
6825421f20 Update package-lock.json with latest dependency versions
Upgraded multiple dependencies across Babel, Emotion, ESLint, and DevExpress packages in `package-lock.json` to their latest versions. These updates ensure compatibility, fix minor issues, and improve overall performance and security.
2025-01-17 15:35:29 +01:00
GotthardG
9739b8cfe9 Make shipment fields optional and refactor test scripts.
Updated the `number_of_pucks` and `number_of_samples` fields in the `schemas.py` to be optional for greater flexibility. Simplified the test Jupyter Notebook by restructuring imports and consolidating function calls for better readability and maintainability.
2025-01-17 09:36:16 +01:00
GotthardG
481068603b Enhance deletion processes with event-check validations.
Added validation to prevent deletion of shipments, dewars, pucks, or samples if they have associated events. Updated frontend components to handle and display error messages based on API responses for improved user feedback.
2025-01-15 15:30:54 +01:00