pencil 0.2.9 → 0.2.10

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.
Files changed (44) hide show
  1. data/VERSION.rb +1 -1
  2. data/lib/dash.rb +25 -16
  3. data/lib/helpers.rb +23 -12
  4. data/lib/models/graph.rb +3 -2
  5. data/lib/public/css/jquery_themes/pencil/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
  6. data/lib/public/css/jquery_themes/pencil/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
  7. data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_20_333333_1x400.png +0 -0
  8. data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_000000_1x400.png +0 -0
  9. data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
  10. data/lib/public/css/jquery_themes/pencil/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
  11. data/lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_15_000000_1x100.png +0 -0
  12. data/lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
  13. data/lib/public/css/jquery_themes/pencil/images/ui-bg_inset-soft_30_ff4e0a_1x100.png +0 -0
  14. data/lib/public/css/jquery_themes/pencil/images/ui-icons_222222_256x240.png +0 -0
  15. data/lib/public/css/jquery_themes/pencil/images/ui-icons_4b8e0b_256x240.png +0 -0
  16. data/lib/public/css/jquery_themes/pencil/images/ui-icons_a83300_256x240.png +0 -0
  17. data/lib/public/css/jquery_themes/pencil/images/ui-icons_cccccc_256x240.png +0 -0
  18. data/lib/public/css/jquery_themes/pencil/images/ui-icons_ffffff_256x240.png +0 -0
  19. data/lib/public/css/jquery_themes/pencil/jquery-ui-1.8.16.custom.css +568 -0
  20. data/lib/public/css/thedoc.css +316 -0
  21. data/lib/public/js/cufon.js +7 -0
  22. data/lib/public/js/gotham.font.js +40 -0
  23. data/lib/public/js/jquery-1.6.2.min.js +18 -0
  24. data/lib/public/js/jquery-ui-1.8.16.custom.min.js +791 -0
  25. data/lib/public/js/pencil.js +89 -0
  26. data/lib/public/js/product-design.font.js +8 -0
  27. data/lib/views/cluster.erb +6 -2
  28. data/lib/views/dash-cluster-zoom.erb +14 -14
  29. data/lib/views/dash-cluster.erb +11 -12
  30. data/lib/views/dash-global-zoom.erb +14 -16
  31. data/lib/views/dash-global.erb +10 -10
  32. data/lib/views/global.erb +11 -5
  33. data/lib/views/host.erb +7 -7
  34. data/lib/views/layout.erb +63 -49
  35. data/lib/views/partials/cluster_selector.erb +1 -1
  36. data/lib/views/partials/cluster_switcher.erb +13 -13
  37. data/lib/views/partials/dash_switcher.erb +12 -11
  38. data/lib/views/partials/graph_switcher.erb +12 -11
  39. data/lib/views/partials/hosts_selector.erb +2 -2
  40. data/lib/views/partials/input_boxes.erb +35 -24
  41. data/lib/views/partials/shortcuts.erb +5 -0
  42. metadata +49 -26
  43. data/lib/views/partials/cookies_form.erb +0 -12
  44. data/lib/views/partials/refresh_button.erb +0 -8
@@ -1,4 +1,4 @@
1
- <select class="select2" onchange="window.open(this.options[this.selectedIndex].value,'_top')">
1
+ <select class="select2 inline-dropdown" onchange="window.open(this.options[this.selectedIndex].value,'_top')">
2
2
  <option value="/dash/<%= append_query_string(@cluster) %>" selected="selected"><%= @cluster %></option>
3
3
  <% (@clusters - [@cluster]).each do |c| %>
4
4
  <option value="/dash/<%= append_query_string(c) %>"><%= c %></option>
