From 0b6a4a8cd443b6d0a4ac9ffc42e4e094ed5bfe9b Mon Sep 17 00:00:00 2001 From: Richard Wall Date: Fri, 31 Dec 2010 13:23:09 +0000 Subject: A skeleton chart editing control --- jarmon/jarmon.js | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ jarmon/jarmon.test.js | 19 +++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index d47af27..5df7cce 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -823,6 +823,73 @@ jarmon.RrdChooser.prototype.drawDsSummary = function() { }; +jarmon.ChartEditor = function($tpl) { + this.$tpl = $tpl; + this.data = { + title: '', + datasources: [ + ['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', '%'] + ] + }; +}; + +jarmon.ChartEditor.prototype.drawChartEditForm = function() { + var self = this; + this.$tpl.empty(); + + $('
').append( + $('
').append( + $('