Merge remote-tracking branch 'origin/v2.1'

This commit is contained in:
Adolfo Gómez García 2017-02-13 17:09:16 +01:00
commit 053eb55355
5 changed files with 21 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{% load i18n %}
<div class="row">
<div class="col-xs-12">
<h1>{% endverbatim %}{% trans 'OS Managers' %}{% verbatim %}</h1>
<h1>{% trans 'OS Managers' %}</h1>
<!-- <ol class="breadcrumb">
<li><a class="lnk-dashboard" href="#">Dashboard</a></li>
<li>OS Managers</li>

View File

@ -40,7 +40,7 @@ from uds.core.transports import protocols
import logging
import os
__updated__ = '2017-01-25'
__updated__ = '2017-02-13'
logger = logging.getLogger(__name__)
@ -71,6 +71,8 @@ class BaseRDPTransport(Transport):
smooth = gui.CheckBoxField(label=_('Font Smoothing'), order=23, tooltip=_('If checked, fonts smoothing will be allowed (windows clients only)'), tab=gui.PARAMETERS_TAB)
multimedia = gui.CheckBoxField(label=_('Multimedia sync'), order=25, tooltip=_('If checked. Linux client will use multimedia parameter for xfreerdp'), tab='Linux Client')
alsa = gui.CheckBoxField(label=_('Use Alsa'), order=26, tooltip=_('If checked, Linux client will try to use ALSA, otherwise Pulse will be used'), tab='Linux Client')
printerString = gui.TextField(label=_('Printer string'), order=27, tooltip=_('If printer is checked, the printer string used with xfreerdp client'), tab='Linux Client')
smartcardString = gui.TextField(label=_('Smartcard string'), order=28, tooltip=_('If smartcard is checked, the smartcard string used with xfreerdp client'), tab='Linux Client')
def isAvailableFor(self, userService, ip):
'''

View File

@ -40,7 +40,7 @@ from uds.core.util import OsDetector
import six
import os
__updated__ = '2017-01-25'
__updated__ = '2017-02-13'
class RDPFile(object):
@ -65,7 +65,8 @@ class RDPFile(object):
multimon = False
desktopComposition = False
smoothFonts = True
enablecredsspsupport = True
printerString = None
smartcardString = None
def __init__(self, fullScreen, width, height, bpp, target=OsDetector.Windows):
self.width = six.text_type(width)
@ -94,8 +95,8 @@ class RDPFile(object):
'''
params = ['/clipboard', '/t:UDS-Connection', '/cert-ignore', '/sec:rdp']
if self.redirectSmartcards:
params.append('/smartcard')
if self.redirectSmartcards and self.smartcardString not in (None, ''):
params.append('/smartcard:{}'.format(self.smartcardString))
if self.redirectAudio:
if self.alsa:
@ -116,8 +117,8 @@ class RDPFile(object):
if self.redirectSerials is True:
params.append('/serial:/dev/ttyS0')
if self.redirectPrinters:
params.append('/printer')
if self.redirectPrinters and self.printerString not in (None, ''):
params.append('/printer:{}'.format(self.printerString))
if self.compression:
params.append('/compression:on')

View File

@ -44,7 +44,7 @@ logger = logging.getLogger(__name__)
READY_CACHE_TIMEOUT = 30
__updated__ = '2017-01-25'
__updated__ = '2017-02-13'
class RDPTransport(BaseRDPTransport):
@ -71,6 +71,8 @@ class RDPTransport(BaseRDPTransport):
smooth = BaseRDPTransport.smooth
multimedia = BaseRDPTransport.multimedia
alsa = BaseRDPTransport.alsa
printerString = BaseRDPTransport.printerString
smartcardString = BaseRDPTransport.smartcardString
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request):
# We use helper to keep this clean
@ -97,8 +99,8 @@ class RDPTransport(BaseRDPTransport):
r.smoothFonts = self.smooth.isTrue()
r.multimedia = self.multimedia.isTrue()
r.alsa = self.alsa.isTrue()
r.enablecredsspsupport = not ci['sso'] # with SSO, credssspsuport must be disabled
logger.debug('SSO: {}'.format(ci['sso']))
r.smartcardString = self.smartcardString.value
r.printerString = self.printerString.value
# data
data = {

View File

@ -48,7 +48,7 @@ import logging
import random
import string
__updated__ = '2017-02-05'
__updated__ = '2017-02-13'
logger = logging.getLogger(__name__)
@ -89,6 +89,8 @@ class TRDPTransport(BaseRDPTransport):
smooth = BaseRDPTransport.smooth
multimedia = BaseRDPTransport.multimedia
alsa = BaseRDPTransport.alsa
printerString = BaseRDPTransport.printerString
smartcardString = BaseRDPTransport.smartcardString
def initialize(self, values):
if values is not None:
@ -127,6 +129,8 @@ class TRDPTransport(BaseRDPTransport):
r.smoothFonts = self.smooth.isTrue()
r.multimedia = self.multimedia.isTrue()
r.alsa = self.alsa.isTrue()
r.smartcardString = self.smartcardString.value
r.printerString = self.printerString.value
# data
data = {