visage-app 0.9.0.pre1 → 0.9.0.pre2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/visage-app/profile.rb +1 -1
- data/lib/visage-app/public/javascripts/graph.js +5 -8
- data/lib/visage-app/public/javascripts/keyboard.js +94 -45
- data/lib/visage-app/views/profile.haml +2 -1
- data/visage-app.gemspec +104 -0
- metadata +4 -3
data/README.md
CHANGED
@@ -29,7 +29,7 @@ N.B: Visage must be deployed on a machine where `collectd` stores its stats in R
|
|
29
29
|
|
30
30
|
On Ubuntu, to install dependencies run:
|
31
31
|
|
32
|
-
$ sudo apt-get install -y librrd-ruby ruby ruby-dev rubygems collectd
|
32
|
+
$ sudo apt-get install -y build-essential librrd-ruby ruby ruby-dev rubygems collectd
|
33
33
|
|
34
34
|
On CentOS, to install dependencies run:
|
35
35
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.0.
|
1
|
+
0.9.0.pre2
|
data/lib/visage-app/profile.rb
CHANGED
@@ -308,15 +308,12 @@ var visageGraph = new Class({
|
|
308
308
|
},
|
309
309
|
plotOptions: {
|
310
310
|
series: {
|
311
|
-
stacking: 'normal',
|
312
311
|
marker: {
|
313
|
-
enabled: false
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
marker: {
|
319
|
-
symbol: 'triangle'
|
312
|
+
enabled: false,
|
313
|
+
stacking: 'normal',
|
314
|
+
states: {
|
315
|
+
hover: {
|
316
|
+
enabled: true
|
320
317
|
}
|
321
318
|
}
|
322
319
|
}
|
@@ -1,72 +1,121 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var mask;
|
4
|
+
|
5
|
+
function checkForInput(e) {
|
6
|
+
var element;
|
7
|
+
|
8
|
+
if (e.target) {
|
9
|
+
element = e.target;
|
10
|
+
}
|
11
|
+
else if (e.srcElement) {
|
12
|
+
element = e.srcElement;
|
13
|
+
}
|
14
|
+
|
15
|
+
// 3 == TEXT_NODE
|
16
|
+
if (element.nodeType == 3) {
|
17
|
+
element = element.parentNode;
|
18
|
+
}
|
19
|
+
|
20
|
+
if (element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') {
|
21
|
+
return true;
|
22
|
+
}
|
23
|
+
|
24
|
+
return false;
|
4
25
|
}
|
5
26
|
|
6
|
-
|
7
|
-
|
8
|
-
|
27
|
+
|
28
|
+
function gotoBuilder(e) {
|
29
|
+
if (checkForInput(e)) {
|
30
|
+
return;
|
31
|
+
}
|
32
|
+
|
33
|
+
var uri = new URI('/builder');
|
34
|
+
uri.go();
|
9
35
|
}
|
10
36
|
|
11
|
-
function
|
37
|
+
function gotoProfiles(e) {
|
38
|
+
if (checkForInput(e)) {
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
var uri = new URI('/profiles');
|
42
|
+
uri.go();
|
43
|
+
}
|
44
|
+
|
45
|
+
function moveUp(e) {
|
46
|
+
if (checkForInput(e)) {
|
47
|
+
return;
|
48
|
+
}
|
12
49
|
if ( $('navigation') ) {
|
13
|
-
var active = $('navigation').getElement('.active')
|
14
|
-
var previous = active.getPrevious('.shortcut')
|
50
|
+
var active = $('navigation').getElement('.active');
|
51
|
+
var previous = active.getPrevious('.shortcut');
|
15
52
|
|
16
53
|
if (previous) {
|
17
54
|
var previousY = previous.getPosition().y,
|
18
|
-
windowY = window.getSize().y
|
55
|
+
windowY = window.getSize().y;
|
19
56
|
|
20
57
|
if (previousY > windowY) {
|
21
|
-
var scroller = new Fx.Scroll(window, {duration: 10})
|
22
|
-
scroller.toElement(previous)
|
58
|
+
var scroller = new Fx.Scroll(window, {duration: 10});
|
59
|
+
scroller.toElement(previous);
|
23
60
|
}
|
24
61
|
|
25
|
-
active.toggleClass('active')
|
26
|
-
previous.toggleClass('active')
|
62
|
+
active.toggleClass('active');
|
63
|
+
previous.toggleClass('active');
|
27
64
|
}
|
28
65
|
}
|
29
66
|
}
|
30
67
|
|
31
|
-
function moveDown() {
|
68
|
+
function moveDown(e) {
|
69
|
+
if (checkForInput(e)) {
|
70
|
+
return;
|
71
|
+
}
|
32
72
|
if ( $('navigation') ) {
|
33
|
-
var active = $('navigation').getElement('.active')
|
34
|
-
var next = active.getNext('.shortcut')
|
73
|
+
var active = $('navigation').getElement('.active');
|
74
|
+
var next = active.getNext('.shortcut');
|
35
75
|
if (next) {
|
36
76
|
var nextY = next.getPosition().y,
|
37
|
-
windowY = window.getSize().y
|
77
|
+
windowY = window.getSize().y;
|
38
78
|
|
39
79
|
if (nextY > windowY) {
|
40
|
-
var scroller = new Fx.Scroll(window, {duration: 10})
|
41
|
-
scroller.toElement(next)
|
80
|
+
var scroller = new Fx.Scroll(window, {duration: 10});
|
81
|
+
scroller.toElement(next);
|
42
82
|
}
|
43
83
|
|
44
|
-
active.toggleClass('active')
|
45
|
-
next.toggleClass('active')
|
84
|
+
active.toggleClass('active');
|
85
|
+
next.toggleClass('active');
|
46
86
|
}
|
47
87
|
}
|
48
88
|
}
|
49
89
|
|
50
|
-
function select() {
|
90
|
+
function select(e) {
|
91
|
+
if (checkForInput(e)) {
|
92
|
+
return;
|
93
|
+
}
|
51
94
|
if ( $('navigation') ) {
|
52
|
-
var active = $('navigation').getElement('.active')
|
53
|
-
var destination = active.getElement('a').get('href')
|
54
|
-
var uri = new URI(destination)
|
55
|
-
uri.go()
|
95
|
+
var active = $('navigation').getElement('.active');
|
96
|
+
var destination = active.getElement('a').get('href');
|
97
|
+
var uri = new URI(destination);
|
98
|
+
uri.go();
|
56
99
|
}
|
57
100
|
}
|
58
101
|
|
59
|
-
function back() {
|
60
|
-
|
102
|
+
function back(e) {
|
103
|
+
if (checkForInput(e)) {
|
104
|
+
return;
|
105
|
+
}
|
106
|
+
history.go(-1);
|
61
107
|
}
|
62
108
|
|
63
|
-
function help() {
|
64
|
-
|
109
|
+
function help(e) {
|
110
|
+
if (checkForInput(e)) {
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
mask.toggle();;
|
65
114
|
}
|
66
115
|
|
67
116
|
window.addEvent('domready', function() {
|
68
117
|
/* bindings */
|
69
|
-
vKeyboard = new Keyboard({defaultEventType: 'keydown'});
|
118
|
+
var vKeyboard = new Keyboard({defaultEventType: 'keydown'});
|
70
119
|
vKeyboard.addShortcuts({
|
71
120
|
'builder': {
|
72
121
|
'keys': 'c',
|
@@ -112,28 +161,28 @@ window.addEvent('domready', function() {
|
|
112
161
|
shortcutsContainer.hide()
|
113
162
|
},
|
114
163
|
onShow: function() {
|
115
|
-
var offset = document.body.getScroll().y + 100
|
116
|
-
shortcutsContainer.setStyle('top', offset)
|
117
|
-
shortcutsContainer.show()
|
164
|
+
var offset = document.body.getScroll().y + 100;
|
165
|
+
shortcutsContainer.setStyle('top', offset);
|
166
|
+
shortcutsContainer.show();
|
118
167
|
}
|
119
168
|
});
|
120
169
|
|
121
|
-
shortcutsContainer = new Element('div', {
|
122
|
-
'id': 'shortcuts'
|
170
|
+
var shortcutsContainer = new Element('div', {
|
171
|
+
'id': 'shortcuts'
|
123
172
|
});
|
124
173
|
|
125
|
-
var rows = []
|
174
|
+
var rows = [];
|
126
175
|
vKeyboard.getShortcuts().each(function(shortcut) {
|
127
|
-
rows.push([shortcut.keys, shortcut.description])
|
176
|
+
rows.push([shortcut.keys, shortcut.description]);
|
128
177
|
});
|
129
178
|
var table = new HtmlTable({
|
130
179
|
headers: ['Keys', 'Description'],
|
131
180
|
rows: rows
|
132
181
|
});
|
133
182
|
|
134
|
-
shortcutsContainer.hide()
|
135
|
-
shortcutsContainer.grab(table)
|
136
|
-
document.body.grab(shortcutsContainer, 'top')
|
183
|
+
shortcutsContainer.hide();
|
184
|
+
shortcutsContainer.grab(table);
|
185
|
+
document.body.grab(shortcutsContainer, 'top');
|
137
186
|
|
138
187
|
var shortcutsLink = new Element('a', {
|
139
188
|
'html': 'Shortcuts',
|
@@ -144,8 +193,8 @@ window.addEvent('domready', function() {
|
|
144
193
|
}
|
145
194
|
}
|
146
195
|
});
|
147
|
-
var footer = $('footer')
|
148
|
-
footer.set('html', footer.get('html') + ' | ')
|
149
|
-
$('footer').grab(shortcutsLink)
|
196
|
+
var footer = $('footer');
|
197
|
+
footer.set('html', footer.get('html') + ' | ');
|
198
|
+
$('footer').grab(shortcutsLink);
|
150
199
|
|
151
200
|
});
|
@@ -5,13 +5,14 @@
|
|
5
5
|
%h2#profile_name= profile_name
|
6
6
|
- @profile.graphs.each do |graph|
|
7
7
|
%div{:id => graph.id, :class => 'graph'}
|
8
|
-
%img{:src => "/images/loader.gif"}
|
8
|
+
%img{:src => link_to("/images/loader.gif")}
|
9
9
|
:javascript
|
10
10
|
window.addEvent('domready', function() {
|
11
11
|
var graph = new visageGraph('#{graph.id}', '#{graph.host}', '#{graph.plugin}', {
|
12
12
|
pluginInstance: '#{graph.instances.join(',')}',
|
13
13
|
name: '#{graph.plugin} on #{graph.host}',
|
14
14
|
start: '#{@start}',
|
15
|
+
#{ "baseurl: '" + ENV['VISAGE_APP_BASE_URL_PATH'].gsub(/^\//, '') + "'," if ENV['VISAGE_APP_BASE_URL_PATH'] }
|
15
16
|
finish: '#{@finish}'
|
16
17
|
});
|
17
18
|
});
|
data/visage-app.gemspec
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{visage-app}
|
8
|
+
s.version = "0.9.0.pre2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Lindsay Holmwood"]
|
12
|
+
s.date = %q{2011-01-24}
|
13
|
+
s.default_executable = %q{visage-app}
|
14
|
+
s.description = %q{Visage is a web interface for viewing collectd statistics. It also provides a JSON interface onto collectd's RRD data, giving you an easy way to mash up the data.}
|
15
|
+
s.email = %q{lindsay@holmwood.id.au}
|
16
|
+
s.executables = ["visage-app"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"README.md"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".gitignore",
|
22
|
+
"AUTHORS",
|
23
|
+
"LICENCE",
|
24
|
+
"README.md",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"bin/visage-app",
|
28
|
+
"features/builder.feature",
|
29
|
+
"features/cli.feature",
|
30
|
+
"features/data/config/with_no_profiles/.stub",
|
31
|
+
"features/json.feature",
|
32
|
+
"features/profiles.feature",
|
33
|
+
"features/step_definitions/form_steps.rb",
|
34
|
+
"features/step_definitions/json_steps.rb",
|
35
|
+
"features/step_definitions/result_steps.rb",
|
36
|
+
"features/step_definitions/site_steps.rb",
|
37
|
+
"features/step_definitions/visage_steps.rb",
|
38
|
+
"features/step_definitions/webrat_steps.rb",
|
39
|
+
"features/support/env.rb",
|
40
|
+
"lib/visage-app.rb",
|
41
|
+
"lib/visage-app/collectd/json.rb",
|
42
|
+
"lib/visage-app/collectd/profile.rb",
|
43
|
+
"lib/visage-app/collectd/rrds.rb",
|
44
|
+
"lib/visage-app/config.rb",
|
45
|
+
"lib/visage-app/config.ru",
|
46
|
+
"lib/visage-app/config/file.rb",
|
47
|
+
"lib/visage-app/graph.rb",
|
48
|
+
"lib/visage-app/helpers.rb",
|
49
|
+
"lib/visage-app/patches.rb",
|
50
|
+
"lib/visage-app/profile.rb",
|
51
|
+
"lib/visage-app/public/favicon.gif",
|
52
|
+
"lib/visage-app/public/images/active.png",
|
53
|
+
"lib/visage-app/public/images/add.png",
|
54
|
+
"lib/visage-app/public/images/hosts.png",
|
55
|
+
"lib/visage-app/public/images/loader.gif",
|
56
|
+
"lib/visage-app/public/images/metrics.png",
|
57
|
+
"lib/visage-app/public/images/search.png",
|
58
|
+
"lib/visage-app/public/javascripts/graph.js",
|
59
|
+
"lib/visage-app/public/javascripts/highcharts.js",
|
60
|
+
"lib/visage-app/public/javascripts/highcharts.src.js",
|
61
|
+
"lib/visage-app/public/javascripts/keyboard.js",
|
62
|
+
"lib/visage-app/public/javascripts/mootools-1.2.3-core.js",
|
63
|
+
"lib/visage-app/public/javascripts/mootools-1.2.5.1-more.js",
|
64
|
+
"lib/visage-app/public/stylesheets/screen.css",
|
65
|
+
"lib/visage-app/views/builder.haml",
|
66
|
+
"lib/visage-app/views/layout.haml",
|
67
|
+
"lib/visage-app/views/profile.haml",
|
68
|
+
"lib/visage-app/views/profiles.haml",
|
69
|
+
"man/visage-app.5",
|
70
|
+
"man/visage-app.5.ronn",
|
71
|
+
"visage-app.gemspec"
|
72
|
+
]
|
73
|
+
s.homepage = %q{http://visage-app.com/}
|
74
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
75
|
+
s.require_paths = ["lib"]
|
76
|
+
s.rubygems_version = %q{1.3.6}
|
77
|
+
s.summary = %q{a web (interface | service) for viewing collectd statistics}
|
78
|
+
|
79
|
+
if s.respond_to? :specification_version then
|
80
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
81
|
+
s.specification_version = 3
|
82
|
+
|
83
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
84
|
+
s.add_runtime_dependency(%q<sinatra>, ["= 1.0"])
|
85
|
+
s.add_runtime_dependency(%q<tilt>, ["= 1.0.1"])
|
86
|
+
s.add_runtime_dependency(%q<haml>, ["= 3.0.13"])
|
87
|
+
s.add_runtime_dependency(%q<errand>, ["= 0.7.2"])
|
88
|
+
s.add_runtime_dependency(%q<yajl-ruby>, ["= 0.7.6"])
|
89
|
+
else
|
90
|
+
s.add_dependency(%q<sinatra>, ["= 1.0"])
|
91
|
+
s.add_dependency(%q<tilt>, ["= 1.0.1"])
|
92
|
+
s.add_dependency(%q<haml>, ["= 3.0.13"])
|
93
|
+
s.add_dependency(%q<errand>, ["= 0.7.2"])
|
94
|
+
s.add_dependency(%q<yajl-ruby>, ["= 0.7.6"])
|
95
|
+
end
|
96
|
+
else
|
97
|
+
s.add_dependency(%q<sinatra>, ["= 1.0"])
|
98
|
+
s.add_dependency(%q<tilt>, ["= 1.0.1"])
|
99
|
+
s.add_dependency(%q<haml>, ["= 3.0.13"])
|
100
|
+
s.add_dependency(%q<errand>, ["= 0.7.2"])
|
101
|
+
s.add_dependency(%q<yajl-ruby>, ["= 0.7.6"])
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 9
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.9.0.
|
9
|
+
- pre2
|
10
|
+
version: 0.9.0.pre2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lindsay Holmwood
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-24 00:00:00 +11:00
|
19
19
|
default_executable: visage-app
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/visage-app/views/profiles.haml
|
147
147
|
- man/visage-app.5
|
148
148
|
- man/visage-app.5.ronn
|
149
|
+
- visage-app.gemspec
|
149
150
|
has_rdoc: true
|
150
151
|
homepage: http://visage-app.com/
|
151
152
|
licenses: []
|