Add button for restarting filemon
although this button shows up only on the datasync page, for now..
This commit is contained in:
parent
fc8391c6d1
commit
2131ea65cb
4 changed files with 89 additions and 23 deletions
|
@ -1,27 +1,23 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
<%inherit file="/master/index.mako" />
|
||||
|
||||
<%def name="extra_javascript()">
|
||||
${parent.extra_javascript()}
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
$('form[name="restart-datasync"]').submit(function() {
|
||||
$(this).find('button')
|
||||
.button('option', 'label', "Restarting DataSync...")
|
||||
.button('disable');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="grid_tools()">
|
||||
${parent.grid_tools()}
|
||||
${h.form(url('datasync.restart'), name='restart-datasync')}
|
||||
${h.csrf_token(request)}
|
||||
<button type="submit">Restart DataSync</button>
|
||||
${h.end_form()}
|
||||
|
||||
% if request.has_perm('datasync.restart'):
|
||||
${h.form(url('datasync.restart'), name='restart-datasync', class_='autodisable')}
|
||||
${h.csrf_token(request)}
|
||||
${h.submit('submit', "Restart DataSync", data_working_label="Restarting DataSync")}
|
||||
${h.end_form()}
|
||||
% endif
|
||||
|
||||
% if request.has_perm('filemon.restart'):
|
||||
${h.form(url('filemon.restart'), name='restart-filemon', class_='autodisable')}
|
||||
${h.csrf_token(request)}
|
||||
${h.submit('submit', "Restart FileMon", data_working_label="Restarting FileMon")}
|
||||
${h.end_form()}
|
||||
% endif
|
||||
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue