diff --git a/server/src/uds/core/transports/protocols.py b/server/src/uds/core/transports/protocols.py index 37fd8dd73..a58f0d783 100644 --- a/server/src/uds/core/transports/protocols.py +++ b/server/src/uds/core/transports/protocols.py @@ -44,7 +44,7 @@ ICA = 'ica' NX = 'nx' X11 = 'x11' X2GO = 'x2go' # Based on NX -NICE = 'nice' +NICEDCV = 'nicedcv' OTHER = 'other' -GENERIC = (RDP, RGS, VNC, NX, X11, X2GO, PCOIP, NICE, OTHER) +GENERIC = (RDP, RGS, VNC, NX, X11, X2GO, PCOIP, NICEDCV, OTHER) diff --git a/server/src/uds/core/ui/user_interface.py b/server/src/uds/core/ui/user_interface.py index 961f22815..a13e7f1a3 100644 --- a/server/src/uds/core/ui/user_interface.py +++ b/server/src/uds/core/ui/user_interface.py @@ -219,8 +219,8 @@ class gui: * order * label * tooltip - * defvalue - * rdonly if can't be modified once it's created + * defvalue (if not required, this is optional). Alias for this field is defaultValue + * rdonly if can't be modified once it's created. Aliases for this field is readOnly Any other paremeter needed is indicated in the corresponding field class. @@ -251,7 +251,8 @@ class gui: _data: typing.Dict[str, typing.Any] def __init__(self, **options) -> None: - defvalue = options.get('defvalue', '') + # Added defaultValue as alias for defvalue + defvalue = options.get('defvalue', options.get('defaultValue', '')) if callable(defvalue): defvalue = defvalue() self._data = { @@ -262,7 +263,7 @@ class gui: 'label': options.get('label', ''), 'defvalue': str(defvalue), 'rdonly': options.get( - 'rdonly', False + 'rdonly', options.get('readOnly', False) ), # This property only affects in "modify" operations 'order': options.get('order', 0), 'tooltip': options.get('tooltip', ''), @@ -469,6 +470,10 @@ class gui: v = 0 return v + @property + def int_value(self) -> int: + return self.num() + class DateField(InputField): """ This represents a date field.