pencil 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.rb +1 -1
- data/lib/dash.rb +25 -16
- data/lib/helpers.rb +23 -12
- data/lib/models/graph.rb +3 -2
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_20_333333_1x400.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_000000_1x400.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_glass_40_ffc73d_1x400.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_15_000000_1x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-bg_inset-soft_30_ff4e0a_1x100.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-icons_222222_256x240.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-icons_4b8e0b_256x240.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-icons_a83300_256x240.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-icons_cccccc_256x240.png +0 -0
- data/lib/public/css/jquery_themes/pencil/images/ui-icons_ffffff_256x240.png +0 -0
- data/lib/public/css/jquery_themes/pencil/jquery-ui-1.8.16.custom.css +568 -0
- data/lib/public/css/thedoc.css +316 -0
- data/lib/public/js/cufon.js +7 -0
- data/lib/public/js/gotham.font.js +40 -0
- data/lib/public/js/jquery-1.6.2.min.js +18 -0
- data/lib/public/js/jquery-ui-1.8.16.custom.min.js +791 -0
- data/lib/public/js/pencil.js +89 -0
- data/lib/public/js/product-design.font.js +8 -0
- data/lib/views/cluster.erb +6 -2
- data/lib/views/dash-cluster-zoom.erb +14 -14
- data/lib/views/dash-cluster.erb +11 -12
- data/lib/views/dash-global-zoom.erb +14 -16
- data/lib/views/dash-global.erb +10 -10
- data/lib/views/global.erb +11 -5
- data/lib/views/host.erb +7 -7
- data/lib/views/layout.erb +63 -49
- data/lib/views/partials/cluster_selector.erb +1 -1
- data/lib/views/partials/cluster_switcher.erb +13 -13
- data/lib/views/partials/dash_switcher.erb +12 -11
- data/lib/views/partials/graph_switcher.erb +12 -11
- data/lib/views/partials/hosts_selector.erb +2 -2
- data/lib/views/partials/input_boxes.erb +35 -24
- data/lib/views/partials/shortcuts.erb +5 -0
- metadata +49 -26
- data/lib/views/partials/cookies_form.erb +0 -12
- 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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<%= if @cluster == "global"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
<
|
2
|
-
dashboards
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
<
|
2
|
-
graphs
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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}]
|
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
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<
|
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>
|
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:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
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-
|
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:
|
57
|
+
hash: 19
|
58
58
|
segments:
|
59
|
-
-
|
60
|
-
|
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/
|
119
|
-
- lib/
|
120
|
-
- lib/
|
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/
|
145
|
+
- lib/models/host.rb
|
123
146
|
- lib/models/graph.rb
|
147
|
+
- lib/models/dashboard.rb
|
124
148
|
- lib/models/base.rb
|
125
|
-
- lib/
|
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/
|
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/
|
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.
|
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>
|