small fixes & added open link on new window instead of current

This commit is contained in:
Adolfo Gómez García 2018-06-11 13:33:50 +02:00
parent ff226dd8e5
commit f211f3482f
3 changed files with 13 additions and 4 deletions

View File

@ -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()

View File

@ -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))

View File

@ -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;