File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ <h1 class="page-header page-title">
1919 </ form >
2020 < ul class ="nav nav-tabs ">
2121 < li class ="active "> < a href ="#active " data-toggle ="tab "> Active</ a > </ li >
22- < li > < a href ="#history " data-toggle ="tab "> History</ a > </ li >
23- < li > < a href ="#warnings " data-toggle ="tab "> Warnings</ a > </ li >
22+ < li > < a href ="#history " data-toggle ="tab " id =" tab-history " > History</ a > </ li >
23+ < li > < a href ="#warnings " data-toggle ="tab " id =" tab-warnings " > Warnings</ a > </ li >
2424 < li > < a href ="#sabnzbd-stats " data-toggle ="tab "> Stats</ a > </ li >
2525 </ ul >
2626 < div class ="tab-content ">
Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ $(document).ready(function () {
4343 } , 5000 ) ;
4444 loadHistory ( ) ;
4545 loadWarnings ( ) ;
46+
47+ // reload tab content on tab click
48+ $ ( '#tab-history' ) . click ( function ( ) {
49+ loadHistory ( ) ;
50+ } )
51+ $ ( '#tab-warnings' ) . click ( function ( ) {
52+ loadWarnings ( ) ;
53+ } )
4654} ) ;
4755
4856function removeHistoryItem ( id ) {
@@ -75,10 +83,11 @@ function retryHistoryItem(id) {
7583
7684function loadHistory ( ) {
7785 $ . ajax ( {
78- url : WEBDIR + 'sabnzbd/GetHistory?limit=20 ' ,
86+ url : WEBDIR + 'sabnzbd/GetHistory?limit=30 ' ,
7987 type : 'get' ,
8088 dataType : 'json' ,
8189 success : function ( data ) {
90+ $ ( '#history_table_body' ) . empty ( ) ;
8291 if ( data . status == false ) {
8392 $ ( '#notification_area' ) . addClass ( 'alert alert-error' ) ;
8493 $ ( '#notification_area' ) . html ( '<strong>Error</strong> Could not connect to SABnzbd, go to <a href="' + WEBDIR + 'settings">settings</a>' ) ;
@@ -272,6 +281,7 @@ function loadWarnings() {
272281 type : 'get' ,
273282 dataType : 'json' ,
274283 success : function ( data ) {
284+ $ ( '#warning_table_body' ) . empty ( ) ;
275285 if ( data . warnings == 0 ) {
276286 var row = $ ( '<tr>' )
277287 row . append ( $ ( '<td>' ) . html ( 'No warnings' ) ) ;
You can’t perform that action at this time.
0 commit comments