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

Web part of new uds plugin almost done

This commit is contained in:
Adolfo Gómez García 2015-03-24 12:05:40 +01:00
commit d87f4de4ff
5 changed files with 7 additions and 8 deletions

View File

@ -51,6 +51,7 @@ if __name__ == "__main__":
except Exception: except Exception:
QtGui.QMessageBox.critical(None, 'Notice', 'This program is designed to be used by UDS', QtGui.QMessageBox.Ok) 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) QtGui.QMessageBox.critical(None, 'Notice', '{} {} {} {} {}'.format(host, ticket, scrambler, trans, ssl), QtGui.QMessageBox.Ok)

View File

@ -187,9 +187,6 @@ class Image(UUIDModel):
:note: If destroy raises an exception, the deletion is not taken. :note: If destroy raises an exception, the deletion is not taken.
''' '''
toDelete = kwargs['instance'] toDelete = kwargs['instance']
toDelete.deployedServices.update(image=None)
# Todelete is a group
logger.debug('Deleted image {0}'.format(toDelete)) logger.debug('Deleted image {0}'.format(toDelete))

View File

@ -75,7 +75,7 @@ class DeployedService(UUIDModel):
state = models.CharField(max_length=1, default=State.ACTIVE, db_index=True) state = models.CharField(max_length=1, default=State.ACTIVE, db_index=True)
state_date = models.DateTimeField(default=NEVER) state_date = models.DateTimeField(default=NEVER)
show_transports = models.BooleanField(default=True) 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) initial_srvs = models.PositiveIntegerField(default=0)
cache_l1_srvs = models.PositiveIntegerField(default=0) cache_l1_srvs = models.PositiveIntegerField(default=0)
cache_l2_srvs = models.PositiveIntegerField(default=0) cache_l2_srvs = models.PositiveIntegerField(default=0)

View File

@ -163,11 +163,11 @@ uds.launch = (el) ->
alt = el.attr('data-href-alt') alt = el.attr('data-href-alt')
if uds.firefox if uds.firefox
launchMozilla this, url, alt launchMozilla el, url, alt
else if uds.chrome else if uds.chrome
launchChrome this, url, alt launchChrome el, url, alt
else if uds.safari else if uds.safari
launchSafari this, url, alt launchSafari el, url, alt
else if uds.ie else if uds.ie
launchIE this, url, alt launchIE this, url, alt

View File

@ -15,7 +15,8 @@
{% elif ser.in_use %} {% elif ser.in_use %}
data-content="{%trans "Currently in use" %}" data-content="{%trans "Currently in use" %}"
{% endif %} {% endif %}
data-href="{{ trans.link }}"> data-href="{{ trans.link }}"
data-href-alt="{% url 'uds.web.views.client_downloads' %}">
<div class="service-image"> <div class="service-image">
<img src="{% url "uds.web.views.serviceImage" idImage=ser.imageId %}" /> <img src="{% url "uds.web.views.serviceImage" idImage=ser.imageId %}" />
</div> </div>