delayed_job_ui 0.0.0 → 0.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94d772c78046c542ea23ec40383b3e22e577922a
|
4
|
+
data.tar.gz: 0c4b9e3bc7123e60b8f0189f55af705923bf0102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce1da16824a0cf9bf9c69a7a49eec34b9aea947a0ca01fdc36b11e1342eaf998c939ce6b47d56fb6e4efff0abc18bb56fc6fa83ed0892a7375b10cc6f25f44d6
|
7
|
+
data.tar.gz: e7f744ed6aacea23f3cf7bc03451a29c8d7e34ae3174b6bccb561e60147e9fd8cf8ab0128484edfc8c714e925c72a82aa78136121c8a21bfbab806c732636b66
|
@@ -10,6 +10,7 @@ window.delayed_job_ui = (function($){
|
|
10
10
|
dj_obj.$parent = $(namespace);
|
11
11
|
instantiate_datatable();
|
12
12
|
tab_handlers();
|
13
|
+
resize_handlers();
|
13
14
|
hide_tab_content();
|
14
15
|
show_active_tab();
|
15
16
|
}
|
@@ -18,12 +19,24 @@ window.delayed_job_ui = (function($){
|
|
18
19
|
dj_obj.$parent.find('.job_table').DataTable();
|
19
20
|
}
|
20
21
|
|
22
|
+
var resize_handlers = function() {
|
23
|
+
dj_obj.$parent.on('click', '.open', function(e){
|
24
|
+
e.preventDefault();
|
25
|
+
dj_obj.$parent.removeClass('closed');;
|
26
|
+
});
|
27
|
+
|
28
|
+
dj_obj.$parent.on('click', '.close', function(e){
|
29
|
+
e.preventDefault();
|
30
|
+
dj_obj.$parent.addClass('closed');;
|
31
|
+
});
|
32
|
+
}
|
33
|
+
|
21
34
|
var tab_handlers = function() {
|
22
35
|
dj_obj.$parent.on('click', '.link_to_tab', function(e){
|
23
36
|
e.preventDefault();
|
24
37
|
$tab_link = $(e.target);
|
25
38
|
set_active_tab($tab_link)
|
26
|
-
})
|
39
|
+
});
|
27
40
|
}
|
28
41
|
|
29
42
|
var set_active_tab = function($tab_link) {
|
@@ -1,4 +1,8 @@
|
|
1
1
|
#delayed-job-ui {
|
2
|
+
position: fixed;
|
3
|
+
bottom: 0;
|
4
|
+
width: 100%;
|
5
|
+
z-index: 100;
|
2
6
|
* {
|
3
7
|
box-sizing: border-box;
|
4
8
|
&:before, &:after {
|
@@ -6,10 +10,54 @@
|
|
6
10
|
}
|
7
11
|
}
|
8
12
|
|
13
|
+
.minimized {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
.maximized {
|
18
|
+
position: relative;
|
19
|
+
.close {
|
20
|
+
position: absolute;
|
21
|
+
right: 12px;
|
22
|
+
top: 12px;
|
23
|
+
background: white;
|
24
|
+
padding: 1px 6px;
|
25
|
+
color: black;
|
26
|
+
border: 1px solid #C7C7C7;
|
27
|
+
&:hover {
|
28
|
+
text-decoration: none;
|
29
|
+
background: #ccc;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&.closed {
|
35
|
+
width: inherit;
|
36
|
+
.maximized {
|
37
|
+
display: none;
|
38
|
+
}
|
39
|
+
.minimized {
|
40
|
+
display: block;
|
41
|
+
.open {
|
42
|
+
display: block;
|
43
|
+
padding: 10px;
|
44
|
+
top: 1px;
|
45
|
+
color: black;
|
46
|
+
border-top: 5px solid #D65F75;
|
47
|
+
background: white;
|
48
|
+
border-bottom: none;
|
49
|
+
border-right: none;
|
50
|
+
box-shadow: 1px -2px 1px rgba(0,0,0,0.2);
|
51
|
+
z-index: 999;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
9
56
|
.panel {
|
10
57
|
border-radius: 0;
|
11
58
|
background: white;
|
12
59
|
box-shadow: 0px 0px 1px rgba(0,0,0,0.2);
|
60
|
+
margin-bottom: 0;
|
13
61
|
|
14
62
|
.content {
|
15
63
|
margin-top: 20px;
|
@@ -1,42 +1,46 @@
|
|
1
1
|
= stylesheet_link_tag "delayed_job_ui"
|
2
2
|
= javascript_include_tag 'delayed_job_ui'
|
3
3
|
|
4
|
-
#delayed-job-ui
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
- DelayedJobUi::Jobs.job_count.each do |type, count|
|
4
|
+
#delayed-job-ui.closed
|
5
|
+
.minimized
|
6
|
+
=link_to 'Delayed Job UI', '#', :class => 'open'
|
7
|
+
.maximized
|
8
|
+
=link_to 'X', '#', :class => 'close'
|
9
|
+
%ul.tabs.cf
|
10
|
+
%li
|
11
|
+
= link_to 'Overview', '#overview', :class => 'tab-title link_to_tab active'
|
12
|
+
%li
|
13
|
+
= link_to 'Enqueued', '#enqueued', :class => 'tab-title link_to_tab'
|
14
|
+
%li
|
15
|
+
= link_to 'Working', '#working', :class => 'tab-title link_to_tab'
|
16
|
+
%li
|
17
|
+
= link_to 'Pending', '#pending', :class => 'tab-title link_to_tab'
|
18
|
+
%li
|
19
|
+
= link_to 'Failed', '#failed', :class => 'tab-title link_to_tab'
|
20
|
+
.panel
|
21
|
+
.content
|
22
|
+
#overview.tab-content
|
23
|
+
%h2 Overview
|
24
|
+
%table
|
25
|
+
%thead
|
27
26
|
%tr
|
28
|
-
%
|
29
|
-
%
|
27
|
+
%th Type
|
28
|
+
%th Count
|
29
|
+
%tbody
|
30
|
+
- DelayedJobUi::Jobs.job_count.each do |type, count|
|
31
|
+
%tr
|
32
|
+
%td= link_to type.to_s.capitalize, "##{type}", :class => 'link_to_tab'
|
33
|
+
%td= count
|
30
34
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
#enqueued.tab-content
|
36
|
+
%h2 Enqueued
|
37
|
+
= render 'delayed_job_ui/job_table', :type => :enqueued
|
38
|
+
#working.tab-content
|
39
|
+
%h2 Working
|
40
|
+
= render 'delayed_job_ui/job_table', :type => :working
|
41
|
+
#pending.tab-content
|
42
|
+
%h2 Pending
|
43
|
+
= render 'delayed_job_ui/job_table', :type => :pending
|
44
|
+
#failed.tab-content
|
45
|
+
%h2 Failed
|
46
|
+
= render 'delayed_job_ui/job_table', :type => :failed
|
data/delayed_job_ui.gemspec
CHANGED