summaryrefslogtreecommitdiffstats
path: root/qooxdoo/source/class/Smokeping/ui/GraphList.js
diff options
context:
space:
mode:
Diffstat (limited to 'qooxdoo/source/class/Smokeping/ui/GraphList.js')
-rw-r--r--qooxdoo/source/class/Smokeping/ui/GraphList.js55
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);
+ }
+ }
+ }
+
+
+});
+
+