visage-app 2.0.5 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module Visage
4
- VERSION = "2.0.5"
4
+ VERSION = "2.1.0"
5
5
  end
@@ -5,37 +5,7 @@
5
5
  new ChartBuilder('chart-builder');
6
6
  });
7
7
 
8
- %div#chart-builder
9
- %div#hosts.builder
10
- %h2 Hosts
11
- %img{:src => link_to("/images/hosts.png"), :class => "icon hosts"}
12
- %div.search
13
-
14
- %div#metrics.builder
15
- %h2 Metrics
16
- %img{:src => link_to("/images/metrics.png"), :class => "icon metrics"}
17
- %div.search
18
-
19
- %input#show{:value => "Show graphs", :type => "button", :class => "button"}
20
-
21
- %div{:style => "text-align: left; margin-left: 24px;"}
22
- %strong{:style => "font-family: sans-serif; font-size: 12px;"}
23
- Global Time Period:
24
- <select id="timescale" class="date timescale" style="margin-bottom: 3px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(170, 170, 170); border-right-color: rgb(170, 170, 170); border-bottom-color: rgb(170, 170, 170); border-left-color: rgb(170, 170, 170); "><option value="start=1321692809">last 1 hour</option><option value="start=1321689209">last 2 hours</option><option value="start=1321674809">last 6 hours</option><option value="start=1321653209">last 12 hours</option><option value="start=1321610009">last 1 day</option><option value="start=1321523609">last 2 days</option><option value="start=1321437209">last 3 days</option><option value="start=1321091609">last 1 week</option><option value="start=1320486809">last 2 weeks</option><option value="start=1318910009">last 1 month</option><option value="start=1290160409">last 1 year</option><option value="start=1258624409">last 2 years</option></select>
25
- :javascript
26
- window.addEvent('domready', function() {
27
- var timescale = $('timescale');
28
- timescale.addEvent('change', function(e) {
29
- e.stop();
30
- window.Graphs.each(function(graph) {
31
- var selected = timescale.getSelected()[0]
32
-
33
- graph.setTimePeriodTo(selected);
34
- });
35
-
36
- });
37
- });
38
-
39
- %div#graphs
8
+ = haml :builder_form
40
9
 
10
+ %div#graphs
41
11
 
@@ -9,6 +9,13 @@
9
9
  %img{:src => link_to("/images/metrics.png"), :class => "icon metrics"}
10
10
  %div.search
11
11
 
12
+ %div#profile-options.builder
13
+ %h2 Profile Options
14
+ %div.percentiles
15
+ /%strong{:style => "font-family: sans-serif; font-size: 12px;"}
16
+ 95th Percentile:
17
+
12
18
  %input#show{:value => "Show graphs", :type => "button", :class => "button"}
13
19
 
14
20
  %div#graph
21
+
@@ -7,6 +7,7 @@
7
7
  %link{:rel => 'stylesheet', :href => '/stylesheets/message.css', :type => 'text/css'}
8
8
  %script{:type => "text/javascript", :src => link_to("/javascripts/mootools-core-1.4.0-full-compat.js")}
9
9
  %script{:type => "text/javascript", :src => link_to("/javascripts/mootools-more-1.4.0.1.js")}
10
+ %script{:type => "text/javascript", :src => link_to("/javascripts/highcharts-mootools-adapter.js")}
10
11
  %script{:type => "text/javascript", :src => link_to("/javascripts/highcharts.js")}
11
12
  %script{:type => "text/javascript", :src => link_to("/javascripts/graph.js")}
12
13
  %script{:type => "text/javascript", :src => link_to("/javascripts/keyboard.js")}
@@ -6,11 +6,23 @@
6
6
  %div#chart-builder-slider
7
7
  = haml :builder_form
8
8
 
9
+ - if @profile.options[:percentiles]
10
+ - percentiles = @profile.options[:percentiles]
11
+ - else
12
+ - percentiles = []
13
+
14
+ - if percentiles.length > 0
15
+ - percentiles_js = "'#{percentiles.join(',') }'"
16
+ - else
17
+ - percentiles_js = ''
18
+
9
19
  :javascript
