029471f801ec66f4ae7753c52630758c7eb36a97
[project/luci.git] / applications / luci-app-statistics / htdocs / luci-static / resources / statistics / rrdtool / definitions / dns.js
1 /*
2 * Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
3 * Licensed to the public under the Apache License 2.0.
4 */
5
6 'use strict';
7 'require baseclass';
8
9 return baseclass.extend({
10 title: _('DNS'),
11
12 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
13 var traffic = {
14 title: "%H: DNS traffic", vlabel: "Bit/s",
15
16 data: {
17 sources: {
18 dns_octets: [ "queries", "responses" ]
19 },
20
21 options: {
22 dns_octets__responses: {
23 total: true,
24 color: "00ff00",
25 title: "Responses"
26 },
27
28 dns_octets__queries: {
29 total: true,
30 color: "0000ff",
31 title: "Queries"
32 }
33 }
34 }
35 };
36
37 var opcode_query = {
38 title: "%H: DNS Opcode Query", vlabel: "Queries/s",
39 data: {
40 instances: {
41 dns_opcode: [ "Query" ]
42 },
43
44 options: {
45 dns_opcode_Query_value: {
46 total: true,
47 color: "0000ff",
48 title: "Queries/s"
49 }
50 }
51 }
52 };
53
54 var qtype = {
55 title: "%H: DNS QType", vlabel: "Queries/s",
56 data: {
57 sources: { dns_qtype: [ "" ] },
58 options: {
59 dns_qtype_AAAA_ : { title: "AAAA", noarea: true, total: true },
60 dns_qtype_A_ : { title: "A", noarea: true, total: true },
61 dns_qtype_A6_ : { title: "A6", noarea: true, total: true },
62 dns_qtype_TXT_ : { title: "TXT", noarea: true, total: true },
63 dns_qtype_MX_ : { title: "MX", noarea: true, total: true },
64 dns_qtype_NS_ : { title: "NS", noarea: true, total: true },
65 dns_qtype_ANY_ : { title: "ANY", noarea: true, total: true },
66 dns_qtype_CNAME_: { title: "CNAME", noarea: true, total: true },
67 dns_qtype_SOA_ : { title: "SOA", noarea: true, total: true },
68 dns_qtype_SRV_ : { title: "SRV", noarea: true, total: true },
69 dns_qtype_PTR_ : { title: "PTR", noarea: true, total: true },
70 dns_qtype_RP_ : { title: "RP", noarea: true, total: true },
71 dns_qtype_MAILB_: { title: "MAILB", noarea: true, total: true },
72 dns_qtype_IXFR_ : { title: "IXFR", noarea: true, total: true },
73 dns_qtype_HINFO_: { title: "HINFO", noarea: true, total: true },
74 },
75 }
76 };
77
78 return [ traffic, opcode_query, qtype ];
79 }
80 });