Changeset 9666
- Timestamp:
- 04/21/14 16:27:41 (10 years ago)
- Location:
- trunk/webif
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/webif/cacheex/cacheex.html
r9665 r9666 1 ##TPLHEADER SHORT##1 ##TPLHEADER## 2 2 <script type="text/javascript"> 3 3 … … 10 10 11 11 </script> 12 ##TPLBODY## 12 13 13 ##TPLMENU## 14 14 ##TPLMESSAGE## -
trunk/webif/include/jscript.js
r9665 r9666 182 182 }); 183 183 184 // switch reader ON/OFF 185 $("a.switchreader").click(function(){ 186 var parameters_old = parameters; 187 parameters += '&label=' + $(this).data('reader-name') + '&action=' + $(this).data('next-action'); 188 var rowid = '#' + $(this).data('md5'); 189 var img = $(this).children("img"); 190 waitForMsg(); 191 if($(this).data('next-action') == 'enable'){ 192 $(this).data('next-action', 'disable').attr('title','Disable this reader'); 193 $(rowid).attr('class', 'enabledreader'); 194 img.attr('src', 'image?i=ICDIS').attr('alt','Disable this reader'); 195 } else { 196 $(this).data('next-action', 'enable').attr('title','Enable this reader'); 197 $(rowid).attr('class', 'disabledreader'); 198 img.attr('src', 'image?i=ICENA').attr('alt','Enable this reader'); 199 } 200 parameters = parameters_old; 201 }); 202 203 // delete reader 204 $("a.deletereader").click(function(){ 205 if (confirm("Delete Reader " + $(this).data('reader-name') + "?")) { 206 var parameters_old = parameters; 207 parameters += '&label=' + $(this).data('reader-name') + '&action=' + $(this).data('next-action'); 208 waitForMsg(); 209 parameters = parameters_old; 210 $('#' + $(this).data('md5')).fadeOut('slow'); 211 } 212 }); 213 214 // switch user ON/OFF 215 $("a.switchuser").click(function(){ 216 var parameters_old = parameters; 217 parameters += '&user=' + $(this).data('user-name') + '&action=' + $(this).data('next-action'); 218 var rowid = '#' + $(this).data('md5'); 219 var img = $(this).children("img"); 220 waitForMsg(); 221 if($(this).data('next-action') == 'enable'){ 222 $(this).data('next-action', 'disable').attr('title', 'Disable this user'); 223 $(rowid).attr('class', 'offline'); 224 $(rowid + ' > td.usercol2').text('offline'); 225 img.attr('src', 'image?i=ICDIS').attr('alt', 'Disable this user'); 226 } else { 227 $(this).data('next-action', 'enable').attr('title', 'Enable this user'); 228 $(rowid).attr('class', 'disabled'); 229 $(rowid + ' > td.usercol2').text('offline (disabled)'); 230 img.attr('src', 'image?i=ICENA').attr('alt', 'Enable this user'); 231 } 232 parameters = parameters_old; 233 }); 234 235 // reset user stats 236 $("a.resetuser").click(function(){ 237 if (confirm("Reset Stats for " + $(this).data('user-name') + "?")) { 238 var parameters_old = parameters; 239 parameters += '&user=' + $(this).data('user-name') + '&action=' + $(this).data('next-action'); 240 waitForMsg(); 241 parameters = parameters_old; 242 } 243 }); 244 245 // delete user 246 $("a.deleteuser").click(function(){ 247 if (confirm("Delete User " + $(this).data('user-name') + "?")) { 248 var parameters_old = parameters; 249 parameters += '&user=' + $(this).data('user-name') + '&action=' + $(this).data('next-action'); 250 waitForMsg(); 251 parameters = parameters_old; 252 $('#' + $(this).data('md5')).fadeOut('slow'); 253 } 254 }); 255 184 256 // search related events 185 257 $("#searchTerm").keyup(function () { … … 203 275 initDoc(); 204 276 }); 205 206 // set sortable table 207 /* Examples: 208 * <th data-sort="int">int</th> 209 * <th data-sort="int">int</th> 210 * <th data-sort="float" data-sort-default="desc">float</th> 211 * <th data-sort="moveBlanks" data-sort-desc="moveBlanksDesc">string</th> 212 */ 213 var table = $('#dataTable').stupidtable(); 277 278 var first_octet = function(str){ 279 if(str.indexOf('.')){ 280 return parseInt(str.substring(0,str.indexOf('.'))); 281 } else { 282 return 0; 283 } 284 } 285 286 var table = $('#dataTable').stupidtable({ 287 "ip":function(a,b){ 288 aIP = first_octet(a); 289 bIP = first_octet(b); 290 return aIP - bIP; 291 } 292 }); 214 293 215 294 table.bind('beforetablesort', function (event, data) { … … 225 304 }); 226 305 }); 306 227 307 /* 228 308 * Genaral: Update page footer … … 251 331 poll_excluded = ($( uid ).attr('nopoll') != undefined) ? $( uid ).attr('nopoll') : ''; 252 332 333 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").data('sort-value', 0);} 334 253 335 switch (item.user.classname) { 254 336 case 'online': … … 320 402 } 321 403 322 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( item.user.stats.cwlastresptime + 'ms') ;}404 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( item.user.stats.cwlastresptime + 'ms').data('sort-value', item.user.stats.cwlastresptime);} 323 405 //usercol8 ??? 324 406 if(!is_nopoll('usercol9')) {$( uid + " td.usercol9").text( item.user.stats.cwok );} … … 404 486 } 405 487 if(!is_nopoll('usercol3')) {$( uid + " td.usercol3").text( '' );} 406 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( '0' ) ;}488 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( '0' ).data('sort-value', 0);} 407 489 if(!is_nopoll('usercol4')) { 408 490 $( uid + " td.usercol4") … … 1109 1191 */ 1110 1192 var lockpoll = 0; 1193 var timer_ID; 1111 1194 function waitForMsg(){ 1112 1195 … … 1114 1197 /* assumed that previous poll is not finnished yet we not 1115 1198 call new data and just set the next intervall */ 1116 setTimeout("waitForMsg()", pollintervall); 1199 clearTimeout(timer_ID); 1200 timer_ID = setTimeout("waitForMsg()", pollintervall); 1117 1201 return; 1118 1202 } … … 1128 1212 updatePage(data); 1129 1213 if(!stoppoll) { 1130 setTimeout("waitForMsg()", pollintervall); 1214 clearTimeout(timer_ID); 1215 timer_ID = setTimeout("waitForMsg()", pollintervall); 1131 1216 } 1132 1217 }, 1133 1218 error: function(XMLHttpRequest, textStatus, errorThrown) { 1134 setTimeout("waitForMsg()", 15000); 1219 clearTimeout(timer_ID); 1220 timer_ID = setTimeout("waitForMsg()", 15000); 1135 1221 setPollerr(1); 1136 1222 } … … 1179 1265 switch(page){ 1180 1266 1267 case 'cacheex': 1268 //do nothing 1269 1270 break; 1271 1181 1272 case 'livelog': 1182 1273 -
trunk/webif/readers/readers_readerlist.html
r9665 r9666 1 1 <TR ID="##LABELMD5##" CLASS="##READERCLASS##"> 2 <TD CLASS="readercol0"><A HREF="readers.html?label=##READERNAMEENC##&action=##SWITCH##" TITLE="##SWITCHTITLE##"><IMG CLASS="icon" SRC="##SWITCHICO##" ALT="##SWITCHTITLE##"></A></TD>2 <TD CLASS="readercol0"><A class="switchreader" data-next-action="##SWITCH##" data-reader-name="##READERNAMEENC##" data-md5="##LABELMD5##" HREF="#" TITLE="##SWITCHTITLE##"><IMG CLASS="icon" SRC="##SWITCHICO##" ALT="##SWITCHTITLE##"></A></TD> 3 3 <TD CLASS="readercol1" data-sort-value="##READERNAME##" TITLE="##READERNAME####DESCRIPTION##">##READERBIT##</TD> 4 4 <TD CLASS="readercol2">##CTYP##</TD> … … 17 17 <TD CLASS="readercol15">##WRITEEMM##</TD> 18 18 <TD CLASS="readercol16"><A HREF="readerstats.html?label=##READERNAMEENC##&hide=4" TITLE="Show loadbalancer statistics"><IMG CLASS="icon" SRC="image?i=ICSTA" ALT="Loadbalancer statistics"></A></TD> 19 <TD CLASS="readercol17"><A HREF="readers.html?label=##READERNAMEENC##&action=delete" TITLE="Delete this Reader"><IMG CLASS="icon" SRC="image?i=ICDEL" ALT="Delete Reader" onclick="return confirm('Delete ##READERNAMEENC## ?')"></A></TD>19 <TD CLASS="readercol17"><A class="deletereader" data-next-action="delete" data-reader-name="##READERNAMEENC##" data-md5="##LABELMD5##" HREF="#" TITLE="Delete this Reader"><IMG CLASS="icon" SRC="image?i=ICDEL" ALT="Delete Reader"></A></TD> 20 20 </TR> -
trunk/webif/userconfig/userconfig.html
r9665 r9666 76 76 <TH data-sort="string-ins" data-sort-default ="asc" class="sortable">User</TH> 77 77 <TH data-sort="string-ins" data-sort-default ="asc" class="sortable">Status<BR>Address</TH> 78 <TH data-sort=" string-ins" data-sort-default ="asc" class="sortable">Protocol</TH>78 <TH data-sort="ip" data-sort-default ="asc" class="sortable">Protocol</TH> 79 79 <TH CLASS="##GRPVIEW##">Groups</TH> 80 80 <TH CLASS="nosort">Idle Time<BR>On Channel</TH> -
trunk/webif/userconfig/userconfig_entry.html
r9665 r9666 1 1 <TR CLASS="##CLASSNAME##" id="##USERMD5##" nopoll=""> 2 <TD CLASS="usercol0"><A HREF="userconfig.html?user=##USERNAMEENC##&action=##SWITCH##" TITLE="##SWITCHTITLE##"><IMG CLASS="icon" SRC="##SWITCHICO##" ALT="##SWITCHTITLE##"></A></TD>2 <TD CLASS="usercol0"><A class="switchuser" data-next-action="##SWITCH##" data-user-name="##USERNAMEENC##" data-md5="##USERMD5##" HREF="#" TITLE="##SWITCHTITLE##"><IMG CLASS="icon" SRC="##SWITCHICO##" ALT="##SWITCHTITLE##"></A></TD> 3 3 <TD CLASS="usercol1" data-sort-value="##USERNAME##" TITLE="##USERNAME####DESCRIPTION##">##USERBIT####CLIENTCOUNTNOTIFIER##</TD> 4 <TD CLASS="usercol2" TITLE="SLEEP: ##CLIENTTIMETOSLEEP##">##STATUS##<BR>##CLIENTIP##</TD>4 <TD CLASS="usercol2" data-sort-value="##CLIENTIP##" TITLE="SLEEP: ##CLIENTTIMETOSLEEP##">##STATUS##<BR>##CLIENTIP##</TD> 5 5 <TD CLASS="usercol4" TITLE="##CLIENTPROTOTITLE##">##CLIENTPROTO##</TD> 6 6 <TD CLASS="usercol5 ##GRPVIEW##"><DIV CLASS="groups" TITLE="##GROUPS##">##GROUPS##</DIV></TD> 7 7 <TD CLASS="usercol3">##IDLESECS##<BR>##CLIENTTIMEONCHANNEL##</TD> 8 8 <TD CLASS="usercol6" TITLE="##LASTCHANNELTITLE##">##LASTCHANNEL##</TD> 9 <TD CLASS="usercol7" >##CWLASTRESPONSET##</TD>9 <TD CLASS="usercol7" data-sort-value="##CWLASTRESPONSET##">##CWLASTRESPONSET##</TD> 10 10 <TD CLASS="usercol9">##CWOK##</TD> 11 11 <TD CLASS="usercol10">##CWNOK##</TD> … … 21 21 <TD CLASS="usercol20 ##EXPIREVIEW##">##EXPDATE##</TD> 22 22 <TD CLASS="usercol23"><A HREF="user_edit.html?user=##USERNAMEENC##" TITLE="Edit this user"><IMG CLASS="icon" SRC="image?i=ICEDI" ALT="Edit User"></A></TD> 23 <TD CLASS="usercol24"><A HREF="userconfig.html?user=##USERNAMEENC##&action=resetstats" TITLE="Reset statistics for this user"><IMG CLASS="icon" SRC="image?i=ICRES" ALT="Reset Stats"></A></TD>24 <TD CLASS="usercol25"><A HREF="userconfig.html?user=##USERNAMEENC##&action=delete" TITLE="Delete this user"><IMG CLASS="icon" SRC="image?i=ICDEL" ALT="Delete User" onclick="return confirm('Delete ##USERNAMEENC## ?')"></A></TD>23 <TD CLASS="usercol24"><A class="resetuser" data-next-action="resetstats" data-user-name="##USERNAMEENC##" HREF="#" TITLE="Reset statistics for this user"><IMG CLASS="icon" SRC="image?i=ICRES" ALT="Reset Stats"></A></TD> 24 <TD CLASS="usercol25"><A class="deleteuser" data-next-action="delete" data-user-name="##USERNAMEENC##" data-md5="##USERMD5##" HREF="#" TITLE="Delete this user"><IMG CLASS="icon" SRC="image?i=ICDEL" ALT="Delete User"></A></TD> 25 25 </TR>
Note:
See TracChangeset
for help on using the changeset viewer.