|
67 | 67 |
|
68 | 68 | return 'white'; |
69 | 69 | } |
| 70 | + |
| 71 | + |
70 | 72 | function numberWithCommas(x) { |
71 | 73 | return x.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g, ","); |
72 | 74 | } |
|
299 | 301 | return srvhist[srv['name']]; |
300 | 302 | } |
301 | 303 |
|
302 | | - function getSlice(payload, srv) { |
303 | | - var name = srv['pool_index']; |
304 | | - if (payload['sliceinfo'] == undefined && srv['slice'] == undefined) |
305 | | - return "-" |
306 | | - if (payload['sliceinfo'] != undefined && payload['sliceinfo'][name] >= 0) |
307 | | - return parseFloat(payload['sliceinfo'][name]).toFixed(0) |
308 | | - else if (srv['slice'] >= 0) |
309 | | - return parseFloat(srv['slice']).toFixed(0) |
310 | | - else |
311 | | - return "-" |
312 | | - } |
313 | | - |
314 | | - function getWait(payload, srv) { |
315 | | - if (payload['wait'] == undefined && srv['wait'] == undefined) |
316 | | - return "-" |
317 | | - var wait = 0.0 |
318 | | - if (srv['wait'] && srv['wait'] > 0) { |
319 | | - wait = parseFloat(srv['wait']); |
320 | | - } |
321 | | - var wait_html = "<a href='#' onFocus='this.blur();' onClick=\"setWait('" |
322 | | - wait_html = wait_html + srvName + "', " + wait + ");\" style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" |
323 | | - wait_html = wait_html + wait.toFixed(2) + "</a>"; |
324 | | - return wait_html; |
325 | | - } |
326 | | - |
327 | | - function getPenalty(payload, srv) { |
328 | | - var penalty = 1.00 |
329 | | - if (srv['penalty'] && srv['penalty'] > 0) { |
330 | | - penalty = parseFloat(srv['penalty']); |
331 | | - } |
332 | | - var penalty_html = "<a href='#' onFocus='this.blur();' onClick=\"setPenalty('" |
333 | | - penalty_html = penalty_html + srvName + "', " + penalty + ");\" style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" |
334 | | - penalty_html = penalty_html + penalty.toFixed(2) + "</a>"; |
335 | | - return penalty_html; |
336 | | - } |
337 | | - |
338 | | - function getLPPenalty(payload, srv) { |
339 | | - var penalty = 0.00 |
340 | | - if (srv['lp_penalty']) { |
341 | | - penalty = parseFloat(srv['lp_penalty']); |
342 | | - } |
343 | | - var penalty_html = "<a href='#' onFocus='this.blur();' onClick=\"setLPPenalty('" |
344 | | - penalty_html = penalty_html + srvName + "', " + penalty + ");\" style='text-decoration:underline;color:" + getColor(payload,srv) + ";'>" |
345 | | - penalty_html = penalty_html + penalty.toFixed(2) + "</a>"; |
346 | | - return penalty_html; |
347 | | - } |
348 | | - |
349 | 304 | function getPoolSpeed(payload, srv) { |
350 | 305 | if (srv['ghash'] > 0) { |
351 | 306 | if (srv["isSpeedEstimated"] == true) { |
|
480 | 435 | if( !showInfoPools && row_role == "info" ){ |
481 | 436 | continue; //Skip info pools |
482 | 437 | } |
| 438 | + |
| 439 | + var htmlRepresentationOfShares = columns['Shares']['data'](payload, row, r); |
| 440 | + var intRepresentationOfShares = htmlRepresentationOfShares.replace(/[^0-9]/g, ''); |
| 441 | + if(intRepresentationOfShares == 0 || intRepresentationOfShares > 50000000) { |
| 442 | + continue; |
| 443 | + } |
483 | 444 | } |
484 | 445 |
|
485 | 446 | html += "<tr id=\"row_" + i + "\">"; |
|
574 | 535 | 'Round<br>Time': { 'data':getRoundDuration, 'align':'center'}, |
575 | 536 | 'Payout': { 'data':getPayout, 'color':getColor, 'align':'right' }, |
576 | 537 | 'Eff.': { 'data':getEfficiency, 'color':getColor, 'align':'center' }, |
577 | | - 'ThrPnlty': { 'data':getPenalty, 'color':getColor, 'align':'center' }, |
578 | | - 'LP-Pnlty': { 'data':getLPPenalty, 'color':getColor, 'align':'center' }, |
579 | | - 'Wait': { 'data':getWait, 'color':getColor, 'align':'center' }, |
580 | | - 'Slice': { 'data':getSlice, 'color':getColor, 'align':'center', 'display':'' }, |
581 | 538 | 'Round Shares': { 'data':getRoundShares, 'type':'linechart', 'width':'100%' }, |
582 | 539 | 'Role String': { 'data':getRoleString, 'display':'none' } |
583 | 540 | }, |
|
596 | 553 | ); |
597 | 554 |
|
598 | 555 | users = data["user"]; |
599 | | - |
600 | | - buildTable("#users", users, users, |
| 556 | + |
| 557 | + //buildTable has been commented out because none of the getUserX calls are working and I don't know what is supposed to be happening. Functionality may one day be readded |
| 558 | + /*buildTable("#users", users, users, |
601 | 559 | { |
602 | 560 | "User": { 'data':getUserName } , |
603 | 561 | "Last Seen": { 'data':getUserTime, 'align':'left' }, |
|
610 | 568 | function(c,d){ |
611 | 569 | return c > d; |
612 | 570 | },"" |
613 | | - ); |
| 571 | + );*/ |
614 | 572 |
|
615 | 573 | }); |
616 | 574 | } |
|
0 commit comments