File: pingtest_bootstrap.js

package info (click to toggle)
phpsysinfo 3.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,900 kB
  • sloc: javascript: 22,511; php: 20,651; xml: 18,293; sh: 196; python: 58; makefile: 12
file content (27 lines) | stat: -rw-r--r-- 899 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function renderPlugin_pingtest(data) {

    var directives = {
        PingTime: {
            html: function () {
                return ((this.PingTime === "lost") ? genlang(4, 'pingtest') : this.PingTime + String.fromCharCode(160) + "ms");
            }
        }
    };

    if (data.Plugins.Plugin_PingTest !== undefined) {
        var psitems = items(data.Plugins.Plugin_PingTest.Ping);
        if (psitems.length > 0) {
            var pt_memory = [];
            pt_memory.push_attrs(psitems);
            $('#pingtest-data').render(pt_memory, directives);
            $('#pingtest_Address').removeClass("sorttable_sorted"); // reset sort order
            sorttable.innerSortFunction.apply($('#pingtest_Address')[0], []);

            $('#block_pingtest').show();
        } else {
            $('#block_pingtest').hide();
        }
    } else {
        $('#block_pingtest').hide();
    }
}