1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-13 08:58:35 +03:00

Fixed possition of base64 js. When using "compressor" on production, it was not working on prev place

This commit is contained in:
Adolfo Gómez García 2015-05-06 02:16:39 +02:00
parent 776702f971
commit eb7185b9e3
8 changed files with 13 additions and 11 deletions

View File

@ -160,7 +160,7 @@ class Connection(Handler):
events.addEvent(ads.deployed_service, events.ET_ACCESS, username=self._user.name, srcip=self._request.ip, dstip=ip, uniqueid=ads.unique_id)
if ip is not None:
itrans = trans.getInstance()
if itrans.providesConnetionInfo() and (doNotCheck or itrans.isAvailableFor(ip)):
if itrans.providesConnetionInfo() and (doNotCheck or itrans.isAvailableFor(ads, ip)):
ads.setConnectionSource(self._request.ip, 'unknown')
log.doLog(ads, log.INFO, "User service ready, rendering transport", log.WEB)
@ -179,7 +179,7 @@ class Connection(Handler):
else:
log.doLog(ads, log.WARN, "User service is not accessible by REST (ip {0})".format(ip), log.TRANSPORT)
logger.debug('Transport {} is not accesible for user service {} from {}'.format(trans, ads, self._request.ip))
logger.debug("{}, {}".format(itrans.providesConnetionInfo(), itrans.isAvailableFor(ip)))
logger.debug("{}, {}".format(itrans.providesConnetionInfo(), itrans.isAvailableFor(ads, ip)))
else:
logger.debug('Ip not available from user service {0}'.format(ads))
else:

View File

@ -574,7 +574,7 @@ class UserServiceManager(object):
if ip is not None:
serviceNotReadyCode = 0x0003
itrans = trans.getInstance()
if itrans.isAvailableFor(ip):
if itrans.isAvailableFor(userService, ip):
userService.setConnectionSource(srcIp, 'unknown')
log.doLog(userService, log.INFO, "User service ready", log.WEB)
UserServiceManager.manager().notifyPreconnect(userService, itrans.processedUser(userService, user), itrans.protocol)

View File

@ -62,6 +62,9 @@ class Transport(Module):
# Linux
supportedOss = OsDetector.desktopOss # Supported operating systems
# If this transport is for an specific provider, this will be != None
onlyForProviders = None
# If this transport is visible via Web, via Thin Client or both
webTransport = False
tcTransport = False
@ -99,7 +102,7 @@ class Transport(Module):
'''
pass
def isAvailableFor(self, ip):
def isAvailableFor(self, userService, ip):
'''
Checks if the transport is available for the requested destination ip
Override this in yours transports

View File

@ -81,9 +81,6 @@
<script src="{% get_static_prefix %}adm/js/jquery.blockUI.js"></script>
<script src="{% get_static_prefix %}adm/js/jquery.dataTables.min.js"></script>
<!-- base64 encoding -->
<script src="{% get_static_prefix %}adm/js/base64.js"></script>
<!-- Flot charts -->
<script src="{% get_static_prefix %}adm/js/flot/jquery.flot.min.js"></script>
<script src="{% get_static_prefix %}adm/js/flot/jquery.flot.resize.min.js"></script>
@ -135,6 +132,8 @@
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}adm/js/gui-d-config.coffee"></script>
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}adm/js/gui-d-gallery.coffee"></script>
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}adm/js/gui-d-reports.coffee"></script>
<!-- base64 encoding -->
<script src="{% get_static_prefix %}adm/js/base64.js"></script>
<script>
$(function() {

View File

@ -81,7 +81,7 @@ class HTML5RDPTransport(Transport):
raise Transport.ValidationException(_('The server must be http or https'))
# Same check as normal RDP transport
def isAvailableFor(self, ip):
def isAvailableFor(self, userService, ip):
'''
Checks if the transport is available for the requested destination ip
Override this in yours transports

View File

@ -145,7 +145,7 @@ class NXTransport(Transport):
'cacheMem': self._cacheMem
}
def isAvailableFor(self, ip):
def isAvailableFor(self, userService, ip):
'''
Checks if the transport is available for the requested destination ip
Override this in yours transports

View File

@ -160,7 +160,7 @@ class TSNXTransport(Transport):
'tunnelCheckServer': self._tunnelCheckServer
}
def isAvailableFor(self, ip):
def isAvailableFor(self, userService, ip):
'''
Checks if the transport is available for the requested destination ip
Override this in yours transports

View File

@ -66,7 +66,7 @@ class BaseRDPTransport(Transport):
wallpaper = gui.CheckBoxField(label=_('Show wallpaper'), order=10, tooltip=_('If checked, the wallpaper and themes will be shown on machine (better user experience, more bandwidth)'))
multimon = gui.CheckBoxField(label=_('Multiple monitors'), order=10, tooltip=_('If checked, all client monitors will be used for displaying (only works on windows clients)'))
def isAvailableFor(self, ip):
def isAvailableFor(self, userService, ip):
'''
Checks if the transport is available for the requested destination ip
Override this in yours transports