1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 04:24:23 +00:00

- Add notification in WebUI when qBittorrent is unreachable

This commit is contained in:
Christophe Dumez 2008-12-25 16:20:30 +00:00
parent af29228cc9
commit 112bcd7255
3 changed files with 14 additions and 3 deletions

View File

@ -44,6 +44,11 @@ h2 {
border-bottom: 1px solid #bbb;
}
#error_div {
color: #f00;
font-weight: bold;
}
h4 {
font-size: 11px;
}

View File

@ -64,7 +64,7 @@
<a id="pauseAllButton"><img class="mochaToolButton" title="Pause All" src="images/skin/pause_all.png"/></a>
</div>
</div>
<div id="pageWrapper">
<div id="pageWrapper"> <span id="error_div"></span>
<div id="myTabs" class="toolbarTabs">
<ul class="mootabs_title">
<li title="Tab1"><a>Downloads</a></li>

View File

@ -78,7 +78,13 @@ window.addEvent('domready', function(){
var request = new Request.JSON({
url: url,
method: 'get',
onComplete: function(events) {
onFailure: function() {
$('error_div').set('html', 'qBittorrent client is not reachable');
waiting=false;
ajaxfn.delay(2000);
},
onSuccess: function(events) {
$('error_div').set('html', '');
if(events){
// Add new torrents or update them
unfinished_hashes = myTable.getRowIds();
@ -145,7 +151,7 @@ window.addEvent('domready', function(){
});
}
waiting=false;
ajaxfn.delay(1000);
ajaxfn.delay(2000);
}
}).send();
}