ifttt-gdash 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a905ac9bf55f0dcf3f1e033d6f994592f453578f
4
- data.tar.gz: 668819d176f3a2e3ac0a0971d73bc7bfa1839ad3
3
+ metadata.gz: d1a7c1fdee64cd7ac57e17a7239c6620c83d124f
4
+ data.tar.gz: f5c4996cc9a94c054ba1b92c989ca56e41e672e9
5
5
  SHA512:
6
- metadata.gz: b3924408b437fcadd12d50a1900266fb002e18177285b9690162dc2bf2dd55a257f315e1a73764411fa435d7ae0625d458ba82226c0f4f67af1f277a698cd478
7
- data.tar.gz: 21a0514bb3ccfa2c553cf73fa1f9dcd67af640935865b6fec76bde7e5734f856a237fa1266b1b6b1ffc0064e4170f3df1e01d89bf205bae9e547f49a3820d73d
6
+ metadata.gz: 343bae5e82a87903ca8e34a8c37baf7da7add1e2355f2f371864fa86445a7c3fc6529e37c58acb2db6d3a0975a437d983f423a6a6e4470da34ea32c6696d62a8
7
+ data.tar.gz: 809fc4c849ef3ec45cef655c202d75c3ae6df85230610ab2e92d823687b00f540fb7246199ae1c6109e14da79df3fdadb689cf924657b7fb0612bfa0ccd3f5a5
@@ -13,13 +13,13 @@
13
13
  <% i = grouped_graphs.rindex(graphs) * @graph_columns + graphs.rindex(graph) %>
14
14
  <td>
15
15
  <% if graph %>
16
- <% if graph[:graphite][:description] %>
17
- <a href='<%= uri_to_details(i) %>'>
18
- <img src='<%= [@top_level[@params[:category]].graphite_render, graph[:graphite][:url].to_s.force_encoding('UTF-8')].join "?" %>' rel="<%= row == 1 ? 'popover-below' : 'popover-above' %>" title="<%= graph[:graphite][:title] %>" data-content="<%= graph[:graphite][:description] %>"></a>
19
- <% else %>
20
- <a href='<%= uri_to_details(i) %>'>
21
- <img src='<%= [@top_level[@params[:category]].graphite_render, graph[:graphite][:url]].join "?" %>'></a>
22
- <% end %>
16
+ <% img_base_url = [@top_level[@params[:category]].graphite_render, graph[:graphite][:url].to_s.force_encoding('UTF-8')].join "?" %>
17
+ <% graphlot_url = URI.parse(img_base_url).tap{|x| x.path = "/graphlot/"}.to_s %>
18
+ <a href='<%= uri_to_details(i) %>'>
19
+ <%# We have to doubly-escape the title and description. The first escape will allow both the values %>
20
+ <%# to safely fit in the attribute (which prevents injecting HTML around the img tag). The second escape
21
+ <%# prevents using those properties to inject HTML into the popover itself. %>
22
+ <img src='<%= img_base_url %>' rel="<%= row == 1 ? 'popover-below' : 'popover-above' %>" title="<%= h(h(graph[:graphite][:title])) %>" data-content="<%= h(h(graph[:graphite][:description])) %>&lt;div&gt;&lt;a href='<%= graphlot_url %>'&gt;Go to Graphlot&lt;/a&gt;&lt;/div&gt;"></a>
23
23
  <%= graph_caption(graph) %>
24
24
  <% end %>
25
25
  </td>
@@ -33,14 +33,14 @@
33
33
  $(function () {
34
34
  $("img[rel=popover-above]")
35
35
  .popover({
36
- placement: "above", delayIn: 1000
36
+ placement: "above", delayIn: 1000, delayOut: 1000, html: true
37
37
  })
38
38
  })
39
39
 
40
40
  $(function () {
41
41
  $("img[rel=popover-below]")
42
42
  .popover({
43
- placement: "below", delayIn: 1000
43
+ placement: "below", delayIn: 1000, delayOut: 1000, html: true
44
44
  })
45
45
  })
46
46
  </script>
@@ -8,11 +8,12 @@
8
8
  <% graphrows.each do |graph| %>
9
9
  <td>
10
10
  <% if graph %>
11
- <% if graph[:description] %>
12
- <img src='<%= [@top_level[@params[:category]].graphite_render, graph[:url]].join "?" %>' rel="<%= row == 1 ? 'popover-below' : 'popover-above' %>" title="<%= graph[:title] %>" data-content="<%= graph[:description] %>">
13
- <% else %>
14
- <img src='<%= [@top_level[@params[:category]].graphite_render, graph[:url]].join "?" %>'>
15
- <% end %>
11
+ <% img_base_url = [@top_level[@params[:category]].graphite_render, graph[:url]].join "?" %>
12
+ <% graphlot_url = URI.parse(img_base_url).tap{|x| x.path = "/graphlot/"}.to_s %>
13
+ <%# We have to doubly-escape the title and description. The first escape will allow both the values %>
14
+ <%# to safely fit in the attribute (which prevents injecting HTML around the img tag). The second escape
15
+ <%# prevents using those properties to inject HTML into the popover itself. %>
16
+ <img src='<%= img_base_url %>' rel="<%= row == 1 ? 'popover-below' : 'popover-above' %>" title="<%= h(h(graph[:title])) %>" data-content="<%= h(h(graph[:description])) %>&lt;div&gt;&lt;a href='<%= graphlot_url %>'&gt;Go to Graphlot&lt;/a&gt;&lt;/div&gt;">
16
17
  <% end %>
17
18
  </td>
18
19
  <% end %>
@@ -25,7 +26,7 @@
25
26
  $(function () {
26
27
  $("img[rel=popover-above]")
27
28
  .popover({
28
- placement: "above", delayIn: 1000
29
+ placement: "above", delayIn: 1000, delayOut: 1000, html: true
29
30
  })
30
31
  .click(function(e) {
31
32
  e.preventDefault()
@@ -35,7 +36,7 @@
35
36
  $(function () {
36
37
  $("img[rel=popover-below]")
37
38
  .popover({
38
- placement: "below", delayIn: 1000
39
+ placement: "below", delayIn: 1000, delayOut: 1000, html: true
39
40
  })
40
41
  .click(function(e) {
41
42
  e.preventDefault()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ifttt-gdash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.I.Pienaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake