diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-17 17:36:30 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-17 17:36:30 +0100 |
commit | 688bea6958d0f12613fab7bfefe5f94e831ce05f (patch) | |
tree | 06dba871f9ee8babebe995d5c0c7bcb12bbb0412 /qooxdoo/source/class/Smokeping/ui/GraphList.js | |
parent | 1620cd2abeb29cd7cd24e1258f6398053a4234f7 (diff) | |
download | smokeping-688bea6958d0f12613fab7bfefe5f94e831ce05f.tar.gz smokeping-688bea6958d0f12613fab7bfefe5f94e831ce05f.tar.xz |
new classes
Diffstat (limited to 'qooxdoo/source/class/Smokeping/ui/GraphList.js')
-rw-r--r-- | qooxdoo/source/class/Smokeping/ui/GraphList.js | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/qooxdoo/source/class/Smokeping/ui/GraphList.js b/qooxdoo/source/class/Smokeping/ui/GraphList.js new file mode 100644 index 0000000..a7419dc --- /dev/null +++ b/qooxdoo/source/class/Smokeping/ui/GraphList.js @@ -0,0 +1,55 @@ +/* ************************************************************************ +#module(Smokeping) +************************************************************************ */ + +/** + * a widget showing the smokeping graph overview + */ + +qx.Class.define('Smokeping.ui.GraphList', +{ + extend: qx.ui.layout.FlowLayout, + + /* + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ + + /** + * @param base_url {String} Path to the location of the image generator + * + */ + + construct: function (url) { + + with(this){ + base(arguments); + setOverflow('scrollY'); + setBackgroundColor('white'); + setBorder(new qx.ui.core.Border(1,'solid','#a0a0a0')); + setWidth('100%'); + setHeight('100%'); + setVerticalSpacing(10); + setHorizontalSpacing(10); + setPadding(10); + }; + this._url = url; + qx.event.message.Bus.subscribe('sp.menu.folder',this._load_graphs,this); + }, + + members: { + _load_graphs: function(m){ + var files = m.getData() + this.removeAll(); + for(var i=0;i<files.length;i++){ + var button = new Smokeping.ui.Graph(this._url + 'grapher.cgi?g=' + files[i]); + this.add(button); + } + } + } + + +}); + + |