diff --git a/server/src/uds/core/services/BaseServiceProvider.py b/server/src/uds/core/services/BaseServiceProvider.py index ff758ff0..f1cc2459 100644 --- a/server/src/uds/core/services/BaseServiceProvider.py +++ b/server/src/uds/core/services/BaseServiceProvider.py @@ -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 diff --git a/server/src/uds/models/UserService.py b/server/src/uds/models/UserService.py index 0974d54b..5fc71177 100644 --- a/server/src/uds/models/UserService.py +++ b/server/src/uds/models/UserService.py @@ -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,8 +310,9 @@ class UserService(UUIDModel): save: Defaults to true. If false, record will not be saved to db, just modified ''' - self.state_date = getSqlDatetime() - self.state = state + if state != self.state: + self.state_date = getSqlDatetime() + self.state = state def setOsState(self, state): ''' @@ -323,8 +324,9 @@ class UserService(UUIDModel): save: Defaults to true. If false, record will not be saved to db, just modified ''' - self.state_date = getSqlDatetime() - self.os_state = state + if state != self.os_state: + self.state_date = getSqlDatetime() + self.os_state = state def assignToUser(self, user): ''' diff --git a/server/src/uds/static/adm/js/gui-d-servicespools.coffee b/server/src/uds/static/adm/js/gui-d-servicespools.coffee index 480e7cf8..abbca139 100644 --- a/server/src/uds/static/adm/js/gui-d-servicespools.coffee +++ b/server/src/uds/static/adm/js/gui-d-servicespools.coffee @@ -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 diff --git a/server/src/uds/static/adm/js/gui-form.coffee b/server/src/uds/static/adm/js/gui-form.coffee index 3a202f61..5b443998 100644 --- a/server/src/uds/static/adm/js/gui-form.coffee +++ b/server/src/uds/static/adm/js/gui-form.coffee @@ -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" )