1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-10-26 07:33:41 +03:00

Refactor REST methods and UI components

- Introduced ServicesUsageItem class to encapsulate service usage details.
- Updated ServicesUsage to utilize ServicesUsageItem for type safety.
- Enhanced Transports and TunnelServers classes with improved GUI handling using StockField.
- Added StockField and related fields for consistent UI element definitions.
- Refactored get_gui methods to return structured GUI elements.
- Improved type hints across various methods for better clarity and type safety.
- Added utility functions for creating common UI fields.
- Updated documentation and comments for clarity and maintainability.
This commit is contained in:
Adolfo Gómez García
2025-07-26 23:52:15 +02:00
parent ce9110b7ca
commit 942c3a63fe
29 changed files with 1127 additions and 710 deletions

View File

@@ -96,7 +96,7 @@ class ServicesPoolGroups(ModelHandler[ServicePoolGroupItem]):
# Gui related
def get_gui(self, type_: str) -> list[typing.Any]:
local_gui = self.default_fields([], ['name', 'comments', 'priority'])
local_gui = self.compose_gui([], ['name', 'comments', 'priority'])
for field in [
{