From 030078a619506c5e535b8530e515ffa81a6d9577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 18 Apr 2016 11:50:54 +0200 Subject: [PATCH] Added tabs to a bunch of forms on administration (forms are getting too big right now) --- server/src/uds/REST/methods/services_pools.py | 6 ++++ server/src/uds/REST/model.py | 9 ++++-- server/src/uds/auths/IP/Authenticator.py | 4 +-- .../src/uds/auths/InternalDB/Authenticator.py | 6 ++-- .../src/uds/auths/RegexLdap/Authenticator.py | 17 ++++++------ .../src/uds/auths/SimpleLDAP/Authenticator.py | 20 +++++++------- server/src/uds/core/ui/UserInterface.py | 3 ++ .../src/uds/services/OVirt/OVirtProvider.py | 10 +++---- .../src/uds/services/OpenNebula/Provider.py | 8 +++--- .../src/uds/services/OpenStack/LiveService.py | 16 ++++++----- server/src/uds/services/OpenStack/Provider.py | 8 +++--- server/src/uds/services/Xen/XenProvider.py | 10 +++---- server/src/uds/static/adm/js/gui-form.coffee | 19 +++++++++---- .../templates/uds/admin/tmpl/fld/textbox.html | 4 +-- .../src/uds/transports/HTML5RDP/HTML5RDP.py | 18 ++++++------ server/src/uds/transports/HTML5RDP/html5.png | Bin 0 -> 1302 bytes server/src/uds/transports/HTML5RDP/rdp.png | Bin 818 -> 0 bytes server/src/uds/transports/NX/NXTransport.py | 14 +++++----- server/src/uds/transports/NX/TSNXTransport.py | 18 ++++++------ .../uds/transports/RDP/BaseRDPTransport.py | 26 +++++++++--------- .../src/uds/transports/RDP/TRDPTransport.py | 6 ++-- .../transports/SPICE/BaseSPICETransport.py | 11 +++++--- .../uds/transports/SPICE/SPICETransport.py | 8 +++--- .../uds/transports/SPICE/TSPICETransport.py | 4 +-- 24 files changed, 136 insertions(+), 109 deletions(-) create mode 100644 server/src/uds/transports/HTML5RDP/html5.png delete mode 100644 server/src/uds/transports/HTML5RDP/rdp.png diff --git a/server/src/uds/REST/methods/services_pools.py b/server/src/uds/REST/methods/services_pools.py index 8de6bf355..fe12887f4 100644 --- a/server/src/uds/REST/methods/services_pools.py +++ b/server/src/uds/REST/methods/services_pools.py @@ -152,6 +152,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Image assocciated with this service'), 'type': gui.InputField.IMAGECHOICE_TYPE, 'order': 102, + 'tab': ugettext('Display'), }, { 'name': 'servicesPoolGroup_id', 'values': [gui.choiceImage(-1, _('Default'), DEFAULT_THUMB_BASE64)] + gui.sortedChoices([gui.choiceImage(v.uuid, v.name, v.image.thumb64) for v in ServicesPoolGroup.objects.all()]), @@ -159,6 +160,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Pool group for this pool (for pool clasify on display)'), 'type': gui.InputField.IMAGECHOICE_TYPE, 'order': 103, + 'tab': ugettext('Display'), }, { 'name': 'initial_srvs', 'value': '0', @@ -167,6 +169,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Services created initially for this service pool'), 'type': gui.InputField.NUMERIC_TYPE, 'order': 110, + 'tab': ugettext('Availability'), }, { 'name': 'cache_l1_srvs', 'value': '0', @@ -175,6 +178,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Services kept in cache for improved user service assignation'), 'type': gui.InputField.NUMERIC_TYPE, 'order': 111, + 'tab': ugettext('Availability'), }, { 'name': 'cache_l2_srvs', 'value': '0', @@ -183,6 +187,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Services kept in cache of level2 for improved service generation'), 'type': gui.InputField.NUMERIC_TYPE, 'order': 112, + 'tab': ugettext('Availability'), }, { 'name': 'max_srvs', 'value': '0', @@ -191,6 +196,7 @@ class ServicesPools(ModelHandler): 'tooltip': ugettext('Maximum number of service (assigned and L1 cache) that can be created for this service'), 'type': gui.InputField.NUMERIC_TYPE, 'order': 113, + 'tab': ugettext('Availability'), }, { 'name': 'show_transports', 'value': True, diff --git a/server/src/uds/REST/model.py b/server/src/uds/REST/model.py index bd07607dc..5df223afc 100644 --- a/server/src/uds/REST/model.py +++ b/server/src/uds/REST/model.py @@ -54,7 +54,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2016-03-09' +__updated__ = '2016-04-18' # a few constants @@ -88,7 +88,7 @@ class BaseModelHandler(Handler): :param gui: List of "gui" items where the field will be added :param field: Field to be added (dictionary) ''' - gui.append({ + v = { 'name': field.get('name', ''), 'value': '', 'gui': { @@ -105,7 +105,10 @@ class BaseModelHandler(Handler): 'order': field.get('order', 0), 'values': field.get('values', []) } - }) + } + if 'tab' in field: + v['gui']['tab'] = field['tab'] + gui.append(v) return gui def addDefaultFields(self, gui, flds): diff --git a/server/src/uds/auths/IP/Authenticator.py b/server/src/uds/auths/IP/Authenticator.py index b6760e9e5..d269f0c99 100644 --- a/server/src/uds/auths/IP/Authenticator.py +++ b/server/src/uds/auths/IP/Authenticator.py @@ -43,13 +43,13 @@ from uds.core.ui.UserInterface import gui import logging -__updated__ = '2015-01-21' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) class IPAuth(Authenticator): - acceptProxy = gui.CheckBoxField(label=_('Accept proxy'), order=3, tooltip=_('If checked, requests via proxy will get FORWARDED ip address (take care with this bein checked, can take internal IP addresses from internet)')) + acceptProxy = gui.CheckBoxField(label=_('Accept proxy'), order=3, tooltip=_('If checked, requests via proxy will get FORWARDED ip address (take care with this bein checked, can take internal IP addresses from internet)'), tab=gui.ADVANCED_TAB) typeName = _('IP Authenticator') typeType = 'IPAuth' diff --git a/server/src/uds/auths/InternalDB/Authenticator.py b/server/src/uds/auths/InternalDB/Authenticator.py index d71970245..0ecfb24a9 100644 --- a/server/src/uds/auths/InternalDB/Authenticator.py +++ b/server/src/uds/auths/InternalDB/Authenticator.py @@ -43,7 +43,7 @@ from uds.core.util.State import State import dns import logging -__updated__ = '2015-02-02' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -60,8 +60,8 @@ class InternalDBAuth(Authenticator): # This is the only internal source isExternalSource = False - differentForEachHost = gui.CheckBoxField(label=_('Different user for each host'), order=1, tooltip=_('If checked, each host will have a different user name'), defvalue="false", rdonly=True) - reverseDns = gui.CheckBoxField(label=_('Reverse DNS'), order=2, tooltip=_('If checked, the host will be reversed dns'), defvalue="false", rdonly=True) + differentForEachHost = gui.CheckBoxField(label=_('Different user for each host'), order=1, tooltip=_('If checked, each host will have a different user name'), defvalue="false", rdonly=True, tab=gui.ADVANCED_TAB) + reverseDns = gui.CheckBoxField(label=_('Reverse DNS'), order=2, tooltip=_('If checked, the host will be reversed dns'), defvalue="false", rdonly=True, tab=gui.ADVANCED_TAB) def initialize(self, values): if values is None: diff --git a/server/src/uds/auths/RegexLdap/Authenticator.py b/server/src/uds/auths/RegexLdap/Authenticator.py index cb50168d1..36558ca89 100644 --- a/server/src/uds/auths/RegexLdap/Authenticator.py +++ b/server/src/uds/auths/RegexLdap/Authenticator.py @@ -44,7 +44,7 @@ import ldap.filter import re import logging -__updated__ = '2015-02-02' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -56,14 +56,15 @@ class RegexLdap(auths.Authenticator): host = gui.TextField(length=64, label=_('Host'), order=1, tooltip=_('Ldap Server Host'), required=True) port = gui.NumericField(length=5, label=_('Port'), defvalue='389', order=2, tooltip=_('Ldap port (usually 389 for non ssl and 636 for ssl)'), required=True) ssl = gui.CheckBoxField(label=_('Use SSL'), order=3, tooltip=_('If checked, the connection will be ssl, using port 636 instead of 389')) - username = gui.TextField(length=64, label=_('Ldap User'), order=4, tooltip=_('Username with read privileges on the base selected'), required=True) - password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the ldap user'), required=True) + username = gui.TextField(length=64, label=_('User'), order=4, tooltip=_('Username with read privileges on the base selected'), required=True, tab=gui.CREDENTIALS_TAB) + password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the ldap user'), required=True, tab=gui.CREDENTIALS_TAB) timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=6, tooltip=_('Timeout in seconds of connection to LDAP'), required=True, minValue=1) - ldapBase = gui.TextField(length=64, label=_('Base'), order=7, tooltip=_('Common search base (used for "users" and "groups")'), required=True) - userClass = gui.TextField(length=64, label=_('User class'), defvalue='posixAccount', order=8, tooltip=_('Class for LDAP users (normally posixAccount)'), required=True) - userIdAttr = gui.TextField(length=64, label=_('User Id Attr'), defvalue='uid', order=9, tooltip=_('Attribute that contains the user id'), required=True) - userNameAttr = gui.TextField(length=640, label=_('User Name Attr'), multiline=2, defvalue='uid', order=10, tooltip=_('Attributes that contains the user name (list of comma separated values)'), required=True) - groupNameAttr = gui.TextField(length=640, label=_('Group Name Attr'), multiline=2, defvalue='cn', order=11, tooltip=_('Attribute that contains the group name'), required=True) + + ldapBase = gui.TextField(length=64, label=_('Base'), order=7, tooltip=_('Common search base (used for "users" and "groups")'), required=True, tab=_('Ldap info')) + userClass = gui.TextField(length=64, label=_('User class'), defvalue='posixAccount', order=8, tooltip=_('Class for LDAP users (normally posixAccount)'), required=True, tab=_('Ldap info')) + userIdAttr = gui.TextField(length=64, label=_('User Id Attr'), defvalue='uid', order=9, tooltip=_('Attribute that contains the user id'), required=True, tab=_('Ldap info')) + userNameAttr = gui.TextField(length=640, label=_('User Name Attr'), multiline=2, defvalue='uid', order=10, tooltip=_('Attributes that contains the user name (list of comma separated values)'), required=True, tab=_('Ldap info')) + groupNameAttr = gui.TextField(length=640, label=_('Group Name Attr'), multiline=2, defvalue='cn', order=11, tooltip=_('Attribute that contains the group name'), required=True, tab=_('Ldap info')) # regex = gui.TextField(length=64, label = _('Regular Exp. for groups'), defvalue = '^(.*)', order = 12, tooltip = _('Regular Expression to extract the group name'), required = True) typeName = _('Regex LDAP Authenticator') diff --git a/server/src/uds/auths/SimpleLDAP/Authenticator.py b/server/src/uds/auths/SimpleLDAP/Authenticator.py index 1cedea655..2102ab883 100644 --- a/server/src/uds/auths/SimpleLDAP/Authenticator.py +++ b/server/src/uds/auths/SimpleLDAP/Authenticator.py @@ -45,7 +45,7 @@ import ldap import logging import six -__updated__ = '2015-02-02' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -57,16 +57,16 @@ class SimpleLDAPAuthenticator(Authenticator): host = gui.TextField(length=64, label=_('Host'), order=1, tooltip=_('Ldap Server IP or Hostname'), required=True) port = gui.NumericField(length=5, label=_('Port'), defvalue='389', order=2, tooltip=_('Ldap port (usually 389 for non ssl and 636 for ssl)'), required=True) ssl = gui.CheckBoxField(label=_('Use SSL'), order=3, tooltip=_('If checked, the connection will be ssl, using port 636 instead of 389')) - username = gui.TextField(length=64, label=_('Ldap User'), order=4, tooltip=_('Username with read privileges on the base selected'), required=True) - password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the ldap user'), required=True) + username = gui.TextField(length=64, label=_('Ldap User'), order=4, tooltip=_('Username with read privileges on the base selected'), required=True, tab=gui.CREDENTIALS_TAB) + password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the ldap user'), required=True, tab=gui.CREDENTIALS_TAB) timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=6, tooltip=_('Timeout in seconds of connection to LDAP'), required=True, minValue=1) - ldapBase = gui.TextField(length=64, label=_('Base'), order=7, tooltip=_('Common search base (used for "users" and "groups")'), required=True) - userClass = gui.TextField(length=64, label=_('User class'), defvalue='posixAccount', order=8, tooltip=_('Class for LDAP users (normally posixAccount)'), required=True) - userIdAttr = gui.TextField(length=64, label=_('User Id Attr'), defvalue='uid', order=9, tooltip=_('Attribute that contains the user id'), required=True) - userNameAttr = gui.TextField(length=64, label=_('User Name Attr'), defvalue='uid', order=10, tooltip=_('Attributes that contains the user name (list of comma separated values)'), required=True) - groupClass = gui.TextField(length=64, label=_('Group class'), defvalue='posixGroup', order=11, tooltip=_('Class for LDAP groups (normally poxisGroup)'), required=True) - groupIdAttr = gui.TextField(length=64, label=_('Group Id Attr'), defvalue='cn', order=12, tooltip=_('Attribute that contains the group id'), required=True) - memberAttr = gui.TextField(length=64, label=_('Group membership attr'), defvalue='memberUid', order=13, tooltip=_('Attribute of the group that contains the users belonging to it'), required=True) + ldapBase = gui.TextField(length=64, label=_('Base'), order=7, tooltip=_('Common search base (used for "users" and "groups")'), required=True, tab=_('Ldap info')) + userClass = gui.TextField(length=64, label=_('User class'), defvalue='posixAccount', order=8, tooltip=_('Class for LDAP users (normally posixAccount)'), required=True, tab=_('Ldap info')) + userIdAttr = gui.TextField(length=64, label=_('User Id Attr'), defvalue='uid', order=9, tooltip=_('Attribute that contains the user id'), required=True, tab=_('Ldap info')) + userNameAttr = gui.TextField(length=64, label=_('User Name Attr'), defvalue='uid', order=10, tooltip=_('Attributes that contains the user name (list of comma separated values)'), required=True, tab=_('Ldap info')) + groupClass = gui.TextField(length=64, label=_('Group class'), defvalue='posixGroup', order=11, tooltip=_('Class for LDAP groups (normally poxisGroup)'), required=True, tab=_('Ldap info')) + groupIdAttr = gui.TextField(length=64, label=_('Group Id Attr'), defvalue='cn', order=12, tooltip=_('Attribute that contains the group id'), required=True, tab=_('Ldap info')) + memberAttr = gui.TextField(length=64, label=_('Group membership attr'), defvalue='memberUid', order=13, tooltip=_('Attribute of the group that contains the users belonging to it'), required=True, tab=_('Ldap info')) typeName = _('SimpleLDAP Authenticator') typeType = 'SimpleLdapAuthenticator' diff --git a/server/src/uds/core/ui/UserInterface.py b/server/src/uds/core/ui/UserInterface.py index 2eb687e87..1715df42d 100644 --- a/server/src/uds/core/ui/UserInterface.py +++ b/server/src/uds/core/ui/UserInterface.py @@ -84,6 +84,9 @@ class gui(object): # : String for advanced tabs ADVANCED_TAB = ugettext_noop('Advanced') + PARAMETERS_TAB = ugettext_noop('Parameters') + CREDENTIALS_TAB = ugettext_noop('Credentials') + TUNNEL_TAB = ugettext_noop('Tunnel') # : Static Callbacks simple registry callbacks = {} diff --git a/server/src/uds/services/OVirt/OVirtProvider.py b/server/src/uds/services/OVirt/OVirtProvider.py index 4afce0afd..184547a8b 100644 --- a/server/src/uds/services/OVirt/OVirtProvider.py +++ b/server/src/uds/services/OVirt/OVirtProvider.py @@ -45,7 +45,7 @@ from .client import oVirtClient import logging -__updated__ = '2016-04-07' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -97,12 +97,12 @@ class Provider(ServiceProvider): username = gui.TextField(length=32, label=_('Username'), order=3, tooltip=_('User with valid privileges on oVirt, (use "user@domain" form)'), required=True, defvalue='admin@internal') password = gui.PasswordField(lenth=32, label=_('Password'), order=4, tooltip=_('Password of the user of oVirt'), required=True) - maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True) - maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True) + maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) + maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) - timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=90, tooltip=_('Timeout in seconds of connection to oVirt'), required=True) + timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=90, tooltip=_('Timeout in seconds of connection to oVirt'), required=True, tab=gui.ADVANCED_TAB) macsRange = gui.TextField(length=36, label=_('Macs range'), defvalue='52:54:00:00:00:00-52:54:00:FF:FF:FF', order=91, rdonly=True, - tooltip=_('Range of valid macs for UDS managed machines'), required=True) + tooltip=_('Range of valid macs for UDS managed machines'), required=True, tab=gui.ADVANCED_TAB) # Own variables _api = None diff --git a/server/src/uds/services/OpenNebula/Provider.py b/server/src/uds/services/OpenNebula/Provider.py index 28ab6c19e..f01e3dc01 100644 --- a/server/src/uds/services/OpenNebula/Provider.py +++ b/server/src/uds/services/OpenNebula/Provider.py @@ -50,7 +50,7 @@ import six # Python bindings for OpenNebula import oca -__updated__ = '2016-04-07' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -101,10 +101,10 @@ class Provider(ServiceProvider): username = gui.TextField(length=32, label=_('Username'), order=4, tooltip=_('User with valid privileges on OpenNebula'), required=True, defvalue='oneadmin') password = gui.PasswordField(lenth=32, label=_('Password'), order=5, tooltip=_('Password of the user of OpenNebula'), required=True) - maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True) - maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True) + maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) + maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) - timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=90, tooltip=_('Timeout in seconds of connection to OpenNebula'), required=True) + timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', order=90, tooltip=_('Timeout in seconds of connection to OpenNebula'), required=True, tab=gui.ADVANCED_TAB) # Own variables _api = None diff --git a/server/src/uds/services/OpenStack/LiveService.py b/server/src/uds/services/OpenStack/LiveService.py index 6b84be999..e1e5684bb 100644 --- a/server/src/uds/services/OpenStack/LiveService.py +++ b/server/src/uds/services/OpenStack/LiveService.py @@ -42,7 +42,7 @@ from uds.core.ui import gui import six import logging -__updated__ = '2016-03-09' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -113,19 +113,20 @@ class LiveService(Service): }, tooltip=_('Service availability zones'), required=True, rdonly=True ) - volume = gui.ChoiceField(label=_('Volume'), order=4, tooltip=_('Base volume for service (restricted by availability zone)'), required=True) + volume = gui.ChoiceField(label=_('Volume'), order=4, tooltip=_('Base volume for service (restricted by availability zone)'), required=True, tab=_('Machine')) # volumeType = gui.ChoiceField(label=_('Volume Type'), order=5, tooltip=_('Volume type for service'), required=True) - network = gui.ChoiceField(label=_('Network'), order=6, tooltip=_('Network to attach to this service'), required=True) - flavor = gui.ChoiceField(label=_('Flavor'), order=7, tooltip=_('Flavor for service'), required=True) + network = gui.ChoiceField(label=_('Network'), order=6, tooltip=_('Network to attach to this service'), required=True, tab=_('Machine')) + flavor = gui.ChoiceField(label=_('Flavor'), order=7, tooltip=_('Flavor for service'), required=True, tab=_('Machine')) - securityGroups = gui.MultiChoiceField(label=_('Security Groups'), order=8, tooltip=_('Service security groups'), required=True) + securityGroups = gui.MultiChoiceField(label=_('Security Groups'), order=8, tooltip=_('Service security groups'), required=True, tab=_('Machine')) baseName = gui.TextField( label=_('Machine Names'), rdonly=False, order=9, tooltip=_('Base name for clones from this machine'), - required=True + required=True, + tab=_('Machine') ) lenName = gui.NumericField( @@ -134,7 +135,8 @@ class LiveService(Service): defvalue=5, order=10, tooltip=_('Size of numeric part for the names of these machines (between 3 and 6)'), - required=True + required=True, + tab=_('Machine') ) ov = gui.HiddenField(value=None) diff --git a/server/src/uds/services/OpenStack/Provider.py b/server/src/uds/services/OpenStack/Provider.py index 89fc72e49..e39f4711c 100644 --- a/server/src/uds/services/OpenStack/Provider.py +++ b/server/src/uds/services/OpenStack/Provider.py @@ -44,7 +44,7 @@ from . import openStack import logging -__updated__ = '2016-04-07' +__updated__ = '2016-04-18' logger = logging.getLogger(__name__) @@ -105,10 +105,10 @@ class Provider(ServiceProvider): username = gui.TextField(length=64, label=_('Username'), order=9, tooltip=_('User with valid privileges on OpenStack'), required=True, defvalue='admin') password = gui.PasswordField(lenth=32, label=_('Password'), order=10, tooltip=_('Password of the user of OpenStack'), required=True) - maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True) - maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True) + maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) + maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) - timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', minValue=1, maxValue=128, order=99, tooltip=_('Timeout in seconds of connection to OpenStack'), required=True) + timeout = gui.NumericField(length=3, label=_('Timeout'), defvalue='10', minValue=1, maxValue=128, order=99, tooltip=_('Timeout in seconds of connection to OpenStack'), required=True, tab=gui.ADVANCED_TAB) # tenant = gui.TextField(length=64, label=_('Project'), order=6, tooltip=_('Project (tenant) for this provider'), required=True, defvalue='') diff --git a/server/src/uds/services/Xen/XenProvider.py b/server/src/uds/services/Xen/XenProvider.py index f23b0f3dc..a032a8def 100644 --- a/server/src/uds/services/Xen/XenProvider.py +++ b/server/src/uds/services/Xen/XenProvider.py @@ -48,7 +48,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2016-04-07' +__updated__ = '2016-04-18' CACHE_TIME_FOR_SERVER = 1800 @@ -99,13 +99,13 @@ class Provider(ServiceProvider): username = gui.TextField(length=32, label=_('Username'), order=2, tooltip=_('User with valid privileges on XenServer'), required=True, defvalue='root') password = gui.PasswordField(lenth=32, label=_('Password'), order=3, tooltip=_('Password of the user of XenServer'), required=True) - maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True) - maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True) + maxPreparingServices = gui.NumericField(length=3, label=_('Creation concurrency'), defvalue='10', minValue=1, maxValue=65536, order=50, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) + maxRemovingServices = gui.NumericField(length=3, label=_('Removal concurrency'), defvalue='5', minValue=1, maxValue=65536, order=51, tooltip=_('Maximum number of concurrently removing VMs'), required=True, tab=gui.ADVANCED_TAB) macsRange = gui.TextField(length=36, label=_('Macs range'), defvalue='02:46:00:00:00:00-02:46:00:FF:FF:FF', order=90, rdonly=True, - tooltip=_('Range of valid macs for created machines'), required=True) + tooltip=_('Range of valid macs for created machines'), required=True, tab=gui.ADVANCED_TAB) verifySSL = gui.CheckBoxField(label=_('Verify Certificate'), order=91, - tooltip=_('If selected, certificate will be checked against system valid certificate providers'), required=True) + tooltip=_('If selected, certificate will be checked against system valid certificate providers'), required=True, tab=gui.ADVANCED_TAB) # XenServer engine, right now, only permits a connection to one server and only one per instance # If we want to connect to more than one server, we need keep locked access to api, change api server, etc.. diff --git a/server/src/uds/static/adm/js/gui-form.coffee b/server/src/uds/static/adm/js/gui-form.coffee index cff01fab5..1e9c12a5a 100644 --- a/server/src/uds/static/adm/js/gui-form.coffee +++ b/server/src/uds/static/adm/js/gui-form.coffee @@ -117,7 +117,7 @@ $.each fields.tabs, (index, tab) -> h = gui.forms.fieldsToHtml(tab.fields, item) tabsContent.push "
" + h.html + "
" - tabs.push "
  • " + tab.title + "
  • " + tabs.push "
  • " + tab.title + "
  • " active = "" fillers = fillers.concat(h.fillers) # Fillers (callback based) $.extend originalValues, h.originalValues # Original values @@ -269,16 +269,25 @@ # Validation - + firstErrorTab = null $form.validate - debug: true - ignore: ':hidden:not("select")' + debug: false + ignore: ':hidden:not("select"):not(".modal_field_data")' errorClass: "text-danger" validClass: "has-success" + focusInvalid: true highlight: (element) -> - $(element).closest(".form-group").addClass "has-error" + group = $(element).closest(".form-group") + group.addClass "has-error" + if firstErrorTab == null && group.parent().hasClass('tab-pane') + firstErrorTab = $("a[href='#" + group.parent().attr('id') + "']") + firstErrorTab.tab('show') return + showErrors: (errorMap, errorList) -> + firstErrorTab = null # Show errors is invoked before Hightlihg, that is isnoved from defaultShowErrors + this.defaultShowErrors() + success: (element) -> $(element).closest(".form-group").removeClass "has-error" $(element).remove() diff --git a/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html b/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html index 48d7f2946..9757f85ff 100644 --- a/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html +++ b/server/src/uds/templates/uds/admin/tmpl/fld/textbox.html @@ -1,6 +1,6 @@ {% extends "uds/admin/tmpl/fld/form-group.html" %} {% block field %} {% verbatim %} - + {% endverbatim %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 4d48a6f97..e6a0a97ec 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -59,20 +59,20 @@ class HTML5RDPTransport(Transport): typeName = _('HTML5 RDP Transport') typeType = 'HTML5RDPTransport' typeDescription = _('RDP Transport using HTML5 client') - iconFile = 'rdp.png' + iconFile = 'html5.png' ownLink = True supportedOss = OsDetector.allOss protocol = protocols.RDP - guacamoleServer = gui.TextField(label=_('Tunnel Server'), order=1, tooltip=_('Host of the tunnel server (use http/https & port if needed) as accesible from users'), defvalue='https://', length=64, required=True) - useEmptyCreds = gui.CheckBoxField(label=_('Empty creds'), order=2, tooltip=_('If checked, the credentials used to connect will be emtpy')) - fixedName = gui.TextField(label=_('Username'), order=3, tooltip=_('If not empty, this username will be always used as credential')) - fixedPassword = gui.PasswordField(label=_('Password'), order=4, tooltip=_('If not empty, this password will be always used as credential')) - withoutDomain = gui.CheckBoxField(label=_('Without Domain'), order=5, tooltip=_('If checked, the domain part will always be emptied (to connecto to xrdp for example is needed)')) - fixedDomain = gui.TextField(label=_('Domain'), order=6, tooltip=_('If not empty, this domain will be always used as credential (used as DOMAIN\\user)')) - enableAudio = gui.CheckBoxField(label=_('Enable Audio'), order=7, tooltip=_('If checked, the audio will be redirected to client (if client browser supports it)')) - enablePrinting = gui.CheckBoxField(label=_('Enable Printing'), order=8, tooltip=_('If checked, the printing will be redirected to client (if client browser supports it)')) + guacamoleServer = gui.TextField(label=_('Tunnel Server'), order=1, tooltip=_('Host of the tunnel server (use http/https & port if needed) as accesible from users'), defvalue='https://', length=64, required=True, tab=gui.TUNNEL_TAB) + useEmptyCreds = gui.CheckBoxField(label=_('Empty creds'), order=2, tooltip=_('If checked, the credentials used to connect will be emtpy'), tab=gui.CREDENTIALS_TAB) + fixedName = gui.TextField(label=_('Username'), order=3, tooltip=_('If not empty, this username will be always used as credential'), tab=gui.CREDENTIALS_TAB) + fixedPassword = gui.PasswordField(label=_('Password'), order=4, tooltip=_('If not empty, this password will be always used as credential'), tab=gui.CREDENTIALS_TAB) + withoutDomain = gui.CheckBoxField(label=_('Without Domain'), order=5, tooltip=_('If checked, the domain part will always be emptied (to connecto to xrdp for example is needed)'), tab=gui.CREDENTIALS_TAB) + fixedDomain = gui.TextField(label=_('Domain'), order=6, tooltip=_('If not empty, this domain will be always used as credential (used as DOMAIN\\user)'), tab=gui.CREDENTIALS_TAB) + enableAudio = gui.CheckBoxField(label=_('Enable Audio'), order=7, tooltip=_('If checked, the audio will be redirected to client (if client browser supports it)'), tab=gui.PARAMETERS_TAB) + enablePrinting = gui.CheckBoxField(label=_('Enable Printing'), order=8, tooltip=_('If checked, the printing will be redirected to client (if client browser supports it)'), tab=gui.PARAMETERS_TAB) def initialize(self, values): if values is None: diff --git a/server/src/uds/transports/HTML5RDP/html5.png b/server/src/uds/transports/HTML5RDP/html5.png new file mode 100644 index 0000000000000000000000000000000000000000..e34419263f954e010b3eeb419820d40bdf7b71c5 GIT binary patch literal 1302 zcmV+x1?l>UP)JRXQA@O2}HHHf$P)}00pn#YFT13i6_rrOY zZL{5OXJ%)1yWQ3|nKVF4=Y8h=c%GSA3E6CWdUy)Id_>J{4{y$|XG%ZFsKw0*z-9~h zT;ZeS{3}iaqnW+O;a}mi6841J6TxL+@kB?uMt+YQ09ic7>IFbsLJAN7SKo*=04(1u z;qJ2fc@_X#x(m35Nt3KTa|#?b0|18R+RP6BrvO720GjxM_CaZ22uU3Yp)Z#t87WuW z#8{vufT+q66&a;i{2*r|?CgUu&y0QB5S*H($|IRh?mEfyLLCPe_14%3{A0u2r{1*D$qk?sO) zijdF>rQYxW@FNA7*r2|((V!{7?o)6nFmNlnDPTW1AR@iLTly zXKiG$Qfz;-NL7Pff@<(={c1sqb?MFkRl5lew4*c4GjQvg&Suc?xZ;*?$C z_}w&$-%B%Zgm|IBz5pPq3f13aIUE}v_p}k>g$74rLqr*w2rUJe6rntt!mRI3O{%Od zz7LM_Zhdu00mGjZz}z{%Jv~eZ06QO>dFGxTxm9rhE_Hfhfo?SbdOzW zuYA4$#Ht?<>ZZdZ<0k6 zN9FRB8(hxUqQQF6e*oAfa}r%uDAzRw0^A7Up}}U2qJ0tT7mdtJq*ns&#)rX;;@;&KOmm1*rN~@fXwP~GyOb)T z&md-P4rl7F1$+P_X^W0DLv(Cfs|;a1#}n2K1ps3)^<2FCvVQ^$02pKn8>2J3k^lez M07*qoM6N<$g3iV|djJ3c literal 0 HcmV?d00001 diff --git a/server/src/uds/transports/HTML5RDP/rdp.png b/server/src/uds/transports/HTML5RDP/rdp.png deleted file mode 100644 index 5457e4105ed2f4cba6807871263083f0ae54b2bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 818 zcmV-21I_%2P)N0>4Q_ zK~#9!?VHbP6Hye0zcZPpv8hReidy=|PSaXj#0T&V?Ak5`-3z`##RurBhl z8E64!fb`#JIdTBDO5z2A^qlspE;=yYUcCR)h63Qp8_6G@;X2A{AV{wn3)W)-(!Xhv`{`ljzKXjPkGs?w51=$|}8yl&g=ReK2%%;)s5b;{inaM)n+f`sY zip~-a;LeR~eNtDN^7J$q-~UBxVg4t>Tn$WQ>OUt?cd zSvZ0Lp41!?-VA^N7{oR#h$+AT7=Q$OfGNNLSPGZ|5)DA@AY>k33NQc$z&yYd5W(gu zJQqmy-omMg>i!8Bt2C(heuvXBrotmf$%f2X=T9x6cN40rz2`(}I6@`t6-Q8(B$UT3 z1;SE5cD}zNyh2n12~PoOR8gn597TWVt=xmwb4l(Ih03(>L3mlI0b_lhs-o+;sQ`d| zU?Ktl9@;rzNb_pa0VGZVVhS)1Fa?+blB@vxQ?v_5G!&qydBCv9+b&=yK~sR8155$7 z3nbM9C0YOulbiysuIF;HQz_8CW#xh6f%?z$gcMHVZh|g=uIIl2@0-0-t