-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Add worker maintenance mode functionality to Edge3 provider UI #55301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add worker maintenance mode functionality to Edge3 provider UI #55301
Conversation
- Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode
- Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode
- Add maintenance request form with required comment field (max 1024 chars)
- Add maintenance state handling for all maintenance-related worker states
- Add proper error handling and user feedback for maintenance operations
- Add worker existence validation and database session management
- Remove authentication dependencies for UI maintenance endpoints
- Update frontend to show maintenance controls based on worker state
- Format maintenance comments with timestamps for audit trail
4fc6780 to
39024c2
Compare
jscheffl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! I also wanted to get started with the maintenance but you opened the PR faster. Cool!
Functionally the skeleton is working.
Sorry about the many comments, don't be afraid. If too much then let me know and I can also contribute to this as this is an important feature urgently needed in UI for Airflow 3.1 release.
providers/edge3/src/airflow/providers/edge3/worker_api/routes/ui.py
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/worker_api/routes/ui.py
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/worker_api/routes/ui.py
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx
Outdated
Show resolved
Hide resolved
Remove explicit session.commit() calls - let SQLAlchemy handle transactions
- Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability
…tenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code
jscheffl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to commit to your repo, Github gave me the following error :-(
jscheffl@hp860g9:~/Workspace/airflow_review$ git push
error: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:dheerajturaga/airflow.git'
Therefore (1) added commits 1-3 from my additions as recommondations/comments. Did not pply them because generated and compiled code was not possible to be added by this ... you need to apply and compile UI.
Alternatively opened a DRAFT PR, you can also easily git cherry-pick from there:
#55348:
- Add tooltips to buttons
- Have exit button not if it is in maintenance exit already
- Add authentication to (new) API endpoints
My change attempt to make a proper dialog in commit 4 / Rework maintenance dialog to be a dialog as not successful, asked in Slack if I am tooo stupid... I assume to need help on this.
So to un-block the efforts, maybe if commits 1-3 are cherry picked it is OK to merge and then applying beautification later?
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/OperationsCell.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/OperationsCell.tsx
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/OperationsCell.tsx
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/OperationsCell.tsx
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/worker_api/routes/ui.py
Outdated
Show resolved
Hide resolved
providers/edge3/src/airflow/providers/edge3/worker_api/routes/ui.py
Outdated
Show resolved
Hide resolved
@jscheffl sure thing! Let me cherry pick these and re compile the assets in a couple of hours. Lets merge if base functionality is available and cleanup the UI in subsequent PRs |
|
@jscheffl, I updated the PR with latest screenshots |
jscheffl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
…e#55301) * Add worker maintenance mode functionality to Edge3 provider UI - Add POST /edge_worker/ui/worker/{worker_name}/maintenance endpoint to request maintenance mode - Add DELETE /edge_worker/ui/worker/{worker_name}/maintenance endpoint to exit maintenance mode - Add maintenance request form with required comment field (max 1024 chars) - Add maintenance state handling for all maintenance-related worker states - Add proper error handling and user feedback for maintenance operations - Add worker existence validation and database session management - Remove authentication dependencies for UI maintenance endpoints - Update frontend to show maintenance controls based on worker state - Format maintenance comments with timestamps for audit trail * Move MaintenanceRequest to datamodels_ui.py for better code organization Remove explicit session.commit() calls - let SQLAlchemy handle transactions * refactor: extract OperationsCell into separate component - Move MaintenanceRequest class to datamodels_ui.py for better organization - Remove explicit session.commit() calls, let SQLAlchemy handle transactions - Extract OperationsCell and MaintenanceForm into separate component file - Clean up unused imports in WorkerPage.tsx - Improve code modularity and maintainability * refactor: replace manual fetch with generated axios wrappers for maintenance operations - Use useUiServiceRequestWorkerMaintenance and useUiServiceExitWorkerMaintenance hooks - Remove manual fetch implementation with CSRF token handling - Simplify error handling using React Query's onSuccess/onError callbacks - Improve type safety with generated API client - Reduce bundle size and code complexity - Maintain same functionality with cleaner, more maintainable code * Use react icons instead of old school buttons * Add tooltips to buttons * Have exit button not if it is in maintenance exit already * Add authentication to (new) API endpoints --------- Co-authored-by: Jens Scheffler <jscheffl@apache.org>
Expect more beautification in additional PRs, this is bringing in base functionality