@@ -1,13 +1,13 @@
1
- clusters:
2
- <%= @clusters.sort.collect do |c|
3
- sub = append_query_string(request.path.sub(@cluster, c))
4
- @cluster == c ? "#{c}" : "<a href=\"#{sub}\">#{c}</a>"
5
- end.join(" ") %>
6
-
7
- <%= if @cluster == "global"
8
- " (global)"
9
- else
10
- # this sub works because the cluster should be first
11
- " <a href=\"#{append_query_string(request.path.sub(@cluster, 'global'))}\">(global)</a>"
12
- end %>
13
- <br>
1
+ <div class="group_container ui-corner-top first">
2
+ <h4>clusters:</h4>
3
+ <%= @clusters.sort.collect do |c|
4
+ sub = append_query_string(request.path.sub(@cluster, c))
5
+ @cluster == c ? "#{c}" : "<a href=\"#{sub}\">#{c}</a>"
6
+ end.join(" ") %>
7
+ <%= if @cluster == "global"
8
+ " (global)"
9
+ else
10
+ # this sub works because the cluster should be first
11
+ " <a href=\"#{append_query_string(request.path.sub(@cluster, 'global'))}\">(global)</a>"
12
+ end %>
13
+ </div>
@@ -1,11 +1,12 @@
1
- <span class="graphtitle">
2
- dashboards:
3
- <%= @dashboards.select do |d|
4
- @cluster == "global" || d.clusters.member?(@cluster)
5
- end.sort.collect do |d|
6
- # this works unless you have a cluster with the same name as a dashboard
7
- sub = append_query_string(request.path.sub(@dash.name, d.name))
8
- @dash == d ? "#{d}" : "<a href=\"#{sub}\">#{d}</a>"
9
- end.join(" ") %>
10
- </span>
11
- <br>
1
+ <div class="group_container ui-corner-bottom last">
2
+ <h4>dashboards:</h4>
3
+ <span class="graphtitle">
4
+ <%= @dashboards.select do |d|
5
+ @cluster == "global" || d.clusters.member?(@cluster)
6
+ end.sort.collect do |d|
7
+ # this works unless you have a cluster with the same name as a dashboard
8
+ sub = append_query_string(request.path.sub(@dash.name, d.name))
9
+ @dash == d ? "#{d}" : "<a href=\"#{sub}\">#{d}</a>"
10
+ end.join(" ") %>
11
+ </span>
12
+ </div>
@@ -1,11 +1,12 @@
1
- <span class="graphtitle">
2
- graphs:
3
- <%= @dash.graphs.map { |g| g.name }.collect do |g|
4
- reversed = request.path.split("/").reverse
5
- i = reversed.index(@zoom.name)
6
- reversed[i] = g
7
- sub = append_query_string(reversed.reverse.join('/'))
8
- @zoom.name == g ? "#{g}" : "<a href=\"#{sub}\">#{g}</a>"
9
- end.join(" ") %>
10
- </span>
11
- <br>
1
+ <div class="group_container ui-corner-bottom last">
2
+ <h4>graphs:</h4>
3
+ <span class="graphtitle">
4
+ <%= @dash.graphs.map { |g| g.name }.collect do |g|
5
+ reversed = request.path.split("/").reverse
6
+ i = reversed.index(@zoom.name)
7
+ reversed[i] = g
8
+ sub = append_query_string(reversed.reverse.join('/'))
9
+ @zoom.name == g ? "#{g}" : "<a href=\"#{sub}\">#{g}</a>"
10
+ end.join(" ") %>
11
+ </span>
12
+ </div>
@@ -2,8 +2,8 @@
2
2
  <option value="">-select host-</option>
3
3
  <% @hosts.sort.each do |h|
4
4
  option = "#{h.name}"
5
- option << " [#{h.cluster}] " if @print_clusters
6
- value = append_query_string("/host/#{h.cluster}/#{h}") %>
5
+ option << " [#{h.cluster}]" if @print_clusters
6
+ value = append_query_string("/host/#{h.cluster}/#{h}") -%>
7
7
  <option value="<%= value %>" <%= "selected=\"selected\"" if @host == h %>><%= option %></option>
8
8
  <% end %>
9
9
  </select>
