1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-10-22 19:33:59 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Adolfo Gómez García
00fb79244a Add REST API information to various handlers and models
- Introduced REST_API_INFO class variable to Handler and various ModelHandler subclasses to provide metadata for auto-generated APIs.
- Updated api_helpers to utilize REST_API_INFO for dynamic naming and descriptions.
- Enhanced API response generation functions to include OData parameters and improved request body descriptions.
- Added checks in UserServiceManager to prevent actions on already removed services.
- Cleaned up code formatting and comments for better readability.
2025-09-20 16:17:18 +02:00
Adolfo Gómez García
2c17f72695 Refactor imports and type hints across multiple modules
- Removed unnecessary conditional imports for Django models.
- Updated type hints from 'Model' to 'models.Model' for better clarity and consistency.
- Added missing imports for 'models' in various files to ensure proper type checking.
- Cleaned up import statements by consolidating related imports.
- Enhanced readability and maintainability of the codebase by standardizing import styles.
2025-08-10 07:13:04 +02:00
Adolfo Gómez García
1e6cca1c37 Rename item_as_dict_overview methods to get_item_summary for clarity 2025-07-31 04:04:02 +02:00
Adolfo Gómez García
5437cfe6de Heavy refactoring again to convert all return types to an structured inheritance scheme based on dacaclasses 2025-07-31 03:47:59 +02:00
Adolfo Gómez García
af3c309917 Refactor REST handler attributes and clean up unused code
- Changed attribute names from `name` to `NAME` and `path` to `PATH` in various REST handler classes for consistency.
- Removed commented-out code related to table titles and fields in multiple methods.
- Introduced a new `actor.py` file to define `NotifyActionType` enum for better organization.
- Updated references to help paths and help text in the `Stats` and `System` classes.
- Cleaned up the `Permissions` class by removing old commented-out code.
- Adjusted the `ServersManagement` and `ServicesPoolGroups` classes to use the new attribute naming convention.
2025-07-30 20:01:29 +02:00
Adolfo Gómez García
c0cdb26c48 Strong refactoring to finish TABLE builder and renaming const ClassVars to uppercase 2025-07-30 19:31:27 +02:00
Adolfo Gómez García
968fca260f Refactor table representation in REST methods
- Updated various REST methods to replace `table_title` and `table_fields` with a unified `table_info` structure.
- Enhanced the `table_info` to encapsulate title, fields, and row styles in a single object, improving code clarity and maintainability.
- Adjusted the `DetailHandler` and `ModelHandler` classes to accommodate the new `table_info` structure.
- Removed deprecated methods related to table title and fields, streamlining the codebase.
- Ensured backward compatibility by maintaining the existing functionality while transitioning to the new structure.
2025-07-30 01:38:14 +02:00
Adolfo Gómez García
971e51ff27 Refactor table_fields to use TableBuilder for consistency across multiple modules 2025-07-29 21:59:54 +02:00
Adolfo Gómez García
8231855bd0 Adding table_fields builder and updating all rest code to honor it 2025-07-29 21:48:01 +02:00
Adolfo Gómez García
53f95c6733 Refactor REST API item classes and access methods
- Changed various item classes from ItemDictType to BaseRestItem for consistency.
- Updated ManagedObjectDictType to ManagedObjectItem.
- Replaced ensure_has_access method calls with check_access for improved clarity.
- Refactored GUI composition methods to utilize the new GuiBuilder utility.
- Adjusted return types in get_items methods to use ItemsResult for better type safety.
- Removed deprecated field handling in BaseModelHandler.
- Enhanced type annotations across multiple modules for better type checking.
2025-07-29 01:44:10 +02:00
Adolfo Gómez García
a265dfb754 Update translations and HTML template for admin interface
- Added new translation strings for various UI elements and error messages in translations-fakejs.js.
- Removed duplicate and unnecessary translation entries to streamline the code.
- Updated the integrity and timestamp for module preload links in the index.html file to ensure the latest resources are loaded.
2025-07-28 22:27:47 +02:00
Adolfo Gómez García
ac231f80eb Refactor get_gui method to improve clarity and utilize ui_utils for image choices 2025-07-26 23:56:23 +02:00
Adolfo Gómez García
942c3a63fe 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.
2025-07-26 23:52:15 +02:00
Adolfo Gómez García
ce9110b7ca Refactor GUI field handling to replace add_default_fields with default_fields for consistency 2025-07-26 02:07:58 +02:00
Adolfo Gómez García
be6cfb0ec5 Refactor REST model handlers to enhance type safety and consistency
- Updated `AuthenticatorItem`, `NetworkItem`, `NotifierItem`, `AccessCalendarItem`, `ActionCalendarItem`, `OsManagerItem`, `ProviderItem`, `ReportItem`, `TokenItem`, `ServerItem`, `GroupItem`, `ServiceItem`, `ServicePoolItem`, and `TransportItem` to inherit from `ManagedObjectDictType` for improved type safety.
- Refactored `BaseModelHandler` and `ModelHandler` to use generic types for better type inference.
- Modified `DetailHandler` to extend `BaseModelHandler` with generics.
- Adjusted return types in various methods to utilize the new item types, ensuring consistent type usage across the REST API.
- Introduced `ManagedObjectDictType` to represent managed objects in the REST API, including fields for type and instance.
2025-07-26 01:21:06 +02:00
Adolfo Gómez García
803c8ba7b2 Refactor REST methods to use specific ItemDictType for item serialization and improve type handling 2025-02-09 15:15:23 +01:00
Adolfo Gómez García
b41a1afd43 Refactor access control roles to use UserRole constants for consistency 2025-02-03 01:29:09 +01:00
Adolfo Gómez García
58fb367a60 Fixed "itemor" that was in fact "author" 2024-10-14 03:48:37 +02:00
Adolfo Gómez García
2f69c18ad9 Massive refactoring to adapt to snake_case and some improvements to code for groups manager, etc... 2024-10-13 18:54:56 +02:00
Adolfo Gómez García
a2fc3130cd MASSIVE type checking fixes for even more strict checkings 2024-02-29 01:33:45 +01:00
Adolfo Gómez García
75b27af0fe Big code fixing, adapting to mypy/pyright strict checking mode 2024-02-21 03:35:36 +01:00
Adolfo Gómez García
ad1b8cb51d More refactorization 2024-01-10 19:17:15 +01:00
Adolfo Gómez García
6ae18f4a58 advancing on refactoring 2024-01-09 02:45:44 +01:00
Adolfo Gómez García
bc61814ec4 advancing on refactoring and cache improvements 2024-01-08 00:44:44 +01:00
Adolfo Gómez García
a48f5e6241 Replacing deprecating typing classes in favour of builtings or collections.abc ones.
Most changes are simple annotations.
Will continue changes as i found them :)
2023-12-04 00:04:56 +01:00
Adolfo Gómez García
d4ea0ad8c6 Fixing up LSP on REST classes 2023-11-03 04:18:53 +01:00
Adolfo Gómez García
f24b801f04 more UserInterface improvements and fixes :) 2023-08-31 20:04:36 +02:00
Adolfo Gómez García
f67d4d9a41 Moving some types to types.ui (Basic types) 2023-08-30 03:39:40 +02:00
Adolfo Gómez García
7956764b01 Fixing up names to be more coherent with their use
Related to user_interface
2023-08-29 17:58:25 +02:00
Adolfo Gómez García
bd37201109 Fixed (c) headers and some minor formatting related changes 2023-06-22 16:04:11 +02:00
Adolfo Gómez García
ec9811dc34 Merge remote-tracking branch 'origin/v3.6' 2023-03-25 13:21:01 +01:00
Adolfo Gómez García
562e9201c8 Added typing correction on 3.6 version 2023-03-25 13:19:28 +01:00
Adolfo Gómez García
c07c21b6a9 updating user interface manager 2022-10-31 20:53:30 +01:00
Adolfo Gómez García
c6dfd3f362 Refactorizing gui variables - types 2022-09-12 14:41:15 +02:00
Adolfo Gómez García
b3a8ae8abe Migrating to Django 4.0 (fixes) 2021-12-10 13:41:10 +01:00
Adolfo Gómez García
8285e2daad More formating & minor typing fixes 2021-08-13 15:11:22 +02:00
Adolfo Gómez García
7f9b4c9274 Fixed REST services_pool_groups for python 3.x 2019-09-12 13:11:06 +02:00
Adolfo Gómez García
104eeac53c Refactorized uds.core.ui and several fixes 2019-08-15 12:11:47 +02:00
Adolfo Gómez García
882a8ad2c9 fixes for 3.7 (random found ones) 2019-08-14 11:00:21 +02:00
Adolfo Gómez García
217a51728e renamed ServicesPoolGroup to ServicePoolGroup 2019-08-14 09:52:10 +02:00
Adolfo Gómez García
ccdedb9126 fixes for python 3.x 2019-06-10 08:40:37 +02:00
Adolfo Gómez García
64ddba25f4 continues fixes for python 3.x and removal of 2.7 stuff 2019-06-06 10:41:26 +02:00
Adolfo Gómez García
b8c09f48db Code style related fixes (a lot!!! :) ) 2017-10-13 13:06:27 +02:00
Adolfo Gómez García
622e8629ff Fixed image removal on service pool group 2016-07-11 12:43:22 +02:00
Adolfo Gómez García
9365f5937b Advancend & sync 2016-05-06 13:30:06 +02:00
Adolfo Gómez García
07ed8b9762 Fixed Images & pools groups (added priority and enhaced visual on admin 2016-02-12 09:53:33 +01:00
Adolfo Gómez García
a08fe53383 * Added "Service Pool Group" full logic, so new we can add services pools to groups, so we can visualzize them grouped. (already needs the visualizarion part)
* Finished basic taglist edition (fixed a bug & added the possibility of insert serveral comma separated values at once')
2016-02-12 04:47:44 +01:00