dj_mon 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -4
- data/app/assets/javascripts/dj_mon.js +5 -5
- data/app/assets/stylesheets/dj_mon.css +1 -1
- data/app/models/dj_mon/dj_report.rb +1 -1
- data/lib/dj_mon/version.rb +1 -1
- metadata +2 -8
- data/app/assets/javascripts/dj_mon/bootstrap_modal.js +0 -218
- data/app/assets/javascripts/dj_mon/bootstrap_popover.js +0 -98
- data/app/assets/javascripts/dj_mon/bootstrap_tab.js +0 -135
- data/app/assets/javascripts/dj_mon/bootstrap_tooltip.js +0 -275
- data/app/assets/javascripts/dj_mon/mustache.js +0 -536
- data/app/assets/stylesheets/dj_mon/bootstrap.css +0 -4592
data/Rakefile
CHANGED
@@ -30,10 +30,9 @@ namespace :test do
|
|
30
30
|
|
31
31
|
desc "Prepare environment for tests"
|
32
32
|
task :prepare do
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
system("rake db:test:clone")
|
33
|
+
Dir.chdir File.expand_path("../test/dummy_active_record", __FILE__) do
|
34
|
+
system("rake db:create:all db:migrate db:test:clone")
|
35
|
+
end
|
37
36
|
end
|
38
37
|
|
39
38
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
//= require
|
2
|
-
//= require
|
3
|
-
//= require
|
4
|
-
//= require
|
5
|
-
//= require
|
1
|
+
//= require bootstrap_tooltip
|
2
|
+
//= require bootstrap_tab
|
3
|
+
//= require bootstrap_popover
|
4
|
+
//= require bootstrap_modal
|
5
|
+
//= require mustache
|
6
6
|
|
7
7
|
$(function(){
|
8
8
|
|
@@ -64,7 +64,7 @@ module DjMon
|
|
64
64
|
sleep_delay: Delayed::Worker.sleep_delay,
|
65
65
|
max_attempts: Delayed::Worker.max_attempts,
|
66
66
|
max_run_time: Delayed::Worker.max_run_time,
|
67
|
-
read_ahead: Delayed::Worker.read_ahead,
|
67
|
+
read_ahead: defined?(Delayed::Worker.read_ahead) ? Delayed::Worker.read_ahead : 5,
|
68
68
|
delay_jobs: Delayed::Worker.delay_jobs,
|
69
69
|
delayed_job_version: Gem.loaded_specs["delayed_job"].version.version,
|
70
70
|
dj_mon_version: DjMon::VERSION
|
data/lib/dj_mon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dj_mon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -115,13 +115,7 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- app/assets/javascripts/dj_mon/bootstrap_modal.js
|
119
|
-
- app/assets/javascripts/dj_mon/bootstrap_popover.js
|
120
|
-
- app/assets/javascripts/dj_mon/bootstrap_tab.js
|
121
|
-
- app/assets/javascripts/dj_mon/bootstrap_tooltip.js
|
122
|
-
- app/assets/javascripts/dj_mon/mustache.js
|
123
118
|
- app/assets/javascripts/dj_mon.js
|
124
|
-
- app/assets/stylesheets/dj_mon/bootstrap.css
|
125
119
|
- app/assets/stylesheets/dj_mon.css
|
126
120
|
- app/controllers/dj_mon/dj_reports_controller.rb
|
127
121
|
- app/models/dj_mon/dj_report.rb
|
@@ -1,218 +0,0 @@
|
|
1
|
-
/* =========================================================
|
2
|
-
* bootstrap-modal.js v2.0.4
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#modals
|
4
|
-
* =========================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ========================================================= */
|
19
|
-
|
20
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* MODAL CLASS DEFINITION
|
27
|
-
* ====================== */
|
28
|
-
|
29
|
-
var Modal = function (content, options) {
|
30
|
-
this.options = options
|
31
|
-
this.$element = $(content)
|
32
|
-
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
33
|
-
}
|
34
|
-
|
35
|
-
Modal.prototype = {
|
36
|
-
|
37
|
-
constructor: Modal
|
38
|
-
|
39
|
-
, toggle: function () {
|
40
|
-
return this[!this.isShown ? 'show' : 'hide']()
|
41
|
-
}
|
42
|
-
|
43
|
-
, show: function () {
|
44
|
-
var that = this
|
45
|
-
, e = $.Event('show')
|
46
|
-
|
47
|
-
this.$element.trigger(e)
|
48
|
-
|
49
|
-
if (this.isShown || e.isDefaultPrevented()) return
|
50
|
-
|
51
|
-
$('body').addClass('modal-open')
|
52
|
-
|
53
|
-
this.isShown = true
|
54
|
-
|
55
|
-
escape.call(this)
|
56
|
-
backdrop.call(this, function () {
|
57
|
-
var transition = $.support.transition && that.$element.hasClass('fade')
|
58
|
-
|
59
|
-
if (!that.$element.parent().length) {
|
60
|
-
that.$element.appendTo(document.body) //don't move modals dom position
|
61
|
-
}
|
62
|
-
|
63
|
-
that.$element
|
64
|
-
.show()
|
65
|
-
|
66
|
-
if (transition) {
|
67
|
-
that.$element[0].offsetWidth // force reflow
|
68
|
-
}
|
69
|
-
|
70
|
-
that.$element.addClass('in')
|
71
|
-
|
72
|
-
transition ?
|
73
|
-
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
74
|
-
that.$element.trigger('shown')
|
75
|
-
|
76
|
-
})
|
77
|
-
}
|
78
|
-
|
79
|
-
, hide: function (e) {
|
80
|
-
e && e.preventDefault()
|
81
|
-
|
82
|
-
var that = this
|
83
|
-
|
84
|
-
e = $.Event('hide')
|
85
|
-
|
86
|
-
this.$element.trigger(e)
|
87
|
-
|
88
|
-
if (!this.isShown || e.isDefaultPrevented()) return
|
89
|
-
|
90
|
-
this.isShown = false
|
91
|
-
|
92
|
-
$('body').removeClass('modal-open')
|
93
|
-
|
94
|
-
escape.call(this)
|
95
|
-
|
96
|
-
this.$element.removeClass('in')
|
97
|
-
|
98
|
-
$.support.transition && this.$element.hasClass('fade') ?
|
99
|
-
hideWithTransition.call(this) :
|
100
|
-
hideModal.call(this)
|
101
|
-
}
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
/* MODAL PRIVATE METHODS
|
107
|
-
* ===================== */
|
108
|
-
|
109
|
-
function hideWithTransition() {
|
110
|
-
var that = this
|
111
|
-
, timeout = setTimeout(function () {
|
112
|
-
that.$element.off($.support.transition.end)
|
113
|
-
hideModal.call(that)
|
114
|
-
}, 500)
|
115
|
-
|
116
|
-
this.$element.one($.support.transition.end, function () {
|
117
|
-
clearTimeout(timeout)
|
118
|
-
hideModal.call(that)
|
119
|
-
})
|
120
|
-
}
|
121
|
-
|
122
|
-
function hideModal(that) {
|
123
|
-
this.$element
|
124
|
-
.hide()
|
125
|
-
.trigger('hidden')
|
126
|
-
|
127
|
-
backdrop.call(this)
|
128
|
-
}
|
129
|
-
|
130
|
-
function backdrop(callback) {
|
131
|
-
var that = this
|
132
|
-
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
133
|
-
|
134
|
-
if (this.isShown && this.options.backdrop) {
|
135
|
-
var doAnimate = $.support.transition && animate
|
136
|
-
|
137
|
-
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
138
|
-
.appendTo(document.body)
|
139
|
-
|
140
|
-
if (this.options.backdrop != 'static') {
|
141
|
-
this.$backdrop.click($.proxy(this.hide, this))
|
142
|
-
}
|
143
|
-
|
144
|
-
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
145
|
-
|
146
|
-
this.$backdrop.addClass('in')
|
147
|
-
|
148
|
-
doAnimate ?
|
149
|
-
this.$backdrop.one($.support.transition.end, callback) :
|
150
|
-
callback()
|
151
|
-
|
152
|
-
} else if (!this.isShown && this.$backdrop) {
|
153
|
-
this.$backdrop.removeClass('in')
|
154
|
-
|
155
|
-
$.support.transition && this.$element.hasClass('fade')?
|
156
|
-
this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
|
157
|
-
removeBackdrop.call(this)
|
158
|
-
|
159
|
-
} else if (callback) {
|
160
|
-
callback()
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
function removeBackdrop() {
|
165
|
-
this.$backdrop.remove()
|
166
|
-
this.$backdrop = null
|
167
|
-
}
|
168
|
-
|
169
|
-
function escape() {
|
170
|
-
var that = this
|
171
|
-
if (this.isShown && this.options.keyboard) {
|
172
|
-
$(document).on('keyup.dismiss.modal', function ( e ) {
|
173
|
-
e.which == 27 && that.hide()
|
174
|
-
})
|
175
|
-
} else if (!this.isShown) {
|
176
|
-
$(document).off('keyup.dismiss.modal')
|
177
|
-
}
|
178
|
-
}
|
179
|
-
|
180
|
-
|
181
|
-
/* MODAL PLUGIN DEFINITION
|
182
|
-
* ======================= */
|
183
|
-
|
184
|
-
$.fn.modal = function (option) {
|
185
|
-
return this.each(function () {
|
186
|
-
var $this = $(this)
|
187
|
-
, data = $this.data('modal')
|
188
|
-
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
|
189
|
-
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
190
|
-
if (typeof option == 'string') data[option]()
|
191
|
-
else if (options.show) data.show()
|
192
|
-
})
|
193
|
-
}
|
194
|
-
|
195
|
-
$.fn.modal.defaults = {
|
196
|
-
backdrop: true
|
197
|
-
, keyboard: true
|
198
|
-
, show: true
|
199
|
-
}
|
200
|
-
|
201
|
-
$.fn.modal.Constructor = Modal
|
202
|
-
|
203
|
-
|
204
|
-
/* MODAL DATA-API
|
205
|
-
* ============== */
|
206
|
-
|
207
|
-
$(function () {
|
208
|
-
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
209
|
-
var $this = $(this), href
|
210
|
-
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
211
|
-
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
|
212
|
-
|
213
|
-
e.preventDefault()
|
214
|
-
$target.modal(option)
|
215
|
-
})
|
216
|
-
})
|
217
|
-
|
218
|
-
}(window.jQuery);
|
@@ -1,98 +0,0 @@
|
|
1
|
-
/* ===========================================================
|
2
|
-
* bootstrap-popover.js v2.0.4
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
4
|
-
* ===========================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* =========================================================== */
|
19
|
-
|
20
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* POPOVER PUBLIC CLASS DEFINITION
|
27
|
-
* =============================== */
|
28
|
-
|
29
|
-
var Popover = function ( element, options ) {
|
30
|
-
this.init('popover', element, options)
|
31
|
-
}
|
32
|
-
|
33
|
-
|
34
|
-
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
35
|
-
========================================== */
|
36
|
-
|
37
|
-
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
|
38
|
-
|
39
|
-
constructor: Popover
|
40
|
-
|
41
|
-
, setContent: function () {
|
42
|
-
var $tip = this.tip()
|
43
|
-
, title = this.getTitle()
|
44
|
-
, content = this.getContent()
|
45
|
-
|
46
|
-
$tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
|
47
|
-
$tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
|
48
|
-
|
49
|
-
$tip.removeClass('fade top bottom left right in')
|
50
|
-
}
|
51
|
-
|
52
|
-
, hasContent: function () {
|
53
|
-
return this.getTitle() || this.getContent()
|
54
|
-
}
|
55
|
-
|
56
|
-
, getContent: function () {
|
57
|
-
var content
|
58
|
-
, $e = this.$element
|
59
|
-
, o = this.options
|
60
|
-
|
61
|
-
content = $e.attr('data-content')
|
62
|
-
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
63
|
-
|
64
|
-
return content
|
65
|
-
}
|
66
|
-
|
67
|
-
, tip: function () {
|
68
|
-
if (!this.$tip) {
|
69
|
-
this.$tip = $(this.options.template)
|
70
|
-
}
|
71
|
-
return this.$tip
|
72
|
-
}
|
73
|
-
|
74
|
-
})
|
75
|
-
|
76
|
-
|
77
|
-
/* POPOVER PLUGIN DEFINITION
|
78
|
-
* ======================= */
|
79
|
-
|
80
|
-
$.fn.popover = function (option) {
|
81
|
-
return this.each(function () {
|
82
|
-
var $this = $(this)
|
83
|
-
, data = $this.data('popover')
|
84
|
-
, options = typeof option == 'object' && option
|
85
|
-
if (!data) $this.data('popover', (data = new Popover(this, options)))
|
86
|
-
if (typeof option == 'string') data[option]()
|
87
|
-
})
|
88
|
-
}
|
89
|
-
|
90
|
-
$.fn.popover.Constructor = Popover
|
91
|
-
|
92
|
-
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
93
|
-
placement: 'right'
|
94
|
-
, content: ''
|
95
|
-
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
|
96
|
-
})
|
97
|
-
|
98
|
-
}(window.jQuery);
|
@@ -1,135 +0,0 @@
|
|
1
|
-
/* ========================================================
|
2
|
-
* bootstrap-tab.js v2.0.4
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
4
|
-
* ========================================================
|
5
|
-
* Copyright 2012 Twitter, Inc.
|
6
|
-
*
|
7
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
* you may not use this file except in compliance with the License.
|
9
|
-
* You may obtain a copy of the License at
|
10
|
-
*
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
*
|
13
|
-
* Unless required by applicable law or agreed to in writing, software
|
14
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
* See the License for the specific language governing permissions and
|
17
|
-
* limitations under the License.
|
18
|
-
* ======================================================== */
|
19
|
-
|
20
|
-
|
21
|
-
!function ($) {
|
22
|
-
|
23
|
-
"use strict"; // jshint ;_;
|
24
|
-
|
25
|
-
|
26
|
-
/* TAB CLASS DEFINITION
|
27
|
-
* ==================== */
|
28
|
-
|
29
|
-
var Tab = function ( element ) {
|
30
|
-
this.element = $(element)
|
31
|
-
}
|
32
|
-
|
33
|
-
Tab.prototype = {
|
34
|
-
|
35
|
-
constructor: Tab
|
36
|
-
|
37
|
-
, show: function () {
|
38
|
-
var $this = this.element
|
39
|
-
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
40
|
-
, selector = $this.attr('data-target')
|
41
|
-
, previous
|
42
|
-
, $target
|
43
|
-
, e
|
44
|
-
|
45
|
-
if (!selector) {
|
46
|
-
selector = $this.attr('href')
|
47
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
48
|
-
}
|
49
|
-
|
50
|
-
if ( $this.parent('li').hasClass('active') ) return
|
51
|
-
|
52
|
-
previous = $ul.find('.active a').last()[0]
|
53
|
-
|
54
|
-
e = $.Event('show', {
|
55
|
-
relatedTarget: previous
|
56
|
-
})
|
57
|
-
|
58
|
-
$this.trigger(e)
|
59
|
-
|
60
|
-
if (e.isDefaultPrevented()) return
|
61
|
-
|
62
|
-
$target = $(selector)
|
63
|
-
|
64
|
-
this.activate($this.parent('li'), $ul)
|
65
|
-
this.activate($target, $target.parent(), function () {
|
66
|
-
$this.trigger({
|
67
|
-
type: 'shown'
|
68
|
-
, relatedTarget: previous
|
69
|
-
})
|
70
|
-
})
|
71
|
-
}
|
72
|
-
|
73
|
-
, activate: function ( element, container, callback) {
|
74
|
-
var $active = container.find('> .active')
|
75
|
-
, transition = callback
|
76
|
-
&& $.support.transition
|
77
|
-
&& $active.hasClass('fade')
|
78
|
-
|
79
|
-
function next() {
|
80
|
-
$active
|
81
|
-
.removeClass('active')
|
82
|
-
.find('> .dropdown-menu > .active')
|
83
|
-
.removeClass('active')
|
84
|
-
|
85
|
-
element.addClass('active')
|
86
|
-
|
87
|
-
if (transition) {
|
88
|
-
element[0].offsetWidth // reflow for transition
|
89
|
-
element.addClass('in')
|
90
|
-
} else {
|
91
|
-
element.removeClass('fade')
|
92
|
-
}
|
93
|
-
|
94
|
-
if ( element.parent('.dropdown-menu') ) {
|
95
|
-
element.closest('li.dropdown').addClass('active')
|
96
|
-
}
|
97
|
-
|
98
|
-
callback && callback()
|
99
|
-
}
|
100
|
-
|
101
|
-
transition ?
|
102
|
-
$active.one($.support.transition.end, next) :
|
103
|
-
next()
|
104
|
-
|
105
|
-
$active.removeClass('in')
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
|
110
|
-
/* TAB PLUGIN DEFINITION
|
111
|
-
* ===================== */
|
112
|
-
|
113
|
-
$.fn.tab = function ( option ) {
|
114
|
-
return this.each(function () {
|
115
|
-
var $this = $(this)
|
116
|
-
, data = $this.data('tab')
|
117
|
-
if (!data) $this.data('tab', (data = new Tab(this)))
|
118
|
-
if (typeof option == 'string') data[option]()
|
119
|
-
})
|
120
|
-
}
|
121
|
-
|
122
|
-
$.fn.tab.Constructor = Tab
|
123
|
-
|
124
|
-
|
125
|
-
/* TAB DATA-API
|
126
|
-
* ============ */
|
127
|
-
|
128
|
-
$(function () {
|
129
|
-
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
130
|
-
e.preventDefault()
|
131
|
-
$(this).tab('show')
|
132
|
-
})
|
133
|
-
})
|
134
|
-
|
135
|
-
}(window.jQuery);
|