@@ -1,25 +1,36 @@
1
- <form name="input" method="get"><table style="font-size:small;">
2
- <% @prefs.each do |label, name|
3
- val = param_lookup(name) %>
4
- <tr>
5
- <td><%= label %>:</td>
6
- <td><nobr><input <%= "value=\"#{val}\" " if val %>size="<%= name =~ /start|duration/ ? 10 : 4 %>" type="text" name="<%= name %>">
7
- <% if name == "start" %>
8
- <a href="http://chronic.rubyforge.org/" target="_blank">?</a>
9
- <% elsif name == "duration" %>
10
- <a href="https://github.com/hpoydar/chronic_duration" target="_blank">?</a>
11
- <% end %></nobr>
12
- <%= if name == "start"
13
- "<div class=\"error\">Bad Time!</a>" unless \
14
- Chronic.parse(param_lookup(name))
15
- elsif name == "duration" && param_lookup(name)
16
- "<div class=\"error\">Bad Interval!</a>" unless \
17
- ChronicDuration.parse(param_lookup(name))
18
- end %>
19
- </td>
20
- </tr>
1
+ <div class="nav-box ui-corner-all" id="settings">
2
+ <h3 class="ui-corner-top ui-state-default">Graph Settings</h3>
3
+ <div class="nav-box-inner">
4
+ <form action="/process" name="input" method="get">
5
+ <% @prefs.each do |label, name|
6
+ val = param_lookup(name) %>
7
+ <label for="<%= name%>"><%= label%></label>
8
+ <input <%= "value=\"#{val}\" " if val %> size="<%= name =~ /start|duration/ ? 10 : 4 %>" name="<%= name %>" id="<%= name %>" type="text"/>
9
+ <% if name == "start" %>
10
+ <a href="http://chronic.rubyforge.org/" class="inline-link" target="_blank">
11
+ <% if Chronic.parse(param_lookup(name)) %>
12
+ ?
13
+ <% else %>
14
+ <div class="error">Bad timespec!</div>
15
+ <% end %>
16
+ </a>
17
+ <% elsif name == "duration" %>
18
+ <a href="https://github.com/hpoydar/chronic_duration" class="inline-link" target="_blank">
19
+ <% if !param_lookup(name) || ChronicDuration.parse(param_lookup(name)) %>
20
+ ?
21
+ <% else %>
22
+ <div class="error">Bad interval!</div>
23
+ <% end %>
24
+ </a>
21
25
  <% end %>
22
- </table> <input type="submit" value="Submit">
23
- </form>
24
-
25
- <form method="get"> <input type="submit" value="Clear"></form>
26
+ <% end %>
27
+ <div class="button-holder">
28
+ <input class="ui-state-default ui-corner-all ui-button" type="submit" value="Submit" name="action" />
29
+ <input class="ui-state-default ui-corner-all ui-button" type="submit" value="Clear" name="action" /><br>
30
+ <input class="ui-state-default ui-corner-all ui-button" type="submit" value="Save" name="action" />
31
+ <input class="ui-state-default ui-corner-all ui-button" type="submit" value="Reset" name="action" />
32
+ </div>
33
+ </form>
34
+ <div style="clear:both;"></div>
35
+ </div>
36
+ </div>
@@ -0,0 +1,5 @@
1
+ <div class="group_container_small ui-corner-all">
2
+ <h4>shortcuts:</h4>
3
+ <%= @str %>
4
+ </div>
5
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pencil
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 9
10
- version: 0.2.9
9
+ - 10
10
+ version: 0.2.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pete Fritchman
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-17 00:00:00 Z
19
+ date: 2011-11-21 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: mongrel
@@ -52,12 +52,14 @@ dependencies:
52
52
  requirement: &id003 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
- - - ">="
55
+ - - "="
56
56
  - !ruby/object:Gem::Version
57
- hash: 3
57
+ hash: 19
58
58
  segments:
59
- - 0
60
- version: "0"
59
+ - 1
60
+ - 2
61
+ - 6
62
+ version: 1.2.6
61
63
  type: :runtime
62
64
  version_requirements: *id003
63
65
  - !ruby/object:Gem::Dependency
@@ -115,38 +117,59 @@ extra_rdoc_files: []
115
117
  files:
116
118
  - VERSION.rb
117
119
  - lib/models.rb
