prisma 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/prisma/server/views/index.erb +85 -0
  2. metadata +3 -2
@@ -0,0 +1,85 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>Prisma</title>
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <link href="<%= url('/bootstrap.min.css') %>" rel="stylesheet">
8
+ <link href="<%= url('/bootstrap-responsive.min.css') %>" rel="stylesheet">
9
+ <link href="<%= url('/style.css') %>" rel="stylesheet">
10
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
11
+ <script type="text/javascript">
12
+ google.load('visualization', '1', {packages:['corechart']});
13
+ </script>
14
+ </head>
15
+ <body>
16
+ <div id="rainbow">
17
+ <div class="rainbow-color red"></div>
18
+ <div class="rainbow-color orange"></div>
19
+ <div class="rainbow-color yellow"></div>
20
+ <div class="rainbow-color green"></div>
21
+ <div class="rainbow-color blue"></div>
22
+ <div class="rainbow-color indigo"></div>
23
+ <div class="rainbow-color violet"></div>
24
+ </div>
25
+
26
+ <div class="navbar navbar-fixed-top">
27
+ <div class="navbar-inner">
28
+ <div class="container">
29
+ <a class="brand" href="<%= url('/') %>">Prisma</a>
30
+ <div class="nav-collapse">
31
+ <ul class="nav">
32
+ <li<%= " class=\"active\"" if request.path_info == '/daily' %>><a href="<%= url('/daily') %>">Daily</a></li>
33
+ <li<%= " class=\"active\"" if request.path_info == '/weekly' %>><a href="<%= url('/weekly') %>">Weekly</a></li>
34
+ <li<%= " class=\"active\"" if request.path_info == '/monthly' %>><a href="<%= url('/monthly') %>">Monthly</a></li>
35
+ </ul>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="container">
42
+ <% @groups.each_with_index do |item, index| %>
43
+ <% group = item[0] %>
44
+
45
+ <% if index.even? %>
46
+ <div class="row-fluid">
47
+ <% end %>
48
+
49
+ <div class="span6">
50
+ <h3><%= group.name.humanize %></h3>
51
+ <em><%= group.description %></em>
52
+ <div id="<%= group.name %>_chart"></div>
53
+ </div>
54
+
55
+ <% if index.odd? %>
56
+ </div>
57
+ <% end %>
58
+ <% end %>
59
+ </div>
60
+
61
+ <script type="text/javascript">
62
+ function drawCharts() {
63
+ var options = {
64
+ backgroundColor: { fill: '#f5faff' },
65
+ fontName: 'Helvetica',
66
+ legend: { position: 'none' },
67
+ pointSize: 4,
68
+ series: [{ color: '#ff8000' }]
69
+ }
70
+
71
+ <% @groups.each do |group, values| %>
72
+ var data_<%= group.name %> = google.visualization.arrayToDataTable([
73
+ <% values.each do |date, value| %>
74
+ ['<%= date.strftime(@date_format) %>', <%= value %>],
75
+ <% end %>
76
+ ]);
77
+ var chart_<%= group.name %> = new google.visualization.ColumnChart(document.getElementById('<%= group.name %>_chart'));
78
+ chart_<%= group.name %>.draw(data_<%= group.name %>, options);
79
+ <% end %>
80
+ }
81
+ google.setOnLoadCallback(drawCharts);
82
+ </script>
83
+ </body>
84
+ </html>
85
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prisma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -298,6 +298,7 @@ files:
298
298
  - lib/prisma/group.rb
299
299
  - lib/prisma/railtie.rb
300
300
  - lib/prisma/server.rb
301
+ - lib/prisma/server/views/index.erb
301
302
  - LICENSE.txt
302
303
  - README.md
303
304
  homepage: https://github.com/chdorner/prisma
@@ -315,7 +316,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
316
  version: '0'
316
317
  segments:
317
318
  - 0
318
- hash: -2724509723049501504
319
+ hash: -1204014802116962448
319
320
  required_rubygems_version: !ruby/object:Gem::Requirement
320
321
  none: false
321
322
  requirements: