rocketjob_mission_control 3.0.0.rc1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +10 -6
- data/app/assets/javascripts/rocket_job_mission_control/application.js +4 -3
- data/app/assets/javascripts/rocket_job_mission_control/base.js +12 -0
- data/app/assets/javascripts/rocket_job_mission_control/datatable.js +40 -0
- data/app/assets/javascripts/rocket_job_mission_control/dirmon_entries.js +16 -0
- data/app/assets/javascripts/rocket_job_mission_control/selectize.js +6 -0
- data/app/controllers/rocket_job_mission_control/active_workers_controller.rb +16 -5
- data/app/controllers/rocket_job_mission_control/application_controller.rb +2 -0
- data/app/controllers/rocket_job_mission_control/dirmon_entries_controller.rb +47 -67
- data/app/controllers/rocket_job_mission_control/jobs_controller.rb +113 -19
- data/app/controllers/rocket_job_mission_control/servers_controller.rb +71 -28
- data/app/datatables/rocket_job_mission_control/abstract_datatable.rb +3 -3
- data/app/datatables/rocket_job_mission_control/active_workers_datatable.rb +8 -14
- data/app/datatables/rocket_job_mission_control/dirmon_entries_datatable.rb +7 -15
- data/app/datatables/rocket_job_mission_control/jobs_datatable.rb +128 -13
- data/app/datatables/rocket_job_mission_control/servers_datatable.rb +13 -15
- data/app/helpers/rocket_job_mission_control/application_helper.rb +58 -0
- data/app/helpers/rocket_job_mission_control/jobs_helper.rb +15 -7
- data/app/helpers/rocket_job_mission_control/servers_helper.rb +1 -1
- data/app/models/rocket_job_mission_control/job_sanitizer.rb +47 -0
- data/app/models/rocket_job_mission_control/query.rb +24 -18
- data/app/views/layouts/rocket_job_mission_control/application.html.erb +43 -0
- data/app/views/layouts/rocket_job_mission_control/partials/_flash.html.erb +20 -0
- data/app/views/layouts/rocket_job_mission_control/partials/_header.html.erb +45 -0
- data/app/views/layouts/rocket_job_mission_control/partials/_sidebar.html.erb +12 -0
- data/app/views/rocket_job_mission_control/active_workers/index.html.erb +40 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/_form.html.erb +60 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/_sidebar.html.erb +38 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/_status.html.erb +17 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/edit.html.erb +4 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/index.html.erb +33 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/new.html.erb +8 -0
- data/app/views/rocket_job_mission_control/dirmon_entries/show.html.erb +29 -0
- data/app/views/rocket_job_mission_control/jobs/_pagination.html.erb +26 -0
- data/app/views/rocket_job_mission_control/jobs/_sidebar.html.erb +32 -0
- data/app/views/rocket_job_mission_control/jobs/_status.html.erb +42 -0
- data/app/views/rocket_job_mission_control/jobs/edit.html.erb +32 -0
- data/app/views/rocket_job_mission_control/jobs/exception.html.erb +19 -0
- data/app/views/rocket_job_mission_control/jobs/exceptions.html.erb +40 -0
- data/app/views/rocket_job_mission_control/jobs/index.html.erb +33 -0
- data/app/views/rocket_job_mission_control/jobs/show.html.erb +68 -0
- data/app/views/rocket_job_mission_control/servers/_sidebar.html.erb +31 -0
- data/app/views/rocket_job_mission_control/servers/index.html.erb +56 -0
- data/config/locales/en.yml +3 -10
- data/config/routes.rb +20 -17
- data/lib/rocket_job_mission_control/engine.rb +10 -0
- data/lib/rocket_job_mission_control/version.rb +1 -1
- data/test/compare_hashes.rb +17 -0
- data/test/controllers/rocket_job_mission_control/application_controller_test.rb +49 -0
- data/test/controllers/rocket_job_mission_control/dirmon_entries_controller_test.rb +417 -0
- data/test/controllers/rocket_job_mission_control/jobs_controller_test.rb +363 -0
- data/test/controllers/rocket_job_mission_control/servers_controller_test.rb +251 -0
- data/test/helpers/rocket_job_mission_control/application_helper_test.rb +54 -0
- data/test/helpers/rocket_job_mission_control/jobs_helper_test.rb +85 -0
- data/test/helpers/rocket_job_mission_control/pagination_helper_test.rb +23 -0
- data/test/helpers/rocket_job_mission_control/servers_helper_test.rb +64 -0
- data/test/helpers/rocket_job_mission_control/slices_helper_test.rb +30 -0
- data/test/models/rocket_job_mission_control/job_sanitizer_test.rb +92 -0
- data/test/models/rocket_job_mission_control/query_test.rb +136 -0
- data/test/test_helper.rb +23 -0
- metadata +75 -175
- data/app/assets/javascripts/rocket_job_mission_control/base.js.coffee +0 -11
- data/app/assets/javascripts/rocket_job_mission_control/datatable.js.coffee +0 -33
- data/app/assets/javascripts/rocket_job_mission_control/dirmon_entries.js.coffee +0 -13
- data/app/assets/javascripts/rocket_job_mission_control/selectize.js.coffee +0 -5
- data/app/assets/stylesheets/rocket_job_mission_control/jquery.bootstrap-touchspin.scss +0 -45
- data/app/controllers/rocket_job_mission_control/dirmon_entries/index_filters_controller.rb +0 -45
- data/app/controllers/rocket_job_mission_control/jobs/failures_controller.rb +0 -30
- data/app/controllers/rocket_job_mission_control/jobs/index_filters_controller.rb +0 -90
- data/app/controllers/rocket_job_mission_control/servers/index_filters_controller.rb +0 -49
- data/app/datatables/rocket_job_mission_control/completed_jobs_datatable.rb +0 -27
- data/app/datatables/rocket_job_mission_control/interrupted_jobs_datatable.rb +0 -26
- data/app/datatables/rocket_job_mission_control/queued_jobs_datatable.rb +0 -23
- data/app/datatables/rocket_job_mission_control/running_jobs_datatable.rb +0 -47
- data/app/datatables/rocket_job_mission_control/scheduled_jobs_datatable.rb +0 -31
- data/app/models/job_failures.rb +0 -20
- data/app/models/job_sanitizer.rb +0 -17
- data/app/views/layouts/rocket_job_mission_control/application.html.haml +0 -45
- data/app/views/layouts/rocket_job_mission_control/partials/_header.html.haml +0 -32
- data/app/views/layouts/rocket_job_mission_control/partials/_sidebar.html.haml +0 -11
- data/app/views/rocket_job_mission_control/active_workers/index.html.haml +0 -24
- data/app/views/rocket_job_mission_control/dirmon_entries/_form.html.haml +0 -37
- data/app/views/rocket_job_mission_control/dirmon_entries/_properties.html.haml +0 -30
- data/app/views/rocket_job_mission_control/dirmon_entries/_sidebar.html.haml +0 -27
- data/app/views/rocket_job_mission_control/dirmon_entries/_status.html.haml +0 -23
- data/app/views/rocket_job_mission_control/dirmon_entries/edit.html.haml +0 -4
- data/app/views/rocket_job_mission_control/dirmon_entries/index.html.haml +0 -18
- data/app/views/rocket_job_mission_control/dirmon_entries/index_filters/disabled.html.haml +0 -17
- data/app/views/rocket_job_mission_control/dirmon_entries/index_filters/enabled.html.haml +0 -17
- data/app/views/rocket_job_mission_control/dirmon_entries/index_filters/failed.html.haml +0 -17
- data/app/views/rocket_job_mission_control/dirmon_entries/index_filters/pending.html.haml +0 -17
- data/app/views/rocket_job_mission_control/dirmon_entries/new.html.haml +0 -6
- data/app/views/rocket_job_mission_control/dirmon_entries/show.html.haml +0 -23
- data/app/views/rocket_job_mission_control/jobs/_sidebar.html.haml +0 -28
- data/app/views/rocket_job_mission_control/jobs/_status.html.haml +0 -45
- data/app/views/rocket_job_mission_control/jobs/edit.html.haml +0 -34
- data/app/views/rocket_job_mission_control/jobs/exceptions.html.haml +0 -29
- data/app/views/rocket_job_mission_control/jobs/failures/_pagination.html.haml +0 -16
- data/app/views/rocket_job_mission_control/jobs/failures/index.html.haml +0 -32
- data/app/views/rocket_job_mission_control/jobs/index.html.haml +0 -25
- data/app/views/rocket_job_mission_control/jobs/index_filters/aborted.html.haml +0 -23
- data/app/views/rocket_job_mission_control/jobs/index_filters/completed.html.haml +0 -24
- data/app/views/rocket_job_mission_control/jobs/index_filters/failed.html.haml +0 -23
- data/app/views/rocket_job_mission_control/jobs/index_filters/paused.html.haml +0 -23
- data/app/views/rocket_job_mission_control/jobs/index_filters/queued.html.haml +0 -24
- data/app/views/rocket_job_mission_control/jobs/index_filters/running.html.haml +0 -25
- data/app/views/rocket_job_mission_control/jobs/index_filters/scheduled.html.haml +0 -24
- data/app/views/rocket_job_mission_control/jobs/show.html.haml +0 -51
- data/app/views/rocket_job_mission_control/servers/_actions.html.haml +0 -9
- data/app/views/rocket_job_mission_control/servers/_sidebar.html.haml +0 -20
- data/app/views/rocket_job_mission_control/servers/index.html.haml +0 -37
- data/app/views/rocket_job_mission_control/servers/index_filters/paused.html.haml +0 -37
- data/app/views/rocket_job_mission_control/servers/index_filters/running.html.haml +0 -37
- data/app/views/rocket_job_mission_control/servers/index_filters/starting.html.haml +0 -37
- data/app/views/rocket_job_mission_control/servers/index_filters/stopping.html.haml +0 -37
- data/spec/controllers/application_controller_spec.rb +0 -47
- data/spec/controllers/dirmon_entries/index_filters_controller_spec.rb +0 -77
- data/spec/controllers/dirmon_entries_controller_spec.rb +0 -383
- data/spec/controllers/jobs/failures_controller_spec.rb +0 -82
- data/spec/controllers/jobs/index_filters_controller_spec.rb +0 -66
- data/spec/controllers/jobs_controller_spec.rb +0 -172
- data/spec/controllers/workers/index_filters_controller_spec.rb +0 -59
- data/spec/controllers/workers_controller_spec.rb +0 -125
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -26
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/mongoid.yml +0 -88
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config/symmetric-encryption.yml +0 -8
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -118933
- data/spec/helpers/application_helper_spec.rb +0 -58
- data/spec/helpers/jobs_helper_spec.rb +0 -35
- data/spec/helpers/pagination_helper_spec.rb +0 -21
- data/spec/helpers/servers_helper_spec.rb +0 -16
- data/spec/helpers/slices_helper_spec.rb +0 -33
- data/spec/models/job_failures_spec.rb +0 -14
- data/spec/models/job_sanitizer_spec.rb +0 -16
- data/spec/rails_helper.rb +0 -47
- data/spec/spec_helper.rb +0 -84
- data/vendor/assets/javascripts/jquery.bootstrap-touchspin.js +0 -686
- data/vendor/assets/javascripts/prism.js +0 -6
- data/vendor/assets/stylesheets/jquery.bootstrap-touchspin.css +0 -45
- data/vendor/assets/stylesheets/prism.scss +0 -160
data/app/models/job_sanitizer.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
class JobSanitizer
|
2
|
-
attr_reader :params
|
3
|
-
|
4
|
-
def initialize(params)
|
5
|
-
@params = params
|
6
|
-
end
|
7
|
-
|
8
|
-
def sanitize
|
9
|
-
sanitize_log_level
|
10
|
-
params
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
def sanitize_log_level
|
15
|
-
params[:job][:log_level] = nil if params[:job][:log_level].blank?
|
16
|
-
end
|
17
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%title= title
|
5
|
-
|
6
|
-
%link{rel: "icon", type: "image/png", href: "/assets/favicon.png"}
|
7
|
-
%link{rel: "apple-touch-icon-precomposed", href: "/assets/apple-touch-icon.png"}
|
8
|
-
|
9
|
-
%meta{'http-equiv' => "Content-Type", content: "text/html; charset=UTF-8"}
|
10
|
-
%meta{'http-equiv' => "Content-Script-Type", content: "text/javascript"}
|
11
|
-
%meta{'http-equiv' =>"X-UA-Compatible", content: "IE=edge" }
|
12
|
-
%meta{name: "viewport", content: "width=device-width, initial-scale=1"}
|
13
|
-
= yield :meta
|
14
|
-
|
15
|
-
|
16
|
-
= stylesheet_link_tag "rocket_job_mission_control/application", :media => "all"
|
17
|
-
= javascript_include_tag "rocket_job_mission_control/application"
|
18
|
-
|
19
|
-
= csrf_meta_tag
|
20
|
-
|
21
|
-
%link{href: "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css", rel: "stylesheet"}/
|
22
|
-
|
23
|
-
%body.rocket_job
|
24
|
-
#wrapper
|
25
|
-
.container-fluid
|
26
|
-
.row.row-offcanvas.row-offcanvas-left
|
27
|
-
= render partial: 'layouts/rocket_job_mission_control/partials/sidebar'
|
28
|
-
|
29
|
-
.col-sm-10.col-xs-11.white-background#main
|
30
|
-
= render partial: 'layouts/rocket_job_mission_control/partials/header'
|
31
|
-
|
32
|
-
.flash.text-center
|
33
|
-
- flash.each do |key, msg|
|
34
|
-
- if msg
|
35
|
-
.alert{class: "alert-#{key} alert-dismissable", role: 'alert'}
|
36
|
-
%button.close{ data: { dismiss: 'alert' } }
|
37
|
-
%span ×
|
38
|
-
-if msg.kind_of? Array
|
39
|
-
%ul.list-unstyled.margin-bottom-0
|
40
|
-
- msg.each do |m|
|
41
|
-
%li= m.html_safe
|
42
|
-
- else
|
43
|
-
= msg.html_safe
|
44
|
-
#content
|
45
|
-
= yield
|
@@ -1,32 +0,0 @@
|
|
1
|
-
%nav.navbar.navbar-default#header
|
2
|
-
.container-fluid
|
3
|
-
.navbar-header
|
4
|
-
%button.navbar-toggle.collapsed{ "aria-expanded" => "false", "data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button" }
|
5
|
-
%span.sr-only Toggle navigation
|
6
|
-
%span.icon-bar
|
7
|
-
%span.icon-bar
|
8
|
-
%span.icon-bar
|
9
|
-
%a.navbar-brand.brand{ href: 'http://rocketjob.io', target: '_blank'}
|
10
|
-
= image_tag('rocket_job_mission_control/rocket-icon-64x64.png')
|
11
|
-
Rocket Job
|
12
|
-
.navbar-collapse.collapse
|
13
|
-
%ul.nav.navbar-nav
|
14
|
-
%li
|
15
|
-
= link_to running_jobs_path, class: active_page(running_jobs_path) do
|
16
|
-
%i.fa.fa-home
|
17
|
-
Jobs
|
18
|
-
%li
|
19
|
-
= link_to servers_path, class: active_page(servers_path) do
|
20
|
-
%i.fa.fa-database
|
21
|
-
Servers
|
22
|
-
%li
|
23
|
-
= link_to active_workers_path, class: active_page(active_workers_path) do
|
24
|
-
%i.fa.fa-circle-o-notch
|
25
|
-
Workers
|
26
|
-
%li
|
27
|
-
= link_to enabled_dirmon_entries_path, class: active_page(enabled_dirmon_entries_path) do
|
28
|
-
%i.fa.fa-folder-o
|
29
|
-
Directory Monitors
|
30
|
-
%ul.nav.navbar-nav.navbar-right
|
31
|
-
%li
|
32
|
-
%a{:href => '/' } Home
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#sidebar.col-sm-2.col-xs-1.sidebar-offcanvas
|
2
|
-
%ul.nav
|
3
|
-
%li
|
4
|
-
%a.visible-xs{"data-toggle" => "offcanvas", :href => "#"}
|
5
|
-
%i.fa.fa-chevron-right
|
6
|
-
- if @jobs_sidebar
|
7
|
-
= render partial: 'rocket_job_mission_control/jobs/sidebar'
|
8
|
-
- if @dirmon_sidebar
|
9
|
-
= render partial: 'rocket_job_mission_control/dirmon_entries/sidebar'
|
10
|
-
- if @servers_sidebar
|
11
|
-
= render partial: 'rocket_job_mission_control/servers/sidebar'
|
@@ -1,24 +0,0 @@
|
|
1
|
-
.job-list
|
2
|
-
.list
|
3
|
-
.row
|
4
|
-
.col-sm-10
|
5
|
-
%h2 Active Workers
|
6
|
-
.col-sm-2
|
7
|
-
.btn.btn-default.pull-right.dt-reload{ data: { behavior: 'reload' } }
|
8
|
-
%i.fa.fa-refresh
|
9
|
-
%table.table.datatable.active-workers-datatable{ style: "width: 100%", data: { source: "#{active_workers_url(format: 'json')}", column_num: 4 } }
|
10
|
-
%thead
|
11
|
-
%tr
|
12
|
-
%th Worker Name
|
13
|
-
%th Class
|
14
|
-
%th Description
|
15
|
-
%th Started
|
16
|
-
%tbody
|
17
|
-
|
18
|
-
:javascript
|
19
|
-
jQuery(function() {
|
20
|
-
new RjmcDatatable(
|
21
|
-
$('.active-workers-datatable'),
|
22
|
-
[{data: '0'}, {data: '1'}, {data: '2'}, {data: '3'}],
|
23
|
-
{ordering: false, searching: false});
|
24
|
-
});
|
@@ -1,37 +0,0 @@
|
|
1
|
-
- action ||= :create
|
2
|
-
- if @dirmon_entry.errors.present?
|
3
|
-
.alert.alert-alert
|
4
|
-
Invalid Dirmon entry!
|
5
|
-
- @dirmon_entry.errors.messages.each_pair do |field, message|
|
6
|
-
.message
|
7
|
-
= "#{field}: #{message}"
|
8
|
-
|
9
|
-
= form_for @dirmon_entry, url: {action: action} do |f|
|
10
|
-
.row
|
11
|
-
.col-md-6
|
12
|
-
.name.form-group
|
13
|
-
= f.label :name
|
14
|
-
= f.text_field :name, class: 'form-control'
|
15
|
-
.col-md-6
|
16
|
-
.job.form-group
|
17
|
-
= f.label :job_class_name
|
18
|
-
= f.text_field :job_class_name, class: 'form-control', disabled: action != :create
|
19
|
-
.path.form-group
|
20
|
-
= f.label :pattern
|
21
|
-
= f.text_field :pattern, class: 'form-control'
|
22
|
-
.path.form-group
|
23
|
-
= f.label :archive_directory
|
24
|
-
= f.text_field :archive_directory, class: 'form-control'
|
25
|
-
.row
|
26
|
-
.col-md-12
|
27
|
-
= render partial: 'properties', locals: { f: f }
|
28
|
-
|
29
|
-
.buttons.pull-right
|
30
|
-
= f.submit action, class: 'btn btn-primary'
|
31
|
-
= link_to 'cancel', :back, class: 'btn btn-default'
|
32
|
-
- if action == :create
|
33
|
-
= button_tag 'properties',
|
34
|
-
type: 'button',
|
35
|
-
class: 'btn btn-default',
|
36
|
-
id: 'properties',
|
37
|
-
data: { url: rocket_job_mission_control.new_dirmon_entry_path }
|
@@ -1,30 +0,0 @@
|
|
1
|
-
- if @dirmon_entry.job_class
|
2
|
-
.arguments
|
3
|
-
.job_arguments.form-group
|
4
|
-
= f.fields_for :properties do |properties|
|
5
|
-
- @dirmon_entry.job_class.user_editable_fields.each do |property_name|
|
6
|
-
- field = @dirmon_entry.job_class.fields[property_name.to_s]
|
7
|
-
- next unless field && field.type
|
8
|
-
- placeholder = field.default_val
|
9
|
-
.form-group
|
10
|
-
= properties.label property_name.to_s
|
11
|
-
- case field.type.name
|
12
|
-
- when 'Integer'
|
13
|
-
= properties.number_field property_name, value: @dirmon_entry.properties[property_name], class: 'form-control', placeholder: placeholder
|
14
|
-
- when 'Hash'
|
15
|
-
- value = @dirmon_entry.properties[property_name]
|
16
|
-
= properties.text_field property_name, value: value ? value.to_json : '', class: 'form-control', placeholder: '{"key1":"value1", "key2":"value2", "key3":"value3"}'
|
17
|
-
- when 'Array'
|
18
|
-
- options = Array(@dirmon_entry.properties[property_name])
|
19
|
-
= properties.select property_name, options_for_select(options, options), {include_hidden: false}, {class: 'selectize', multiple: true}
|
20
|
-
- when 'Mongoid::Boolean'
|
21
|
-
- name = "#{property_name}_true".to_sym
|
22
|
-
.radio-buttons
|
23
|
-
= properties.label name, 'true'
|
24
|
-
= properties.radio_button(property_name, 'true', checked: @dirmon_entry.properties[property_name] == 'true')
|
25
|
-
= properties.label name, 'false'
|
26
|
-
= properties.radio_button(property_name, 'false', checked: @dirmon_entry.properties[property_name] == 'false')
|
27
|
-
= properties.label name, 'none'
|
28
|
-
= properties.radio_button(property_name, '', checked: @dirmon_entry.properties[property_name].blank?)
|
29
|
-
- else
|
30
|
-
= properties.text_field property_name, value: @dirmon_entry.properties[property_name], class: 'form-control', placeholder: placeholder
|
@@ -1,27 +0,0 @@
|
|
1
|
-
%ul#lg-menu.nav.hidden-xs
|
2
|
-
%li
|
3
|
-
= link_to(new_dirmon_entry_path) do
|
4
|
-
%i.fa.fa-plus
|
5
|
-
Create
|
6
|
-
%li
|
7
|
-
= link_to(dirmon_entries_path) do
|
8
|
-
%i.fa.fa-list
|
9
|
-
All
|
10
|
-
- RocketJob::DirmonEntry.aasm.states.map { |s| s.name.to_s }.each do |state|
|
11
|
-
%li{class: state}
|
12
|
-
= link_to("#{state}_dirmon_entries".to_sym) do
|
13
|
-
%i.fa{class: state_icon(state)}
|
14
|
-
= state.to_s.capitalize!
|
15
|
-
= "(#{dirmon_counts_by_state(state)})"
|
16
|
-
/ tiny only nav
|
17
|
-
%ul#xs-menu.nav.visible-xs
|
18
|
-
%li
|
19
|
-
= link_to(new_dirmon_entry_path) do
|
20
|
-
%i.fa.fa-plus
|
21
|
-
%li
|
22
|
-
= link_to(dirmon_entries_path) do
|
23
|
-
%i.fa.fa-list
|
24
|
-
- RocketJob::DirmonEntry.aasm.states.map { |s| s.name.to_s }.each do |state|
|
25
|
-
%li{class: state}
|
26
|
-
= link_to("#{state}_dirmon_entries".to_sym) do
|
27
|
-
%i.fa{class: state_icon(state)}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
%div
|
2
|
-
%label Name:
|
3
|
-
= @dirmon_entry.name
|
4
|
-
%div
|
5
|
-
%label Pattern:
|
6
|
-
= @dirmon_entry.pattern
|
7
|
-
%div
|
8
|
-
%label Job Class Name:
|
9
|
-
= @dirmon_entry.job_class_name
|
10
|
-
%div
|
11
|
-
%label Archive Directory:
|
12
|
-
= @dirmon_entry.archive_directory
|
13
|
-
- @dirmon_entry.properties.each_pair do |name, value|
|
14
|
-
.parameters
|
15
|
-
%label= "#{name.to_s.titleize}:"
|
16
|
-
- if value.is_a?(Array) || value.is_a?(Hash)
|
17
|
-
%pre
|
18
|
-
%code= pretty_print_array_or_hash(value)
|
19
|
-
- else
|
20
|
-
= value
|
21
|
-
.id
|
22
|
-
%label ID:
|
23
|
-
= @dirmon_entry.id
|
@@ -1,18 +0,0 @@
|
|
1
|
-
.dirmon-list
|
2
|
-
.list
|
3
|
-
%h2 All Entries
|
4
|
-
%table.table.datatable.dirmon-datatable{ style: "width: 100%", data: { source: "#{dirmon_entries_url(format: 'json')}" } }
|
5
|
-
%thead
|
6
|
-
%tr
|
7
|
-
%th Name
|
8
|
-
%th Job Class
|
9
|
-
%th Pattern
|
10
|
-
%tbody
|
11
|
-
|
12
|
-
|
13
|
-
:javascript
|
14
|
-
jQuery(function() {
|
15
|
-
new RjmcDatatable(
|
16
|
-
$('.dirmon-datatable'),
|
17
|
-
[{data: '0'}, {data: '1'}, {data: '2'}]);
|
18
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
.dirmon-list
|
2
|
-
.list
|
3
|
-
%h2 Disabled Entries
|
4
|
-
%table.table.datatable.dirmon-datatable{ style: "width: 100%", data: { source: "#{disabled_dirmon_entries_url(format: 'json')}" } }
|
5
|
-
%thead
|
6
|
-
%tr
|
7
|
-
%th Name
|
8
|
-
%th Job Class
|
9
|
-
%th Pattern
|
10
|
-
%tbody
|
11
|
-
|
12
|
-
:javascript
|
13
|
-
jQuery(function() {
|
14
|
-
new RjmcDatatable(
|
15
|
-
$('.dirmon-datatable'),
|
16
|
-
[{data: '0'}, {data: '1'}, {data: '2'}]);
|
17
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
.dirmon-list
|
2
|
-
.list
|
3
|
-
%h2 Enabled Entries
|
4
|
-
%table.table.datatable.dirmon-datatable{ style: "width: 100%", data: { source: "#{enabled_dirmon_entries_url(format: 'json')}" } }
|
5
|
-
%thead
|
6
|
-
%tr
|
7
|
-
%th Name
|
8
|
-
%th Job Class
|
9
|
-
%th Pattern
|
10
|
-
%tbody
|
11
|
-
|
12
|
-
:javascript
|
13
|
-
jQuery(function() {
|
14
|
-
new RjmcDatatable(
|
15
|
-
$('.dirmon-datatable'),
|
16
|
-
[{data: '0'}, {data: '1'}, {data: '2'}]);
|
17
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
.dirmon-list
|
2
|
-
.list
|
3
|
-
%h2 Failed Entries
|
4
|
-
%table.table.datatable.dirmon-datatable{ style: "width: 100%", data: { source: "#{failed_dirmon_entries_url(format: 'json')}" } }
|
5
|
-
%thead
|
6
|
-
%tr
|
7
|
-
%th Name
|
8
|
-
%th Job Class
|
9
|
-
%th Pattern
|
10
|
-
%tbody
|
11
|
-
|
12
|
-
:javascript
|
13
|
-
jQuery(function() {
|
14
|
-
new RjmcDatatable(
|
15
|
-
$('.dirmon-datatable'),
|
16
|
-
[{data: '0'}, {data: '1'}, {data: '2'}]);
|
17
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
.dirmon-list
|
2
|
-
.list
|
3
|
-
%h2 Pending Entries
|
4
|
-
%table.table.datatable.dirmon-datatable{ style: "width: 100%", data: { source: "#{pending_dirmon_entries_url(format: 'json')}" } }
|
5
|
-
%thead
|
6
|
-
%tr
|
7
|
-
%th Name
|
8
|
-
%th Job Class
|
9
|
-
%th Pattern
|
10
|
-
%tbody
|
11
|
-
|
12
|
-
:javascript
|
13
|
-
jQuery(function() {
|
14
|
-
new RjmcDatatable(
|
15
|
-
$('.dirmon-datatable'),
|
16
|
-
[{data: '0'}, {data: '1'}, {data: '2'}]);
|
17
|
-
});
|
@@ -1,23 +0,0 @@
|
|
1
|
-
.col-md-12.job-status
|
2
|
-
#job
|
3
|
-
.lead= @dirmon_entry.job_class_name
|
4
|
-
|
5
|
-
.job-state.inline-block
|
6
|
-
.left status
|
7
|
-
.right{ class: @dirmon_entry.state }
|
8
|
-
= @dirmon_entry.state
|
9
|
-
|
10
|
-
.btn-toolbar.job-actions.pull-right
|
11
|
-
.btn-group
|
12
|
-
= link_to "Edit", edit_dirmon_entry_path(@dirmon_entry), class: "btn btn-default"
|
13
|
-
.btn-group
|
14
|
-
- if @dirmon_entry.disabled? || @dirmon_entry.pending?
|
15
|
-
= link_to "Enable", enable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default"
|
16
|
-
- if @dirmon_entry.enabled?
|
17
|
-
= link_to "Disable", disable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default", :data => { :confirm => 'Are you sure?' }
|
18
|
-
.btn-group
|
19
|
-
= link_to "Destroy", dirmon_entry_path(@dirmon_entry), method: :delete, class: 'btn btn-default', :data => { :confirm => 'Are you sure?' }
|
20
|
-
|
21
|
-
.clearfix
|
22
|
-
|
23
|
-
= render partial: 'status', locals: { dirmon_entry: @job }
|
@@ -1,28 +0,0 @@
|
|
1
|
-
%ul#lg-menu.nav.hidden-xs
|
2
|
-
%li.active
|
3
|
-
= link_to(jobs_path) do
|
4
|
-
%i.fa.fa-list
|
5
|
-
All
|
6
|
-
%li
|
7
|
-
= link_to(scheduled_jobs_path) do
|
8
|
-
%i.fa.fa-clock-o
|
9
|
-
Scheduled
|
10
|
-
= "(#{job_counts_by_state("scheduled")})"
|
11
|
-
- job_states.each do |state|
|
12
|
-
%li{class: state}
|
13
|
-
= link_to("#{state}_jobs".to_sym) do
|
14
|
-
%i.fa{class: state_icon(state)}
|
15
|
-
= state.capitalize
|
16
|
-
= "(#{job_counts_by_state(state)})"
|
17
|
-
/ tiny only nav
|
18
|
-
%ul#xs-menu.nav.visible-xs
|
19
|
-
%li
|
20
|
-
= link_to(jobs_path) do
|
21
|
-
%i.fa.fa-list
|
22
|
-
%li
|
23
|
-
= link_to(scheduled_jobs_path) do
|
24
|
-
%i.fa.fa-clock-o
|
25
|
-
- job_states.each do |state|
|
26
|
-
%li{class: state}
|
27
|
-
= link_to("#{state}_jobs".to_sym) do
|
28
|
-
%i.fa{class: state_icon(state)}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
- status = job.status(Time.zone)
|
2
|
-
.id
|
3
|
-
%label ID:
|
4
|
-
= status.delete('_id')
|
5
|
-
- if description = status.delete('description')
|
6
|
-
.status-message
|
7
|
-
%label Description:
|
8
|
-
= description
|
9
|
-
- if duration = status.delete('duration')
|
10
|
-
.status-message
|
11
|
-
%label Duration:
|
12
|
-
= duration
|
13
|
-
- if record_count = status.delete('record_count')
|
14
|
-
.status-message
|
15
|
-
%label Record Count:
|
16
|
-
= record_count
|
17
|
-
.created_at
|
18
|
-
%label Created At:
|
19
|
-
= status.delete('created_at')
|
20
|
-
- if started_at = status.delete('started_at')
|
21
|
-
.status-message
|
22
|
-
%label Started At:
|
23
|
-
= started_at
|
24
|
-
- if percent_complete = status.delete('percent_complete')
|
25
|
-
.status-message
|
26
|
-
%label % Complete:
|
27
|
-
= percent_complete
|
28
|
-
|
29
|
-
- remaining = {}
|
30
|
-
- status.each_pair do |key, value|
|
31
|
-
- next if value.blank?
|
32
|
-
.status-message
|
33
|
-
- if ['state', '_type', 'sub_state'].include?(key)
|
34
|
-
- elsif value.kind_of?(Hash) || value.kind_of?(Array)
|
35
|
-
- remaining[key] = value
|
36
|
-
- else
|
37
|
-
%label= "#{key.to_s.titleize}:"
|
38
|
-
= value
|
39
|
-
.clearfix
|
40
|
-
|
41
|
-
- remaining.each_pair do |key, value|
|
42
|
-
.status-message
|
43
|
-
%label= "#{key.to_s.titleize}:"
|
44
|
-
%pre
|
45
|
-
%code= pretty_print_array_or_hash(value)
|