118
- - lib/config.ru
119
- - lib/helpers.rb
120
- - lib/dash.rb
120
+ - lib/public/js/jquery-ui-1.8.16.custom.min.js
121
+ - lib/public/js/jquery-1.6.2.min.js
122
+ - lib/public/js/cufon.js
123
+ - lib/public/js/product-design.font.js
124
+ - lib/public/js/pencil.js
125
+ - lib/public/js/gotham.font.js
126
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
127
+ - lib/public/css/jquery_themes/pencil/images/ui-icons_a83300_256x240.png
128
+ - lib/public/css/jquery_themes/pencil/images/ui-icons_cccccc_256x240.png
129
+ - lib/public/css/jquery_themes/pencil/images/ui-icons_4b8e0b_256x240.png
130
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_gloss-wave_25_333333_500x100.png
131
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_inset-soft_30_ff4e0a_1x100.png
132
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_000000_1x400.png
133
+ - lib/public/css/jquery_themes/pencil/images/ui-icons_ffffff_256x240.png
134
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_glass_20_333333_1x400.png
135
+ - lib/public/css/jquery_themes/pencil/images/ui-icons_222222_256x240.png
136
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_flat_50_5c5c5c_40x100.png
137
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_15_000000_1x100.png
138
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_flat_30_cccccc_40x100.png
139
+ - lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_ffc73d_1x400.png
140
+ - lib/public/css/jquery_themes/pencil/jquery-ui-1.8.16.custom.css
141
+ - lib/public/css/thedoc.css
142
+ - lib/public/style.css
143
+ - lib/public/favicon.ico
121
144
  - lib/config.rb
122
- - lib/models/dashboard.rb
145
+ - lib/models/host.rb
123
146
  - lib/models/graph.rb
147
+ - lib/models/dashboard.rb
124
148
  - lib/models/base.rb
125
- - lib/models/host.rb
126
- - lib/views/dash-global.erb
127
- - lib/views/host.erb
128
- - lib/views/dash-cluster-zoom.erb
149
+ - lib/views/cluster.erb
129
150
  - lib/views/global.erb
130
- - lib/views/layout.erb
151
+ - lib/views/dash-cluster-zoom.erb
131
152
  - lib/views/dash-global-zoom.erb
153
+ - lib/views/dash-global.erb
154
+ - lib/views/host.erb
132
155
  - lib/views/partials/graph_switcher.erb
133
156
  - lib/views/partials/hosts_selector.erb
134
- - lib/views/partials/cluster_switcher.erb
135
- - lib/views/partials/refresh_button.erb
136
- - lib/views/partials/cookies_form.erb
137
- - lib/views/partials/dash_switcher.erb
138
157
  - lib/views/partials/input_boxes.erb
158
+ - lib/views/partials/shortcuts.erb
139
159
  - lib/views/partials/cluster_selector.erb
140
- - lib/views/cluster.erb
160
+ - lib/views/partials/cluster_switcher.erb
161
+ - lib/views/partials/dash_switcher.erb
162
+ - lib/views/layout.erb
141
163
  - lib/views/dash-cluster.erb
142
- - lib/public/style.css
143
- - lib/public/favicon.ico
144
164
  - lib/rubyfixes.rb
145
165
  - lib/namespace.rb
166
+ - lib/helpers.rb
167
+ - lib/dash.rb
168
+ - lib/config.ru
146
169
  - docs/pencil_options.md
147
- - examples/dashboards.yml
148
170
  - examples/pencil.yml
149
171
  - examples/graphs.yml
172
+ - examples/dashboards.yml
150
173
  - bin/pencil
151
174
  homepage: https://github.com/fetep/pencil
152
175
  licenses:
@@ -177,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
200
  requirements: []
178
201
 
179
202
  rubyforge_project:
180
- rubygems_version: 1.7.2
203
+ rubygems_version: 1.8.11
181
204
  signing_key:
182
205
  specification_version: 3
183
206
  summary: pencil -- Graphite dashboard system
@@ -1,12 +0,0 @@
1
- <form action="/saveprefs" name="input" method="get">
2
- <div class="invisible">
3
- <% @prefs.each do |label, name| %>
4
- <%= "<input value=\"#{params[name]}\" name=\"#{name}\"><br>" if params[name] %>
5
- <% end %>
6
- </div>
7
- <input type="submit" value="save preferences in a cookie">
8
- </form>
9
-
10
- <form action="/clear" name="clear" method="get">
11
- <input type="submit" value="clear cookies">
12
- </form>
@@ -1,8 +0,0 @@
1
- <form action="<%= request.path %>" name="input" method="get">
2
- <input type="submit" value="Refresh">
3
- <div class="invisible">
4
- <% @prefs.each do |label, name| %>
5
- <%= "<input value=\"#{params[name]}\" name=\"#{name}\"><br>" if params[name] %>
6
- <% end %>
7
- </div>
8
- </form>