ifttt-gdash 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/gdash.rb +56 -0
- data/lib/gdash/dashboard.rb +52 -0
- data/lib/gdash/monkey_patches.rb +37 -0
- data/lib/gdash/sinatra_app.rb +202 -0
- data/public/js/bootstrap-alerts.js +104 -0
- data/public/js/bootstrap-dropdown.js +50 -0
- data/public/js/bootstrap-modal.js +238 -0
- data/public/js/bootstrap-popover.js +77 -0
- data/public/js/bootstrap-scrollspy.js +105 -0
- data/public/js/bootstrap-tabs.js +62 -0
- data/public/js/bootstrap-twipsy.js +307 -0
- data/public/js/jquery-1.5.2.min.js +16 -0
- data/public/js/jquery.tablesorter.min.js +4 -0
- data/public/js/less-1.1.3.min.js +16 -0
- data/public/lib/bootstrap.less +26 -0
- data/public/lib/forms.less +465 -0
- data/public/lib/mixins.less +217 -0
- data/public/lib/patterns.less +1006 -0
- data/public/lib/reset.less +141 -0
- data/public/lib/scaffolding.less +135 -0
- data/public/lib/tables.less +170 -0
- data/public/lib/type.less +187 -0
- data/public/lib/variables.less +60 -0
- data/sample/README.md +5 -0
- data/sample/email-full-screen.png +0 -0
- data/sample/email.png +0 -0
- data/sample/email/cpu.graph +19 -0
- data/sample/email/dash.yaml +2 -0
- data/sample/email/io.graph +12 -0
- data/sample/email/load.graph +6 -0
- data/sample/email/network.graph +11 -0
- data/views/README.md +177 -0
- data/views/_interval_filter.erb +5 -0
- data/views/dashboard.erb +47 -0
- data/views/detailed_dashboard.erb +45 -0
- data/views/full_size_dashboard.erb +36 -0
- data/views/index.erb +18 -0
- data/views/layout.erb +66 -0
- metadata +55 -17
data/views/index.erb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
<% unless @error %>
|
2
|
+
<% @top_level.keys.sort.each do |key| %>
|
3
|
+
<h2> <%= key.capitalize %> </h2>
|
4
|
+
<table>
|
5
|
+
<thead>
|
6
|
+
<th width="30%">Name</th>
|
7
|
+
<th width="70%">Description</th>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @top_level[key].dashboards.reject{|b| b[:hidden]}.sort_by{|b| b[:name].to_s}.each do |board| %>
|
11
|
+
<tr>
|
12
|
+
<td><a href="<%= [@prefix, key, board[:link]].join('/') %>/"><%= board[:name] %></a></td><td><%= board[:description] %></td>
|
13
|
+
</tr>
|
14
|
+
<% end %>
|
15
|
+
</tbody>
|
16
|
+
</table>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
data/views/layout.erb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<link rel="stylesheet/less" type="text/css" href="<%= @prefix %>/lib/bootstrap.less">
|
4
|
+
<script src="<%= @prefix %>/js/less-1.1.3.min.js" type="text/javascript"></script>
|
5
|
+
<script src="<%= @prefix %>/js/jquery-1.5.2.min.js"></script>
|
6
|
+
<script src="<%= @prefix %>/js/jquery.tablesorter.min.js"></script>
|
7
|
+
<script src="<%= @prefix %>/js/bootstrap-twipsy.js"></script>
|
8
|
+
<script src="<%= @prefix %>/js/bootstrap-scrollspy.js"></script>
|
9
|
+
<script src="<%= @prefix %>/js/bootstrap-dropdown.js"></script>
|
10
|
+
<script src="<%= @prefix %>/js/bootstrap-popover.js"></script>
|
11
|
+
<title><%= @dash_title %></title>
|
12
|
+
</head>
|
13
|
+
<body style="padding-top: 80px;">
|
14
|
+
<div class="topbar-wrapper" style="z-index: 5;">
|
15
|
+
<div class="topbar" data-dropdown="dropdown" >
|
16
|
+
<div class="topbar-inner">
|
17
|
+
<div class="container">
|
18
|
+
<h3><a href="<%= @prefix %>/"><%= @dash_title %></a></h3>
|
19
|
+
<ul class="nav">
|
20
|
+
<% @top_level.keys.sort.each do |category| %>
|
21
|
+
<li class="dropdown">
|
22
|
+
<a href="#" class="dropdown-toggle"><%= category.capitalize %></a>
|
23
|
+
<ul class="dropdown-menu">
|
24
|
+
<% @top_level[category].dashboards.reject{|b| b[:hidden]}.sort_by{|b| b[:name].to_s}.each do |board| %>
|
25
|
+
<li><a href="<%= [@prefix, category, board[:link]].join('/') %>/"><%= board[:name] %></a></li>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
28
|
+
</li>
|
29
|
+
<% end %>
|
30
|
+
</ul>
|
31
|
+
<ul class="nav secondary-nav">
|
32
|
+
<li><a href="<%= @graphite_base %>">Data Browser</a></li>
|
33
|
+
</ul>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="container">
|
40
|
+
<% if @error %>
|
41
|
+
<div class="alert-message error">
|
42
|
+
<%= @error %>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
<%= yield %>
|
46
|
+
</div>
|
47
|
+
<div class="container">
|
48
|
+
<h6 id="updated"></h6>
|
49
|
+
</div>
|
50
|
+
<script>
|
51
|
+
$(document).ready(function() {
|
52
|
+
var now = new Date();
|
53
|
+
$('#updated').text('Updated ' + now.toLocaleString())
|
54
|
+
setInterval(reloadDash, <%= @refresh_rate * 1000 %>);
|
55
|
+
});
|
56
|
+
function reloadDash() {
|
57
|
+
var now = new Date();
|
58
|
+
$('img').each(function(index) {
|
59
|
+
var url = $(this).attr('src').replace(/&\d+$/, '');
|
60
|
+
$(this).attr('src', url + '&' + now.getTime());
|
61
|
+
});
|
62
|
+
$('#updated').text('Updated ' + now.toLocaleString())
|
63
|
+
}
|
64
|
+
</script>
|
65
|
+
</body>
|
66
|
+
</html>
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ifttt-gdash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
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-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: graphite_graph
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.0.8
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.0.8
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sinatra
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: redcarpet
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: A simple dashboard for creating and displaying Graphite graphs
|
@@ -85,7 +85,45 @@ email: rip@devco.net
|
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files: []
|
88
|
-
files:
|
88
|
+
files:
|
89
|
+
- lib/gdash.rb
|
90
|
+
- lib/gdash/dashboard.rb
|
91
|
+
- lib/gdash/monkey_patches.rb
|
92
|
+
- lib/gdash/sinatra_app.rb
|
93
|
+
- public/js/bootstrap-alerts.js
|
94
|
+
- public/js/bootstrap-dropdown.js
|
95
|
+
- public/js/bootstrap-modal.js
|
96
|
+
- public/js/bootstrap-popover.js
|
97
|
+
- public/js/bootstrap-scrollspy.js
|
98
|
+
- public/js/bootstrap-tabs.js
|
99
|
+
- public/js/bootstrap-twipsy.js
|
100
|
+
- public/js/jquery-1.5.2.min.js
|
101
|
+
- public/js/jquery.tablesorter.min.js
|
102
|
+
- public/js/less-1.1.3.min.js
|
103
|
+
- public/lib/bootstrap.less
|
104
|
+
- public/lib/forms.less
|
105
|
+
- public/lib/mixins.less
|
106
|
+
- public/lib/patterns.less
|
107
|
+
- public/lib/reset.less
|
108
|
+
- public/lib/scaffolding.less
|
109
|
+
- public/lib/tables.less
|
110
|
+
- public/lib/type.less
|
111
|
+
- public/lib/variables.less
|
112
|
+
- sample/README.md
|
113
|
+
- sample/email-full-screen.png
|
114
|
+
- sample/email.png
|
115
|
+
- sample/email/cpu.graph
|
116
|
+
- sample/email/dash.yaml
|
117
|
+
- sample/email/io.graph
|
118
|
+
- sample/email/load.graph
|
119
|
+
- sample/email/network.graph
|
120
|
+
- views/README.md
|
121
|
+
- views/_interval_filter.erb
|
122
|
+
- views/dashboard.erb
|
123
|
+
- views/detailed_dashboard.erb
|
124
|
+
- views/full_size_dashboard.erb
|
125
|
+
- views/index.erb
|
126
|
+
- views/layout.erb
|
89
127
|
homepage: http://devco.net/
|
90
128
|
licenses: []
|
91
129
|
metadata: {}
|
@@ -96,12 +134,12 @@ require_paths:
|
|
96
134
|
- lib
|
97
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
136
|
requirements:
|
99
|
-
- -
|
137
|
+
- - ">="
|
100
138
|
- !ruby/object:Gem::Version
|
101
139
|
version: '0'
|
102
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
141
|
requirements:
|
104
|
-
- -
|
142
|
+
- - ">="
|
105
143
|
- !ruby/object:Gem::Version
|
106
144
|
version: '0'
|
107
145
|
requirements: []
|