clockface 1.0.0.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +210 -0
- data/Rakefile +22 -0
- data/app/assets/config/clockface_manifest.js +2 -0
- data/app/assets/images/clockface/clockface.svg +34 -0
- data/app/assets/javascripts/clockface/application.js +17 -0
- data/app/assets/javascripts/clockface/flash.js +7 -0
- data/app/assets/javascripts/clockface/sorttable.js +494 -0
- data/app/assets/stylesheets/clockface/application.scss +80 -0
- data/app/assets/stylesheets/clockface/application/_fonts.scss +2 -0
- data/app/assets/stylesheets/clockface/application/colors.scss +8 -0
- data/app/assets/stylesheets/clockface/application/flash.scss +6 -0
- data/app/assets/stylesheets/clockface/application/footer.scss +37 -0
- data/app/assets/stylesheets/clockface/application/nav.scss +51 -0
- data/app/assets/stylesheets/clockface/events/delete.scss +45 -0
- data/app/assets/stylesheets/clockface/events/event_form.scss +62 -0
- data/app/assets/stylesheets/clockface/events/index.scss +56 -0
- data/app/assets/stylesheets/clockface/tasks/delete.scss +29 -0
- data/app/assets/stylesheets/clockface/tasks/index.scss +47 -0
- data/app/assets/stylesheets/clockface/tasks/task_form.scss +20 -0
- data/app/controllers/clockface/application_controller.rb +20 -0
- data/app/controllers/clockface/events_controller.rb +151 -0
- data/app/controllers/clockface/root_controller.rb +7 -0
- data/app/controllers/clockface/tasks_controller.rb +137 -0
- data/app/events/clockface/application_job.rb +4 -0
- data/app/helpers/clockface/application_helper.rb +4 -0
- data/app/helpers/clockface/config_helper.rb +32 -0
- data/app/helpers/clockface/events_helper.rb +37 -0
- data/app/helpers/clockface/logging_helper.rb +12 -0
- data/app/mailers/clockface/application_mailer.rb +6 -0
- data/app/models/clockface/application_record.rb +7 -0
- data/app/models/clockface/event.rb +179 -0
- data/app/models/clockface/task.rb +12 -0
- data/app/presenters/clockface/events_presenter.rb +48 -0
- data/app/services/clockface/event_validation_interactor.rb +35 -0
- data/app/services/clockface/task_validation_interactor.rb +25 -0
- data/app/views/clockface/application/_flash.html.erb +25 -0
- data/app/views/clockface/application/_footer.html.erb +15 -0
- data/app/views/clockface/application/_nav.html.erb +19 -0
- data/app/views/clockface/events/_event_form.html.erb +130 -0
- data/app/views/clockface/events/delete.html.erb +124 -0
- data/app/views/clockface/events/edit.html.erb +14 -0
- data/app/views/clockface/events/index.html.erb +108 -0
- data/app/views/clockface/events/new.html.erb +14 -0
- data/app/views/clockface/tasks/_task_form.html.erb +57 -0
- data/app/views/clockface/tasks/delete.html.erb +83 -0
- data/app/views/clockface/tasks/edit.html.erb +14 -0
- data/app/views/clockface/tasks/index.html.erb +70 -0
- data/app/views/clockface/tasks/new.html.erb +14 -0
- data/app/views/layouts/clockface/application.html.erb +27 -0
- data/config/locales/en.yml +158 -0
- data/config/routes.rb +15 -0
- data/db/migrate/20170528230549_create_clockface_tasks.rb +10 -0
- data/db/migrate/20170528234810_create_clockface_events.rb +20 -0
- data/lib/clockface.rb +135 -0
- data/lib/clockface/engine.rb +79 -0
- data/lib/clockface/version.rb +3 -0
- data/lib/clockwork/database_events/synchronizer.rb +73 -0
- data/lib/tasks/clockface_tasks.rake +4 -0
- metadata +199 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
|
11
|
+
* It is generally better to create a new file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require_self
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
|
|
17
|
+
@import "bootstrap-sprockets";
|
|
18
|
+
@import "bootstrap";
|
|
19
|
+
|
|
20
|
+
@import "application/fonts";
|
|
21
|
+
@import "application/colors";
|
|
22
|
+
|
|
23
|
+
@import "application/nav";
|
|
24
|
+
@import "application/footer";
|
|
25
|
+
@import "application/flash";
|
|
26
|
+
|
|
27
|
+
@import "tasks/index";
|
|
28
|
+
@import "tasks/delete";
|
|
29
|
+
@import "tasks/task_form";
|
|
30
|
+
|
|
31
|
+
@import "events/index";
|
|
32
|
+
@import "events/delete";
|
|
33
|
+
@import "events/event_form";
|
|
34
|
+
|
|
35
|
+
html {
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
body {
|
|
40
|
+
margin: 0;
|
|
41
|
+
min-height: 100%;
|
|
42
|
+
font-family: $paragraph-font;
|
|
43
|
+
background-color: $white;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
ul, li {
|
|
47
|
+
list-style-type: none;
|
|
48
|
+
// Override user stylesheet on several browsers
|
|
49
|
+
-webkit-padding-start: 0;
|
|
50
|
+
margin: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1, h2, h3 {
|
|
54
|
+
margin: 0;
|
|
55
|
+
font-family: $heading-font;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h1 {
|
|
59
|
+
color: $dark_gray;
|
|
60
|
+
font-size: 5rem;
|
|
61
|
+
font-weight: 300;
|
|
62
|
+
line-height: 50px;
|
|
63
|
+
margin: 25px 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h2 {
|
|
67
|
+
color: $black;
|
|
68
|
+
font-size: 2.25rem;
|
|
69
|
+
line-height: 30px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h3 {
|
|
73
|
+
color: $black;
|
|
74
|
+
font-size: 1.25rem;
|
|
75
|
+
line-height: 26px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
a, a:hover, a:focus {
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.application-footer {
|
|
2
|
+
position: absolute;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-flow: row nowrap;
|
|
5
|
+
justify-content: flex-end;
|
|
6
|
+
align-items: center;
|
|
7
|
+
width: 100%;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
margin-bottom: 20px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.application-footer__need-help {
|
|
13
|
+
position: absolute;
|
|
14
|
+
height: 40px;
|
|
15
|
+
line-height: 40px;
|
|
16
|
+
width: 200px;
|
|
17
|
+
margin: auto 20px;
|
|
18
|
+
left: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.application-footer__version {
|
|
22
|
+
margin: auto 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.application-footer__source-btn{
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
font-size: 12px;
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
font-family: Courier New, monospace;
|
|
32
|
+
color: white;
|
|
33
|
+
line-height: 40px;
|
|
34
|
+
text-align: center;
|
|
35
|
+
background: black;
|
|
36
|
+
margin: auto 20px auto 10px;
|
|
37
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.application-nav {
|
|
2
|
+
background-color: $dark_blue;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.navbar-header {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
flex-wrap: no-wrap;
|
|
9
|
+
justify-content: flex-start;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.navbar-brand {
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.application-nav__icon {
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.application-nav__heading {
|
|
21
|
+
font-size: 32px;
|
|
22
|
+
color: $teal;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.application-nav__link-container {
|
|
26
|
+
margin-left: 20px;
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Nav links also have a .navbar-brand sibling class with more specific
|
|
31
|
+
// css rules that take precedence. Make these rules more specific by nesting
|
|
32
|
+
// under .application-nav
|
|
33
|
+
.application-nav {
|
|
34
|
+
.application-nav__link {
|
|
35
|
+
color: $white;
|
|
36
|
+
height: 100%;
|
|
37
|
+
// Similar to above, .navbar-brand also has a very specific rule that sets
|
|
38
|
+
// margin-left. Override with importance. Not the best practice but it's
|
|
39
|
+
// there for when you actually need it, right?
|
|
40
|
+
margin: auto 5px !important;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
color: $teal;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.application-nav__link--selected span {
|
|
49
|
+
border-bottom: 3px solid $red;
|
|
50
|
+
padding-bottom: 3px;
|
|
51
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.events-delete__event-detail {
|
|
2
|
+
margin: 25px auto;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.events-delete__event-detail-element {
|
|
6
|
+
height: 25px;
|
|
7
|
+
|
|
8
|
+
&.form-group {
|
|
9
|
+
margin-bottom: 5px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.events-delete__event-detail-element--last_triggered_at {
|
|
14
|
+
span {
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.events-delete__event-detail-element--enabled {
|
|
20
|
+
.enabled-event {
|
|
21
|
+
color: green;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.disabled-event {
|
|
25
|
+
color: red;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.events-delete__captcha-label {
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
|
|
32
|
+
span {
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
font-family: monospace;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
background-color: $post_it_yellow;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.events-delete__form-element--captcha {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
width: 15%;
|
|
43
|
+
margin-bottom: 25px;
|
|
44
|
+
min-width: 110px;
|
|
45
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.events-form__form-element--name {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.events-form__form-element--enabled {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.events-form__form-element--period {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.events-form__form-element--period-value {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 5%;
|
|
13
|
+
min-width: 50px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.events-form__form-element--period-units {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
width: 15%;
|
|
19
|
+
min-width: 110px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.events-form__form-element--at {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.events-form__form-element--day-of-week {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
width: 15%;
|
|
28
|
+
min-width: 110px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.events-form__form-element--hour {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
width: 5%;
|
|
34
|
+
min-width: 50px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.events-form__form-element--minute {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
width: 5%;
|
|
40
|
+
min-width: 50px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.events-form__form-element--time_zone {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.events-form__form-element--time_zone select {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
width: 30%;
|
|
49
|
+
min-width: 220px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.events-form__form-element--if_condition {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.events-form__form-element--if_condition select {
|
|
56
|
+
display: inline-block;
|
|
57
|
+
width: 20%;
|
|
58
|
+
min-width: 110px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.events-new__form-submit {
|
|
62
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.events-index__heading-banner {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
flex-wrap: nowrap;
|
|
5
|
+
justify-content: flex-start;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.events-index__new-link {
|
|
10
|
+
margin: 10px 10px 10px auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.events-index__new-btn {
|
|
14
|
+
height: 45px;
|
|
15
|
+
width: 45px;
|
|
16
|
+
|
|
17
|
+
.glyphicon {
|
|
18
|
+
font-size: 20px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.events-index__events {
|
|
23
|
+
thead {
|
|
24
|
+
background-color: $light_gray;
|
|
25
|
+
color: $dark_gray;
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
.sorttable_nosort {
|
|
30
|
+
cursor: default;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.events-index__events-column--last_triggered_at {
|
|
36
|
+
span {
|
|
37
|
+
background-color: $post_it_yellow;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.events-index__events-column--enabled {
|
|
43
|
+
.enabled-event {
|
|
44
|
+
color: green;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.disabled-event {
|
|
48
|
+
color: red;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.events-index__events-column--destroy {
|
|
53
|
+
.glyphicon {
|
|
54
|
+
color: red;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.tasks-delete__task-detail {
|
|
2
|
+
margin: 25px auto;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.tasks-delete__task-detail-element {
|
|
6
|
+
height: 25px;
|
|
7
|
+
|
|
8
|
+
&.form-group {
|
|
9
|
+
margin-bottom: 5px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tasks-delete__captcha-label {
|
|
14
|
+
margin-bottom: 10px;
|
|
15
|
+
|
|
16
|
+
span {
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
font-family: monospace;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
background-color: $post_it_yellow;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tasks-delete__form-element--captcha {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
width: 15%;
|
|
27
|
+
margin-bottom: 25px;
|
|
28
|
+
min-width: 110px;
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.tasks-index__heading-banner {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
flex-wrap: nowrap;
|
|
5
|
+
justify-content: flex-start;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tasks-index__new-link {
|
|
10
|
+
margin: 10px 10px 10px auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tasks-index__new-btn {
|
|
14
|
+
height: 45px;
|
|
15
|
+
width: 45px;
|
|
16
|
+
|
|
17
|
+
.glyphicon {
|
|
18
|
+
font-size: 20px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tasks-index__tasks {
|
|
23
|
+
thead {
|
|
24
|
+
background-color: $light_gray;
|
|
25
|
+
color: $dark_gray;
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
.sorttable_nosort {
|
|
30
|
+
cursor: default;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tasks-index__tasks-column--description {
|
|
36
|
+
width: 40%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tasks-index__tasks-column--command {
|
|
40
|
+
font-family: 'Courier';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tasks-index__tasks-column--destroy {
|
|
44
|
+
.glyphicon {
|
|
45
|
+
color: red;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.tasks-form__form-element--name {
|
|
2
|
+
input {
|
|
3
|
+
width: 400px;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tasks-form__form-element--description {
|
|
8
|
+
textarea {
|
|
9
|
+
width: 400px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tasks-form__form-element--command {
|
|
14
|
+
input {
|
|
15
|
+
width: 400px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.tasks-new__form-submit {
|
|
20
|
+
}
|