mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
* Added alert icon for calender restricted services
* Fixed spice to add fullscreen support on transport definition & a bug to allow using it. * Fixed OS Detector to include "unknown" as an os on "all OSs"
This commit is contained in:
parent
c2d4e995e7
commit
0bd3e1ac72
@ -46,10 +46,11 @@ Macintosh = 'Mac'
|
||||
Android = 'Android'
|
||||
iPad = 'iPad'
|
||||
iPhone = 'iPhone'
|
||||
Unknown = 'Unknown'
|
||||
|
||||
knownOss = (WindowsPhone, Android, Linux, Windows, Macintosh, iPad, iPhone) # Android is linux also, so it is cheched on first place
|
||||
|
||||
allOss = tuple(knownOss)
|
||||
allOss = tuple(knownOss) + tuple(Unknown)
|
||||
desktopOss = (Linux, Windows, Macintosh)
|
||||
mobilesODD = list(set(allOss) - set(desktopOss))
|
||||
|
||||
@ -93,9 +94,9 @@ def getOsFromUA(ua):
|
||||
Basic OS Client detector (very basic indeed :-))
|
||||
'''
|
||||
if ua is None:
|
||||
ua = 'Unknown'
|
||||
ua = Unknown
|
||||
|
||||
os = 'Unknown'
|
||||
os = Unknown
|
||||
|
||||
res = DictAsObj({'OS': os, 'Version': '0.0', 'Browser': 'unknown'})
|
||||
for os in knownOss:
|
||||
|
@ -162,7 +162,6 @@ class LinuxOsManager(osmanagers.OSManager):
|
||||
ip, hostname = userService.getConnectionSource()
|
||||
deadLine = userService.deployed_service.getDeadline()
|
||||
ret = "{0}\t{1}\t{2}".format(ip, hostname, 0 if deadLine is None else deadLine)
|
||||
|
||||
elif msg == "logout":
|
||||
self.loggedOut(userService, data, False)
|
||||
if self._onLogout == 'remove':
|
||||
|
BIN
server/src/uds/static/img/alert.png
Normal file
BIN
server/src/uds/static/img/alert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -239,6 +239,11 @@
|
||||
to { box-shadow: 0px 0px 8px 5px #0066cc; }
|
||||
}
|
||||
|
||||
div.notaccesible {
|
||||
background-image: url("{% get_static_prefix %}/img/alert.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
|
||||
div.service > img {
|
||||
width: 100%;
|
||||
@ -303,6 +308,7 @@
|
||||
$('.with-tooltip').popover({container: 'body', trigger: 'hover', delay: { show: 500, hide: 100 }, placement: 'auto bottom'});
|
||||
|
||||
$('.inuse').popover({container: 'body', trigger: 'hover', delay: { show: 500, hide: 100 }, placement: 'auto top'});
|
||||
$('.notaccesible').popover({container: 'body', trigger: 'hover', delay: { show: 500, hide: 100 }, placement: 'auto top'});
|
||||
|
||||
$('div.service:not(.maintenance, .notaccesible)').on("click", function (event){
|
||||
var url, el;
|
||||
|
@ -44,7 +44,7 @@ from uds.services.OVirt.OVirtProvider import Provider as oVirtProvider
|
||||
import logging
|
||||
import os
|
||||
|
||||
__updated__ = '2016-05-19'
|
||||
__updated__ = '2016-05-27'
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -63,7 +63,7 @@ class BaseSpiceTransport(Transport):
|
||||
|
||||
useEmptyCreds = gui.CheckBoxField(
|
||||
order=1,
|
||||
label=_('Empty creds'),
|
||||
label=_('Empty credentials'),
|
||||
tooltip=_('If checked, the credentials used to connect will be emtpy'),
|
||||
tab=gui.CREDENTIALS_TAB
|
||||
)
|
||||
@ -87,6 +87,12 @@ class BaseSpiceTransport(Transport):
|
||||
tooltip=_('Server certificate (public), can be found on your ovirt engine, probably at /etc/pki/ovirt-engine/certs/ca.der (Use the contents of this file).'),
|
||||
required=True
|
||||
)
|
||||
fullScreen = gui.CheckBoxField(
|
||||
order=5,
|
||||
label=_('Show fullscreen'),
|
||||
tooltip=_('If checked, viewer will be shown on fullscreen mode-'),
|
||||
tab=gui.ADVANCED_TAB
|
||||
)
|
||||
|
||||
def isAvailableFor(self, userService, ip):
|
||||
'''
|
||||
|
@ -8,7 +8,7 @@ import six
|
||||
import os
|
||||
|
||||
|
||||
__updated__ = '2015-05-10'
|
||||
__updated__ = '2016-05-27'
|
||||
|
||||
|
||||
TEMPLATE = '''[virt-viewer]
|
||||
@ -56,7 +56,7 @@ class RemoteViewerFile(object):
|
||||
self.password = password
|
||||
self.ca = ca
|
||||
self.host_subject = host_subject
|
||||
self.fullscreen = False
|
||||
self.fullscreen = fullscreen
|
||||
|
||||
@property
|
||||
def as_file(self):
|
||||
|
@ -39,7 +39,7 @@ from .RemoteViewerFile import RemoteViewerFile
|
||||
|
||||
import logging
|
||||
|
||||
__updated__ = '2016-04-18'
|
||||
__updated__ = '2016-05-27'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -57,6 +57,7 @@ class SPICETransport(BaseSpiceTransport):
|
||||
# fixedName = BaseSpiceTransport.fixedName
|
||||
# fixedPassword = BaseSpiceTransport.fixedPassword
|
||||
serverCertificate = BaseSpiceTransport.serverCertificate
|
||||
fullScreen = BaseSpiceTransport.fullScreen
|
||||
|
||||
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request):
|
||||
userServiceInstance = userService.getInstance()
|
||||
@ -69,7 +70,7 @@ class SPICETransport(BaseSpiceTransport):
|
||||
port = -1 if port is None else port
|
||||
secure_port = -1 if secure_port is None else secure_port
|
||||
|
||||
r = RemoteViewerFile(con['address'], port, secure_port, con['ticket']['value'], self.serverCertificate.value, con['cert_subject'], fullscreen=False)
|
||||
r = RemoteViewerFile(con['address'], port, secure_port, con['ticket']['value'], self.serverCertificate.value, con['cert_subject'], fullscreen=self.fullScreen.isTrue())
|
||||
|
||||
m = tools.DictAsObj({
|
||||
'r': r
|
||||
|
@ -46,7 +46,7 @@ import logging
|
||||
import random
|
||||
import string
|
||||
|
||||
__updated__ = '2016-04-18'
|
||||
__updated__ = '2016-05-27'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -65,6 +65,7 @@ class TSPICETransport(BaseSpiceTransport):
|
||||
tunnelServer = gui.TextField(label=_('Tunnel server'), order=1, tooltip=_('IP or Hostname of tunnel server sent to client device ("public" ip) and port. (use HOST:PORT format)'), tab=gui.TUNNEL_TAB)
|
||||
|
||||
serverCertificate = BaseSpiceTransport.serverCertificate
|
||||
fullScreen = BaseSpiceTransport.fullScreen
|
||||
|
||||
def initialize(self, values):
|
||||
if values is not None:
|
||||
@ -86,7 +87,7 @@ class TSPICETransport(BaseSpiceTransport):
|
||||
|
||||
sshHost, sshPort = self.tunnelServer.value.split(':')
|
||||
|
||||
r = RemoteViewerFile('127.0.0.1', '{port}', '{secure_port}', con['ticket']['value'], self.serverCertificate.value, con['cert_subject'], fullscreen=False)
|
||||
r = RemoteViewerFile('127.0.0.1', '{port}', '{secure_port}', con['ticket']['value'], self.serverCertificate.value, con['cert_subject'], fullscreen=self.fullScreen.isTrue())
|
||||
|
||||
m = tools.DictAsObj({
|
||||
'r': r,
|
||||
|
Loading…
Reference in New Issue
Block a user