diff options
Diffstat (limited to 'views/menu.tpl')
-rw-r--r-- | views/menu.tpl | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/views/menu.tpl b/views/menu.tpl index 9c98a29e8..af62aa4a1 100644 --- a/views/menu.tpl +++ b/views/menu.tpl @@ -117,11 +117,11 @@ % c.close() % if restart_required[1] == '1' and restart_required[0] == '1': - <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply last update and changes to general settings.</div></div></div> + <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply last update and changes to general settings. Click <a href=# id="restart_link">here</a> to restart.</div></div></div> % elif restart_required[1] == '1': - <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply last update.</div></div></div> + <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply last update. Click <a href=# id="restart_link">here</a> to restart.</div></div></div> % elif restart_required[0] == '1': - <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply changes to general settings.</div></div></div> + <div class='ui center aligned grid'><div class='fifteen wide column'><div class="ui red message">Bazarr need to be restarted to apply changes to general settings. Click <a href=# id="restart_link">here</a> to restart.</div></div></div> % end </div> </body> @@ -167,4 +167,24 @@ $('.menu').css('background', '#272727'); $('#divmenu').css('background', '#272727'); } + + $('#restart_link').click(function(){ + $('#loader_text').text("Bazarr is restarting, please wait..."); + $.ajax({ + url: "{{base_url}}restart", + async: true + }) + .done(function(){ + setTimeout(function(){ setInterval(ping, 2000); },8000); + }); + }) + + function ping() { + $.ajax({ + url: '{{base_url}}', + success: function(result) { + window.location.reload(); + } + }); + } </script>
\ No newline at end of file |