From 7e7a9e36693919bd79a11be271a379303f581c54 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sat, 8 Jan 2011 15:05:38 +0000 Subject: start to reorganise the example application --- docs/examples/index.html | 112 +++++++++++++-------------- docs/examples/jarmon_example_recipes.js | 130 +++++++++++++++----------------- 2 files changed, 112 insertions(+), 130 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/index.html b/docs/examples/index.html index 3debd18..ec5143d 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -18,31 +18,36 @@ @@ -194,18 +197,7 @@
- -
-
-
-
-
-
+

diff --git a/docs/examples/jarmon_example_recipes.js b/docs/examples/jarmon_example_recipes.js index 90b5c2e..e2e42b9 100644 --- a/docs/examples/jarmon_example_recipes.js +++ b/docs/examples/jarmon_example_recipes.js @@ -10,79 +10,69 @@ if(typeof jarmon == 'undefined') { } jarmon.COLLECTD_RECIPES = { - 'cpu': [ - { - title: 'CPU Usage', - data: [ - ['data/cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'], - ['data/cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'], - ['data/cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'], - ['data/cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'], - ['data/cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'], - ['data/cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - jarmon.Chart.STACKED_OPTIONS) - } - ], + 'cpu': { + title: 'CPU Usage', + data: [ + ['data/cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'], + ['data/cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'], + ['data/cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'], + ['data/cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'], + ['data/cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'], + ['data/cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS) + }, - 'memory': [ - { - title: 'Memory', - data: [ - ['data/memory/memory-buffered.rrd', 0, 'Buffered', 'B'], - ['data/memory/memory-used.rrd', 0, 'Used', 'B'], - ['data/memory/memory-cached.rrd', 0, 'Cached', 'B'], - ['data/memory/memory-free.rrd', 0, 'Free', 'B'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, - jarmon.Chart.STACKED_OPTIONS) - } - ], + 'memory': { + title: 'Memory', + data: [ + ['data/memory/memory-buffered.rrd', 0, 'Buffered', 'B'], + ['data/memory/memory-used.rrd', 0, 'Used', 'B'], + ['data/memory/memory-cached.rrd', 0, 'Cached', 'B'], + ['data/memory/memory-free.rrd', 0, 'Free', 'B'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, + jarmon.Chart.STACKED_OPTIONS) + }, - 'dns': [ - { - title: 'DNS Query Types', - data: [ - ['data/dns/dns_qtype-A.rrd', 0, 'A', 'Q/s'], - ['data/dns/dns_qtype-PTR.rrd', 0, 'PTR', 'Q/s'], - ['data/dns/dns_qtype-SOA.rrd', 0, 'SOA', 'Q/s'], - ['data/dns/dns_qtype-SRV.rrd', 0, 'SRV', 'Q/s'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - }, + 'dns_query_types': { + title: 'DNS Query Types', + data: [ + ['data/dns/dns_qtype-A.rrd', 0, 'A', 'Q/s'], + ['data/dns/dns_qtype-PTR.rrd', 0, 'PTR', 'Q/s'], + ['data/dns/dns_qtype-SOA.rrd', 0, 'SOA', 'Q/s'], + ['data/dns/dns_qtype-SRV.rrd', 0, 'SRV', 'Q/s'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, - { - title: 'DNS Return Codes', - data: [ - ['data/dns/dns_rcode-NOERROR.rrd', 0, 'NOERROR', 'Q/s'], - ['data/dns/dns_rcode-NXDOMAIN.rrd', 0, 'NXDOMAIN', 'Q/s'], - ['data/dns/dns_rcode-SERVFAIL.rrd', 0, 'SERVFAIL', 'Q/s'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - } - ], + 'dns_return_codes': { + title: 'DNS Return Codes', + data: [ + ['data/dns/dns_rcode-NOERROR.rrd', 0, 'NOERROR', 'Q/s'], + ['data/dns/dns_rcode-NXDOMAIN.rrd', 0, 'NXDOMAIN', 'Q/s'], + ['data/dns/dns_rcode-SERVFAIL.rrd', 0, 'SERVFAIL', 'Q/s'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, - 'load': [ - { - title: 'Load Average', - data: [ - ['data/load/load.rrd', 'shortterm', 'Short Term', ''], - ['data/load/load.rrd', 'midterm', 'Medium Term', ''], - ['data/load/load.rrd', 'longterm', 'Long Term', ''] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - } - ], + 'load': { + title: 'Load Average', + data: [ + ['data/load/load.rrd', 'shortterm', 'Short Term', ''], + ['data/load/load.rrd', 'midterm', 'Medium Term', ''], + ['data/load/load.rrd', 'longterm', 'Long Term', ''] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + }, - 'interface': [ - { - title: 'Wlan0 Throughput', - data: [ - ['data/interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'b/s'], - ['data/interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'b/s'] - ], - options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) - } - ] + 'interface': { + title: 'Wlan0 Throughput', + data: [ + ['data/interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'b/s'], + ['data/interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'b/s'] + ], + options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) + } }; -- cgit v1.2.3-2-g168b From 2447194a8f52ba7577ef2a0e0929d433dfa292aa Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sun, 9 Jan 2011 15:36:01 +0000 Subject: Simplify the example application - move most code to jarmon.js --- docs/examples/index.html | 152 ++------------------------------ docs/examples/jarmon_example_recipes.js | 8 +- 2 files changed, 14 insertions(+), 146 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/index.html b/docs/examples/index.html index ec5143d..e561b9e 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -16,154 +16,15 @@ @@ -205,5 +66,6 @@
+ diff --git a/docs/examples/jarmon_example_recipes.js b/docs/examples/jarmon_example_recipes.js index e2e42b9..610ecb2 100644 --- a/docs/examples/jarmon_example_recipes.js +++ b/docs/examples/jarmon_example_recipes.js @@ -9,7 +9,13 @@ if(typeof jarmon == 'undefined') { var jarmon = {}; } -jarmon.COLLECTD_RECIPES = { +jarmon.TAB_RECIPES_STANDARD = [ + ['System', ['cpu', 'memory','load']], + ['Network', ['interface']], + ['DNS', ['dns_query_types', 'dns_return_codes']] +]; + +jarmon.CHART_RECIPES_COLLECTD = { 'cpu': { title: 'CPU Usage', data: [ -- cgit v1.2.3-2-g168b From 841d30bf4eda7a8658433d97b9c9a686c85b6e5a Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sat, 15 Jan 2011 15:34:41 +0000 Subject: decouple the chart coordinator html from the charts under its control. Also lighten the border of input text boxes. --- docs/examples/assets/css/style.css | 5 +++++ docs/examples/index.html | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/assets/css/style.css b/docs/examples/assets/css/style.css index 561b11e..10ecda9 100644 --- a/docs/examples/assets/css/style.css +++ b/docs/examples/assets/css/style.css @@ -75,6 +75,11 @@ input[type=checkbox] { border: none; } +input[type=text] { + padding: 3px; + border: 1px solid #EEE; +} + .notice { border: 1px solid Green; background: #FFDDFF; diff --git a/docs/examples/index.html b/docs/examples/index.html index e561b9e..6acf2b8 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -58,14 +58,13 @@
-
-
-

-
-
-
-
- +
+
+

+
+
+
+
-- cgit v1.2.3-2-g168b From f7143a7a053c05ac9617d3557f583ce8cf223952 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sun, 16 Jan 2011 18:33:04 +0000 Subject: Move edit buttons --- docs/examples/assets/css/style.css | 27 +++++++++++++++++++++++---- docs/examples/index.html | 8 +++++++- 2 files changed, 30 insertions(+), 5 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/assets/css/style.css b/docs/examples/assets/css/style.css index 10ecda9..982398b 100644 --- a/docs/examples/assets/css/style.css +++ b/docs/examples/assets/css/style.css @@ -9,11 +9,7 @@ form div { } h2 { - padding: 0 0 0 55px; - margin: 20px auto 5px auto; font-size: 14px; - text-align: left; - clear: both; } p, li, dt, dd, td, th, div { @@ -36,6 +32,7 @@ p, li, dt, dd, td, th, div { height:200px; width: 850px; margin: 0 auto 0 auto; + clear: both; } .tickLabel { @@ -90,3 +87,25 @@ input[type=text] { #calroot { z-index: 2; } + +.chart-header { + width: 790px; + padding: 5px 0 5px 0; + margin: 20px auto 0 auto; + position: relative; + left: 25px; +} + +.chart-header:AFTER { + content: '' +} + +.chart-container h2{ + float: left; + margin: 0; +} + +.chart-container .chart-controls{ + float: right; + margin: 0; +} diff --git a/docs/examples/index.html b/docs/examples/index.html index 6acf2b8..2bec8aa 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -61,7 +61,13 @@
-

+
+

+
+ + +
+
-- cgit v1.2.3-2-g168b From e37aeb47afd8d528c004eed5762287c5c99867e9 Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Sun, 16 Jan 2011 20:30:16 +0000 Subject: position the add new chart button --- docs/examples/assets/css/style.css | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/examples') diff --git a/docs/examples/assets/css/style.css b/docs/examples/assets/css/style.css index 982398b..e82ec30 100644 --- a/docs/examples/assets/css/style.css +++ b/docs/examples/assets/css/style.css @@ -109,3 +109,12 @@ input[type=text] { float: right; margin: 0; } + +.tab-controls { + width: 790px; + padding: 5px 0 5px 0; + margin: 20px auto 0 auto; + text-align: right; + position: relative; + left: 25px; +} -- cgit v1.2.3-2-g168b