summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-11-15 07:22:46 +0100
committerTobi Oetiker <tobi@oetiker.ch>2007-11-15 07:22:46 +0100
commitc34f404e3fe41e7ca3890fa66a8b4625ee3269ac (patch)
tree08eff151425374a67c656aae22850b2dad339e63
parent77709fd6296cf90f93dd62ad3fc2b7b0303f7884 (diff)
downloadsmokeping-c34f404e3fe41e7ca3890fa66a8b4625ee3269ac.tar.gz
smokeping-c34f404e3fe41e7ca3890fa66a8b4625ee3269ac.tar.xz
added a missing file
-rw-r--r--qooxdoo/source/class/Smokeping/ui/Graphs.js87
1 files changed, 87 insertions, 0 deletions
diff --git a/qooxdoo/source/class/Smokeping/ui/Graphs.js b/qooxdoo/source/class/Smokeping/ui/Graphs.js
new file mode 100644
index 0000000..9508eee
--- /dev/null
+++ b/qooxdoo/source/class/Smokeping/ui/Graphs.js
@@ -0,0 +1,87 @@
+/* ************************************************************************
+#module(Smokeping)
+************************************************************************ */
+
+/**
+ * a widget showing the smokeping graph overview
+ */
+
+qx.Class.define('Smokeping.ui.Graphs',
+{
+ 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,'root node');
+ setOverflow('scrollY');
+ setBackgroundColor('white');
+ setBorder('inset');
+ setWidth('100%');
+ setHeight('100%');
+ setVerticalSpacing(10);
+ setHorizontalSpacing(10);
+ };
+ for(var i=0;i<2000;i++){
+ var button = new qx.ui.basic.Atom(i.toString());
+ this.add(button);
+ }
+ },
+
+ /*
+ *****************************************************************************
+ Statics
+ *****************************************************************************
+ */
+
+ statics :
+ {
+
+ /*
+ ---------------------------------------------------------------------------
+ CORE METHODS
+ ---------------------------------------------------------------------------
+ */
+
+ /**
+ * Create the tree based on input from the Server
+ *
+ * @type member
+ *
+ * @param {void}
+ *
+ * @return BaseUrl {Strings}
+ */
+
+
+ __fill_folder: function(node,data){
+ // in data[0] we have the id of the folder
+ var folder = new qx.ui.tree.TreeFolder(data[1]);
+ node.add(folder);
+ var length = data.length;
+ for (var i=2;i<length;i++){
+ if(qx.util.Validation.isValidArray(data[i])){
+ Smokeping.ui.TargetTree.__fill_folder(folder,data[i]);
+ } else {
+ i++; // skip the node id for now
+ var file = new qx.ui.tree.TreeFile(data[i]);
+ folder.add(file);
+ }
+ }
+ }
+
+ }
+});
+
+