mirror of
https://github.com/dkmstr/openuds.git
synced 2025-02-03 13:47:14 +03:00
several fixes
This commit is contained in:
parent
d7ac59f257
commit
335fd338bd
@ -40,7 +40,7 @@ from uds.core.transports import protocols
|
||||
|
||||
import logging
|
||||
|
||||
__updated__ = '2015-05-28'
|
||||
__updated__ = '2016-01-20'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -108,6 +108,15 @@ class Transport(Module):
|
||||
'''
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def supportsProtocol(cls, protocol):
|
||||
if isinstance(protocol, (list, tuple)):
|
||||
for v in protocol:
|
||||
if cls.supportsProtocol(v) is True:
|
||||
return True
|
||||
return False
|
||||
return protocol.lower() == cls.protocol.lower()
|
||||
|
||||
@classmethod
|
||||
def supportsOs(cls, osName):
|
||||
'''
|
||||
|
@ -47,4 +47,4 @@ X11 = 'x11'
|
||||
X2GO = 'x2go'
|
||||
OTHER = 'other'
|
||||
|
||||
GENERIC = (RDP, RGS, VNC, NX, X11, X2GO, OTHER)
|
||||
GENERIC = (RDP, RGS, VNC, NX, X11, X2GO, PCOIP, OTHER)
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
return str
|
||||
|
||||
isEmpty: (obj) ->
|
||||
return $.isEmptyObject(obj)
|
||||
|
||||
return
|
||||
) window.api = window.api or {}, jQuery
|
||||
|
@ -10,6 +10,7 @@
|
||||
@rest = restItem
|
||||
@name = name
|
||||
@types = {}
|
||||
@initialized = false
|
||||
@init()
|
||||
return
|
||||
|
||||
@ -23,6 +24,7 @@
|
||||
@rest.types (data) ->
|
||||
styles = ""
|
||||
alreadyAttached = $("#gui-style-" + self.name).length isnt 0
|
||||
self.types = {}
|
||||
$.each data, (index, value) ->
|
||||
className = self.name + "-" + value.type
|
||||
self.types[value.type] = value
|
||||
@ -38,6 +40,10 @@
|
||||
# If style already attached, do not re-attach it
|
||||
styles = "<style id=\"gui-style-" + self.name + "\" media=\"screen\">" + styles + "</style>"
|
||||
$(styles).appendTo "head"
|
||||
|
||||
# Initialization finished
|
||||
self.initialized = true
|
||||
|
||||
return
|
||||
|
||||
return
|
||||
@ -87,10 +93,21 @@
|
||||
#
|
||||
table: (tblParams) ->
|
||||
"use strict"
|
||||
|
||||
tblParams = tblParams or {}
|
||||
self = this # Store this for child functions
|
||||
|
||||
if self.initialized is false
|
||||
setTimeout (->
|
||||
gui.doLog 'Delaying table creation'
|
||||
self.table(tblParams)
|
||||
return
|
||||
), 100
|
||||
return
|
||||
|
||||
|
||||
gui.doLog "Composing table for " + @name, tblParams
|
||||
tableId = @name + "-table"
|
||||
self = this # Store this for child functions
|
||||
|
||||
# ---------------
|
||||
# Cells renderers
|
||||
@ -290,7 +307,7 @@
|
||||
|
||||
when "new"
|
||||
if self.rest.permission() >= api.permissions.MANAGEMENT
|
||||
if Object.keys(self.types).length isnt 0
|
||||
if not api.tools.isEmpty(self.types)
|
||||
menuId = gui.genRamdonId("dd-")
|
||||
ordered = []
|
||||
$.each self.types, (k, v) ->
|
||||
|
@ -49,7 +49,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2015-11-16'
|
||||
__updated__ = '2016-01-20'
|
||||
|
||||
|
||||
def about(request):
|
||||
@ -132,8 +132,6 @@ def index(request):
|
||||
|
||||
# Now generic user service
|
||||
for svr in availServices:
|
||||
# Generate ticket
|
||||
|
||||
trans = []
|
||||
for t in svr.transports.all().order_by('priority'):
|
||||
typeTrans = t.getType()
|
||||
|
Loading…
x
Reference in New Issue
Block a user