10
20
  window.addEvent('domready', function() {
11
21
  var builder = new ChartBuilder('chart-builder', {
12
- hosts: ['#{@profile.options[:hosts].join("','") }'],
13
- metrics: ['#{@profile.options[:metrics].join("','") }']
22
+ hosts: ['#{@profile.options[:hosts].join("','") }'],
23
+ metrics: ['#{@profile.options[:metrics].join("','") }'],
24
+ percentiles: [#{percentiles_js}]
25
+
14
26
  });
15
27
 
16
28
  $('chart-builder-slider').fade('hide').setStyle('height', '0');
@@ -25,28 +37,6 @@
25
37
  %div#profile
26
38
  %h2#name= profile_name
27
39
  %div#graphs
28
- - @profile.graphs.each do |graph|
29
- - id = URI.escape(graph.id)
30
- - host = URI.escape(graph.host)
31
- - plugin = URI.escape(graph.plugin)
32
- - instance = URI.escape(graph.instances.join(','))
33
- %div{:id => id, :class => 'graph'}
34
- %img{:src => link_to("/images/loader.gif")}
35
- :javascript
36
- window.addEvent('domready', function() {
37
- var graph = new VisageGraph('#{id}', '#{host}', '#{plugin}', {
38
- pluginInstance: '#{instance}',
39
- #{ "baseurl: '" + ENV['BASE_URL'].gsub(/^\//, '') if ENV['BASE_URL'] }
40
- });
41
- });
42
- - if @profile.graphs.size == 0
43
- %div.graph
44
- %h4.error Oops! Looks like there aren't any graphs matching the specified patterns.
45
- %p These are the patterns:
46
- %pre
47
- :preserve
48
- Host: #{@profile.options[:hosts]}
49
- Metrics: #{@profile.options[:metrics]}
50
40
 
51
41
  %div#bottom_nav
52
42
  %a{:href => link_to("/profiles")} &larr; Back to profiles
@@ -2,11 +2,14 @@
2
2
 
3
3
  %div#profiles
4
4
  %h2 Profiles
5
- %div#sort
6
- Sort by:
7
- %a{:href => link_to("/profiles?sort=name")} name
8
- |
9
- %a{:href => link_to("/profiles?sort=created")} created
5
+ / FIXME - disabling sort links as default is now sorted by profile name
6
+ / and there's no ability to sort by created time (until it's saved with
7
+ / profiles on creation)
8
+ /%div#sort
9
+ / Sort by:
10
+ / %a{:href => link_to("/profiles?sort=name")} name
11
+ / |
12
+ / %a{:href => link_to("/profiles?sort=created")} created
10
13
 
11
14
  %ul#navigation
12
15
  - @profiles.each_with_index do |prof,index|
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
+ - 1
7
8
  - 0
8
- - 5
9
- version: 2.0.5
9
+ version: 2.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lindsay Holmwood
@@ -14,14 +14,11 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-30 00:00:00 +11:00
17
+ date: 2012-04-20 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- prerelease: false
22
- name: haml
23
- type: :runtime
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
21
+ requirement: &id001 !ruby/object:Gem::Requirement
25
22
  requirements:
26
23
  - - "="
27
24
  - !ruby/object:Gem::Version
@@ -30,12 +27,12 @@ dependencies:
30
27
  - 1
31
28
  - 4
32
29
  version: 3.1.4
33
- requirement: *id001
34
- - !ruby/object:Gem::Dependency
35
30
  prerelease: false
36
- name: tilt
31
+ name: haml
37
32
  type: :runtime
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ requirement: &id002 !ruby/object:Gem::Requirement
39
36
  requirements:
40
37
  - - "="
41
38
  - !ruby/object:Gem::Version
@@ -44,12 +41,12 @@ dependencies:
44
41
  - 3
45
42
  - 3
46
43
  version: 1.3.3
47
- requirement: *id002
48
- - !ruby/object:Gem::Dependency
49
44
  prerelease: false
50
- name: sinatra
45
+ name: tilt
51
46
  type: :runtime
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ requirement: &id003 !ruby/object:Gem::Requirement
53
50
  requirements:
54
51
  - - "="
55
52
  - !ruby/object:Gem::Version
@@ -58,12 +55,12 @@ dependencies:
58
55
  - 3
59
56
  - 2
60
57
  version: 1.3.2
61
- requirement: *id003
62
- - !ruby/object:Gem::Dependency
63
58
  prerelease: false
64
- name: errand
59
+ name: sinatra
65
60
  type: :runtime
66
- version_requirements: &id004 !ruby/object:Gem::Requirement
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ requirement: &id004 !ruby/object:Gem::Requirement
67
64
  requirements:
68
65
  - - "="
69
66
  - !ruby/object:Gem::Version
@@ -72,12 +69,12 @@ dependencies:
72
69
  - 7
73
70
  - 3
74
71
  version: 0.7.3
75
- requirement: *id004
76
- - !ruby/object:Gem::Dependency
77
72
  prerelease: false
78
- name: yajl-ruby
73
+ name: errand
79
74
  type: :runtime
80
- version_requirements: &id005 !ruby/object:Gem::Requirement
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ requirement: &id005 !ruby/object:Gem::Requirement
81
78
  requirements:
82
79
  - - "="
83
80
  - !ruby/object:Gem::Version
@@ -86,79 +83,82 @@ dependencies:
86
83
  - 1
87
84
  - 0
88
85
  version: 1.1.0
89
- requirement: *id005
86
+ prerelease: false
87
+ name: yajl-ruby
88
+ type: :runtime
89
+ version_requirements: *id005
90
90
  - !ruby/object:Gem::Dependency
91
+ requirement: &id006 !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ segments:
96
+ - 0
97
+ version: "0"
91
98
  prerelease: false
92
99
  name: shotgun
93
100
  type: :development
94
- version_requirements: &id006 !ruby/object:Gem::Requirement
101
+ version_requirements: *id006
102
+ - !ruby/object:Gem::Dependency
103
+ requirement: &id007 !ruby/object:Gem::Requirement
95
104
  requirements:
96
105
  - - ">="
97
106
  - !ruby/object:Gem::Version
98
107
  segments:
99
108
  - 0
100
109
  version: "0"
101
- requirement: *id006
102
- - !ruby/object:Gem::Dependency
103
110
  prerelease: false
104
111
  name: rack-test
105
112
  type: :development
106
- version_requirements: &id007 !ruby/object:Gem::Requirement
113
+ version_requirements: *id007
114
+ - !ruby/object:Gem::Dependency
115
+ requirement: &id008 !ruby/object:Gem::Requirement
107
116
  requirements:
108
117
  - - ">="
109
118
  - !ruby/object:Gem::Version
110
119
  segments:
111
120
  - 0
112
121
  version: "0"
113
- requirement: *id007
114
- - !ruby/object:Gem::Dependency
115
122
  prerelease: false
116
123
  name: rspec
117
124
  type: :development
118
- version_requirements: &id008 !ruby/object:Gem::Requirement
125
+ version_requirements: *id008
126
+ - !ruby/object:Gem::Dependency
127
+ requirement: &id009 !ruby/object:Gem::Requirement
119
128
  requirements:
120
129
  - - ">="
121
130
  - !ruby/object:Gem::Version
122
131
  segments:
123
132
  - 0
124
133
  version: "0"
125
- requirement: *id008
126
- - !ruby/object:Gem::Dependency
127
134
  prerelease: false
128
135
  name: cucumber
129
136
  type: :development
130
- version_requirements: &id009 !ruby/object:Gem::Requirement
137
+ version_requirements: *id009
138
+ - !ruby/object:Gem::Dependency
139
+ requirement: &id010 !ruby/object:Gem::Requirement
131
140
  requirements:
132
141
  - - ">="
133
142
  - !ruby/object:Gem::Version
134
143
  segments:
135
144
  - 0
136
145
  version: "0"
137
- requirement: *id009
138
- - !ruby/object:Gem::Dependency
139
146
  prerelease: false
140
147
  name: webrat
141
148
  type: :development
142
- version_requirements: &id010 !ruby/object:Gem::Requirement
149
+ version_requirements: *id010
150
+ - !ruby/object:Gem::Dependency
151
+ requirement: &id011 !ruby/object:Gem::Requirement
143
152
  requirements:
144
153
  - - ">="
145
154
  - !ruby/object:Gem::Version
146
155
  segments:
147
156
  - 0
148
157
  version: "0"
149
- requirement: *id010
150
- - !ruby/object:Gem::Dependency
151
158
  prerelease: false
152
159
  name: colorize
153
160
  type: :development
154
- version_requirements: &id011 !ruby/object:Gem::Requirement
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- segments:
159
- - 0
160
- version: "0"
161
- requirement: *id011
161
+ version_requirements: *id011
162
162
  description: 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.
163
163
  email:
164
164
  - lindsay@holmwood.id.au
@@ -215,6 +215,8 @@ files:
215
215
  - lib/visage-app/public/images/search.png
216
216
  - lib/visage-app/public/javascripts/builder.js
217
217
  - lib/visage-app/public/javascripts/graph.js
218
+ - lib/visage-app/public/javascripts/highcharts-mootools-adapter.js
219
+ - lib/visage-app/public/javascripts/highcharts-mootools-adapter.src.js
218
220
  - lib/visage-app/public/javascripts/highcharts.js
219
221
  - lib/visage-app/public/javascripts/highcharts.src.js
220
222
  - lib/visage-app/public/javascripts/keyboard.js