Add support for restarting tempmon client

This commit is contained in:
Lance Edgar 2016-11-22 00:55:30 -06:00
parent a39c347ad3
commit 0296c29dd7
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,22 @@
## -*- coding: utf-8 -*-
<%inherit file="/master/view.mako" />
<%def name="head_tags()">
${parent.head_tags()}
<script type="text/javascript">
$(function() {
$('#restart-client').click(function() {
$(this).button('disable').button('option', 'label', "Restarting, please wait...");
location.href = '${url('tempmon.clients.restart', uuid=instance.uuid)}';
});
});
</script>
</%def>
${parent.body()}
% if instance.enabled and request.has_perm('tempmon.clients.restart'):
<div class="buttons">
<button type="button" id="restart-client">Restart this Client</button>
</div>
% endif