1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Fixing up things

This commit is contained in:
Adolfo Gómez García 2016-04-26 15:13:54 +02:00
parent 4fb863cfa7
commit 50bc3cd3ef
4 changed files with 14 additions and 10 deletions

View File

@ -39,7 +39,7 @@ import logging
logger = logging.getLogger(__name__)
__updated__ = '2016-03-09'
__updated__ = '2016-04-25'
class ServiceProvider(Module):
@ -178,14 +178,16 @@ class ServiceProvider(Module):
if val is None:
val = self.maxPreparingServices = GlobalConfig.MAX_PREPARING_SERVICES.getInt(force=True) # Recover global an cache till restart
return int(getattr(val, 'value', val))
retVal = int(getattr(val, 'value', val))
return retVal if retVal > 0 else 1
def getMaxRemovingServices(self):
val = self.maxRemovingServices
if val is None:
val = self.maxRemovingServices = GlobalConfig.MAX_REMOVING_SERVICES.getInt(force=True) # Recover global an cache till restart
return int(getattr(val, 'value', val))
retVal = int(getattr(val, 'value', val))
return retVal if retVal > 0 else 1
def getIgnoreLimits(self):
val = self.ignoreLimits

View File

@ -55,7 +55,7 @@ from uds.models.Util import getSqlDatetime
import logging
__updated__ = '2016-02-26'
__updated__ = '2016-04-26'
logger = logging.getLogger(__name__)
@ -310,6 +310,7 @@ class UserService(UUIDModel):
save: Defaults to true. If false, record will not be saved to db, just modified
'''
if state != self.state:
self.state_date = getSqlDatetime()
self.state = state
@ -323,6 +324,7 @@ class UserService(UUIDModel):
save: Defaults to true. If false, record will not be saved to db, just modified
'''
if state != self.os_state:
self.state_date = getSqlDatetime()
self.os_state = state

View File

@ -350,7 +350,7 @@ gui.servicesPools.link = (event) ->
onData: (data) ->
$.each data, (undefined_, value) ->
value.group_name = gui.fastLink(value.auth_name, "#{value.auth_id},g#{value.id}", 'gui.servicesPools.fastLink', 'goAuthLink')
value.group_name = gui.fastLink("#{value.auth_name}\\#{value.name}", "#{value.auth_id},g#{value.id}", 'gui.servicesPools.fastLink', 'goAuthLink')
return
return

View File

@ -62,7 +62,7 @@
required: f.gui.required
tooltip: f.gui.tooltip
type: f.gui.type
name: f.name
name: f.name + (if editing is "readonly" then '__' else '')
css: "modal_field_data"
)