foist
[kismet-logviewer.git] / logviewer / static / js / kismet.ui.btle.js
1
2 kismet_ui.AddDeviceDetail("btle", "BTLE", 0, {
3     filter: function(data) {
4         return data['kismet.device.base.phyname'] === "BTLE";
5     },
6     draw: function(data, target) {
7         target.devicedata(data, {
8             id: "btledata",
9             fields: [
10             {
11                 field: "btle_discovery",
12                 title: " Discovery",
13                 draw: function(opts) {
14                     var le = 
15                         kismet.ObjectByString(opts['data'], "btle.device/btle.device.le_limited_discoverable");
16                     var ge = 
17                         kismet.ObjectByString(opts['data'], "btle.device/btle.device.le_general_discoverable");
18
19                     var text = "";
20
21                     if (le)
22                         text = "Limited";
23
24                     if (ge)
25                         if (text.length == 0)
26                             text = "General";
27                         else
28                             text += ", General";
29
30                     if (text.length == 0)
31                         return "Unknown";
32
33                     return text;
34                 },
35                 help: "BTLE devices with limited discovery can only be detected for 30 seconds.  Devices with general discovery can be detected at any time.",
36             },
37             {
38                 field: "btle.device/btle.device.br_edr_unsupported",
39                 title: "BR/EDR Mode",
40                 draw: function(opts) {
41                     if (opts['value']) 
42                         return "Not supported";
43                     return "Supported";
44                 },
45                 help: "Some devices support classic Bluetooth BR/EDR modes.",
46             },
47             {
48                 field: "btle.device/btle.device.simultaneous_br_edr_controller",
49                 title: "BR EDR Controller",
50                 draw: function(opts) {
51                     if (opts['value']) 
52                         return "Supported";
53                     return "Not supported";
54                 },
55                 help: "Device supports BT classic BR/EDR modes as a controller",
56             },
57             {
58                 field: "btle.device/btle.device.simultaneous_br_edr_host",
59                 title: "BR EDR Host",
60                 draw: function(opts) {
61                     if (opts['value']) 
62                         return "Supported";
63                     return "Not supported";
64                 },
65                 help: "Device supports BT classic BR/EDR modes as a host",
66             },
67             ],
68         });
69     },
70 });
71