mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-10 01:17:59 +03:00
Merge remote-tracking branch 'origin/v2.2'
This commit is contained in:
commit
757151c71a
@ -86,6 +86,9 @@ class LogManager(object):
|
||||
from uds.models import getSqlDatetime
|
||||
from uds.models import Log
|
||||
|
||||
# Ensure message fits on space
|
||||
message = message[:255]
|
||||
|
||||
qs = Log.objects.filter(owner_id=owner_id, owner_type=owner_type)
|
||||
# First, ensure we do not have more than requested logs, and we can put one more log item
|
||||
if qs.count() >= GlobalConfig.MAX_LOGS_PER_ELEMENT.getInt():
|
||||
|
@ -36,7 +36,7 @@ from uds.core import Environmentable
|
||||
from uds.core import Serializable
|
||||
from uds.core.util.State import State
|
||||
|
||||
__updated__ = '2018-06-07'
|
||||
__updated__ = '2018-06-11'
|
||||
|
||||
|
||||
class UserDeployment(Environmentable, Serializable):
|
||||
@ -139,6 +139,9 @@ class UserDeployment(Environmentable, Serializable):
|
||||
self._osmanager = kwargs.get('osmanager', None)
|
||||
self._dbService = kwargs.get('dbservice', None)
|
||||
self._uuid = kwargs.get('uuid', '')
|
||||
# If it has dbService
|
||||
if self._dbService:
|
||||
self._uuid = self._dbService.uuid
|
||||
|
||||
self.initialize()
|
||||
|
||||
|
@ -132,7 +132,7 @@ class DeployedServiceRemover(Job):
|
||||
# First check if there is someone in "removable" estate
|
||||
rems = DeployedService.objects.filter(state=State.REMOVABLE)[:10]
|
||||
if len(rems) > 0:
|
||||
logger.debug('Found a deployed service marked for removal. Starting removal of {0}'.format(rems))
|
||||
# logger.debug('Found a deployed service marked for removal. Starting removal of {0}'.format(rems))
|
||||
for ds in rems:
|
||||
try:
|
||||
# Skips checking deployed services in maintenance mode
|
||||
@ -147,7 +147,7 @@ class DeployedServiceRemover(Job):
|
||||
|
||||
rems = DeployedService.objects.filter(state=State.REMOVING)[:10]
|
||||
if len(rems) > 0:
|
||||
logger.debug('Found a deployed service in removing state, continuing removal of {0}'.format(rems))
|
||||
# logger.debug('Found a deployed service in removing state, continuing removal of {0}'.format(rems))
|
||||
for ds in rems:
|
||||
try:
|
||||
# Skips checking deployed services in maintenance mode
|
||||
|
@ -234,7 +234,6 @@ class ServiceCacheUpdater(Job):
|
||||
logger.debug('Starting cache checking')
|
||||
# We need to get
|
||||
servicesThatNeedsUpdate = self.servicesPoolsNeedingCacheUpdate()
|
||||
logger.debug('**** Services That Needs Update: {}'.format(servicesThatNeedsUpdate))
|
||||
for sp, cacheL1, cacheL2, assigned in servicesThatNeedsUpdate:
|
||||
# We have cache to update??
|
||||
logger.debug("Updating cache for {0}".format(sp))
|
||||
|
@ -39,8 +39,7 @@ from uds.models.UUIDModel import UUIDModel
|
||||
|
||||
import logging
|
||||
|
||||
__updated__ = '2016-03-09'
|
||||
|
||||
__updated__ = '2018-06-12'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -97,7 +96,7 @@ class ManagedObjectModel(UUIDModel):
|
||||
Can be overriden
|
||||
"""
|
||||
if self._cachedInstance is not None and values is None:
|
||||
logger.debug('Got cached instance instead of deserializing a new one for {}'.format(self.name))
|
||||
# logger.debug('Got cached instance instead of deserializing a new one for {}'.format(self.name))
|
||||
return self._cachedInstance
|
||||
|
||||
klass = self.getType()
|
||||
|
@ -50,9 +50,7 @@ from uds.models.Provider import Provider
|
||||
import logging
|
||||
import six
|
||||
|
||||
|
||||
__updated__ = '2017-05-10'
|
||||
|
||||
__updated__ = '2018-06-12'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -111,7 +109,7 @@ class Service(ManagedObjectModel, TaggingMixin):
|
||||
Raises:
|
||||
"""
|
||||
if self._cachedInstance is not None and values is None:
|
||||
logger.debug('Got cached instance instead of deserializing a new one for {}'.format(self.name))
|
||||
# logger.debug('Got cached instance instead of deserializing a new one for {}'.format(self.name))
|
||||
return self._cachedInstance
|
||||
|
||||
prov = self.provider.getInstance()
|
||||
|
@ -297,6 +297,7 @@
|
||||
{% block js %}
|
||||
{% pageReloadTime as reloadTime %}
|
||||
<script>
|
||||
var openedWindow = null;
|
||||
function getUrlVars() {
|
||||
var vars = [], hash;
|
||||
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
||||
@ -318,7 +319,10 @@
|
||||
if ( url.substring(0, 7) == 'udsa://' ) {
|
||||
uds.launch($el);
|
||||
} else {
|
||||
window.location = url;
|
||||
if( openedWindow != null) {
|
||||
openedWindow.close();
|
||||
}
|
||||
openedWindow = window.open(url, 'uds_rds_mm');
|
||||
}
|
||||
}
|
||||
|
||||
@ -361,7 +365,10 @@
|
||||
if ( url.substring(0, 7) == 'udsa://' ) {
|
||||
uds.launch(el);
|
||||
} else {
|
||||
window.location = url;
|
||||
if( openedWindow != null) {
|
||||
openedWindow.close();
|
||||
}
|
||||
openedWindow = window.open(url, 'uds_rds_mm');
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user