File: diskload_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 (28 lines) | stat: -rw-r--r-- 969 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
28
function renderPlugin_diskload(data) {

    var directives = {
        Load: {
            html: function () {
                return '<div class="progress"><div class="progress-bar progress-bar-info" style="width:' + this.Load + '%;"></div>' +
                        '</div><div class="percent">' + this.Load + '%</div>';
            }
        }
    };

    if (data.Plugins.Plugin_DiskLoad !== undefined) {
        var disks = items(data.Plugins.Plugin_DiskLoad.Disk);
        if (disks.length > 0) {
            var do_disks = [];
            do_disks.push_attrs(disks);
            $('#diskload-data').render(do_disks, directives);
            //$('#diskload_Name').removeClass("sorttable_sorted"); // reset sort order
            //sorttable.innerSortFunction.apply($('#diskload_Name')[0], []);

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