File: hyperv_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 (32 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (2)
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
29
30
31
32
function renderPlugin_hyperv(data) {

    var directives = {
        State1: {
            text: function () {
                return (this.State === "2") ? "ON" : "";
            }
        },
        State0: {
            text: function () {
                return (this.State === "2") ? "" : "OFF";
            }
        }
    };

    if (data.Plugins.Plugin_HyperV !== undefined) {
        var hvitems = items(data.Plugins.Plugin_HyperV.Machine);
        if (hvitems.length > 0) {
            var hv_memory = [];
            hv_memory.push_attrs(hvitems);
            $('#hyperv-data').render(hv_memory, directives);
            $('#hyperv_Name').removeClass("sorttable_sorted"); // reset sort order
            sorttable.innerSortFunction.apply($('#hyperv_Name')[0], []);

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