blob: a7419dc925a80c11cf2ba2d9b22719d5cb40d21c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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);
}
}
}
});
|