diff --git a/client/src/UDSClient.py b/client/src/UDSClient.py index 5a48023bd..cce3b2af8 100644 --- a/client/src/UDSClient.py +++ b/client/src/UDSClient.py @@ -51,6 +51,7 @@ if __name__ == "__main__": except Exception: QtGui.QMessageBox.critical(None, 'Notice', 'This program is designed to be used by UDS', QtGui.QMessageBox.Ok) + sys.exit(1) QtGui.QMessageBox.critical(None, 'Notice', '{} {} {} {} {}'.format(host, ticket, scrambler, trans, ssl), QtGui.QMessageBox.Ok) diff --git a/server/src/uds/models/Image.py b/server/src/uds/models/Image.py index 32e344b84..ba3095245 100644 --- a/server/src/uds/models/Image.py +++ b/server/src/uds/models/Image.py @@ -187,9 +187,6 @@ class Image(UUIDModel): :note: If destroy raises an exception, the deletion is not taken. ''' toDelete = kwargs['instance'] - toDelete.deployedServices.update(image=None) - - # Todelete is a group logger.debug('Deleted image {0}'.format(toDelete)) diff --git a/server/src/uds/models/ServicesPool.py b/server/src/uds/models/ServicesPool.py index 275a0b7bb..2945989bc 100644 --- a/server/src/uds/models/ServicesPool.py +++ b/server/src/uds/models/ServicesPool.py @@ -75,7 +75,7 @@ class DeployedService(UUIDModel): state = models.CharField(max_length=1, default=State.ACTIVE, db_index=True) state_date = models.DateTimeField(default=NEVER) show_transports = models.BooleanField(default=True) - image = models.ForeignKey(Image, null=True, blank=True, related_name='deployedServices') + image = models.ForeignKey(Image, null=True, blank=True, related_name='deployedServices', on_delete=models.SET_NULL) initial_srvs = models.PositiveIntegerField(default=0) cache_l1_srvs = models.PositiveIntegerField(default=0) cache_l2_srvs = models.PositiveIntegerField(default=0) diff --git a/server/src/uds/static/js/uds-client.coffee b/server/src/uds/static/js/uds-client.coffee index 35db6fa22..127754a95 100644 --- a/server/src/uds/static/js/uds-client.coffee +++ b/server/src/uds/static/js/uds-client.coffee @@ -163,11 +163,11 @@ uds.launch = (el) -> alt = el.attr('data-href-alt') if uds.firefox - launchMozilla this, url, alt + launchMozilla el, url, alt else if uds.chrome - launchChrome this, url, alt + launchChrome el, url, alt else if uds.safari - launchSafari this, url, alt + launchSafari el, url, alt else if uds.ie launchIE this, url, alt diff --git a/server/src/uds/templates/uds/html5/index.html b/server/src/uds/templates/uds/html5/index.html index f69d40258..b7b23baf8 100644 --- a/server/src/uds/templates/uds/html5/index.html +++ b/server/src/uds/templates/uds/html5/index.html @@ -15,7 +15,8 @@ {% elif ser.in_use %} data-content="{%trans "Currently in use" %}" {% endif %} - data-href="{{ trans.link }}"> + data-href="{{ trans.link }}" + data-href-alt="{% url 'uds.web.views.client_downloads' %}">