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 +- jarmon/jarmon.js | 158 +++++++++++++++++++++++++++++++- 3 files changed, 170 insertions(+), 148 deletions(-) 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: [ diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index 0919915..a2c862d 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -972,6 +972,89 @@ jarmon.ChartEditor.prototype._addDatasourceRow = function(record) { }; +jarmon.TabbedInterface = function($tpl, recipe) { + this.$tpl = $tpl; + this.recipe = recipe; + this.placeholders = []; + + var $tabBar = $('