dot graph map
[kismet-logviewer.git] / logviewer / static / js / kismet.ui.meter.js
1
2 "use strict";
3
4 /* Highlight rtl devices */
5 kismet_ui.AddDeviceRowHighlight({
6     name: "RF Meter Devices",
7     description: "RF Power, Water, Gas Meters",
8     priority: 100,
9     defaultcolor: "#b3ffe6",
10     defaultenable: true,
11     fields: [
12         'kismet.device.base.phyname'
13     ],
14     selector: function(data) {
15         return data['kismet.device.base.phyname'] === "RF Meter";
16     }
17 });
18
19 kismet_ui.AddDeviceDetail("rfmeter", "Meter (SDR)", 0, {
20     filter: function(data) {
21         return (data['kismet.device.base.phyname'] === "RTLAMR");
22     },
23     draw: function(data, target) {
24         target.devicedata(data, {
25             "id": "meterData",
26             "fields": [
27             {
28                 field: "meter.device/meter.device.meter_id",
29                 title: "Meter ID",
30                 empty: "<i>Unknown</i>"
31             },
32             {
33                 field: "meter.device/meter.device.meter_type",
34                 title: "Meter Type",
35                 empty: "<i>Unknown</i>"
36             },
37             {
38                 field: "meter.device/meter.device.consumption",
39                 title: "Consumption",
40                 empty: "<i>Unknown</i>"
41             },
42             ],
43         });
44     },
45 });
46