web47core 3.2.9 → 3.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/core_breadcrumb_helper.rb +11 -0
- data/app/helpers/core_card_nav_items_helper.rb +60 -0
- data/app/helpers/core_dropdown_helper.rb +89 -0
- data/app/helpers/core_floating_action_button_helper.rb +82 -0
- data/app/helpers/core_html5_form_helper.rb +163 -0
- data/app/helpers/core_job_state_helper.rb +21 -0
- data/app/helpers/core_remix_icon_helper.rb +23 -0
- data/app/helpers/core_select_two_helper.rb +73 -0
- data/app/helpers/model_modal_helper.rb +1 -1
- data/app/views/cron_servers/index.html.haml +28 -0
- data/app/views/cron_tabs/edit.html.haml +17 -0
- data/app/views/cron_tabs/index.html.haml +35 -0
- data/app/views/delayed_job_metrics/index.html.haml +22 -1
- data/app/views/delayed_job_workers/index.html.haml +30 -1
- data/app/views/delayed_jobs/index.html.haml +28 -1
- data/app/views/delayed_jobs/show.html.haml +55 -1
- data/app/views/system_configurations/edit.html.haml +14 -1
- data/app/views/system_configurations/show.html.haml +18 -1
- data/lib/app/controllers/concerns/core_controller.rb +14 -0
- data/lib/app/controllers/concerns/core_cron_servers_controller.rb +31 -0
- data/lib/app/controllers/concerns/core_cron_tabs_controller.rb +41 -0
- data/lib/app/controllers/concerns/core_delayed_job_metrics_controller.rb +2 -2
- data/lib/app/jobs/cron/trim_command_jobs.rb +1 -1
- data/lib/app/models/concerns/class_name.rb +26 -0
- data/lib/app/models/concerns/tag_able.rb +34 -0
- data/lib/app/models/tag.rb +21 -0
- data/lib/app/models/user_audit_log.rb +2 -2
- data/lib/web47core/version.rb +1 -1
- data/lib/web47core.rb +5 -1
- metadata +18 -25
- data/app/views/admin/cron/edit.html.haml +0 -1
- data/app/views/admin/cron/index.html.haml +0 -1
- data/app/views/admin/delayed_jobs/index.html.haml +0 -1
- data/app/views/admin/delayed_jobs/show.html.haml +0 -1
- data/app/views/admin/system_configurations/edit.html.haml +0 -1
- data/app/views/admin/system_configurations/show.html.haml +0 -1
- data/app/views/cron/_edit.html.haml +0 -19
- data/app/views/cron/_index.html.haml +0 -77
- data/app/views/cron/edit.html.haml +0 -1
- data/app/views/cron/index.html.haml +0 -1
- data/app/views/delayed_job_metrics/_index.html.haml +0 -27
- data/app/views/delayed_job_workers/_index.html.haml +0 -27
- data/app/views/delayed_jobs/_index.html.haml +0 -49
- data/app/views/delayed_jobs/_show.html.haml +0 -60
- data/app/views/stack/cron/edit.html.haml +0 -1
- data/app/views/stack/cron/index.html.haml +0 -1
- data/app/views/stack/delayed_jobs/index.html.haml +0 -1
- data/app/views/stack/delayed_jobs/show.html.haml +0 -1
- data/app/views/stack/system_configurations/edit.html.haml +0 -1
- data/app/views/stack/system_configurations/show.html.haml +0 -1
- data/app/views/system_configurations/_edit.html.haml +0 -15
- data/app/views/system_configurations/_show.html.haml +0 -22
- data/lib/app/controllers/concerns/core_cron_controller.rb +0 -79
@@ -1 +1,30 @@
|
|
1
|
-
|
1
|
+
- title t('.title')
|
2
|
+
.card
|
3
|
+
.card-body
|
4
|
+
.table-responsive.text-nowrap
|
5
|
+
%table.table.card-table.border.table-striped
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
%th Host Name
|
9
|
+
%th PID
|
10
|
+
%th Status
|
11
|
+
%th Last Check In
|
12
|
+
%th Runs
|
13
|
+
%th Actions
|
14
|
+
%tbody.table-border-bottom-0
|
15
|
+
- @workers.each do |worker|
|
16
|
+
%tr
|
17
|
+
%td=worker.host_name
|
18
|
+
%td=worker.pid
|
19
|
+
%td
|
20
|
+
- if worker.dead?
|
21
|
+
= remix_icon(:dislike, tooltip_text: 'Dead')
|
22
|
+
- elsif worker.running?
|
23
|
+
= remix_icon(:run, tooltip_text: 'Running')
|
24
|
+
- else
|
25
|
+
= remix_icon(:zzz, tooltip_text: 'Waiting for jobs')
|
26
|
+
%td=current_user.local_time(worker.last_check_in_at)
|
27
|
+
%td=worker.runs.count
|
28
|
+
%td.actions
|
29
|
+
= delete_dropdown_item(worker, model_path(worker))
|
30
|
+
|
@@ -1 +1,28 @@
|
|
1
|
-
|
1
|
+
- title t('.title')
|
2
|
+
= multiple_floating_action_button do
|
3
|
+
= delete_floating_action_button(Delayed::Backend::Mongoid::Job, class_action_path(:destroy_all, failed_only:true), title: t('.destroy_failed'), confirm: t('.confirm_destroy_failed'))
|
4
|
+
= delete_floating_action_button(Delayed::Backend::Mongoid::Job, class_action_path(:destroy_all, failed_only:false), title: t('.destroy_all'), confirm: t('.confirm_destroy_all'))
|
5
|
+
= refresh_floating_action_link(Delayed::Backend::Mongoid::Job, class_action_path(:resbumit_all, failed_only:true), title: t('.resubmit_failed'), confirm: t('.confirm_resubmit_failed'))
|
6
|
+
= refresh_floating_action_link(Delayed::Backend::Mongoid::Job, class_action_path(:resbumit_all, failed_only:false), title: t('.resubmit_all'), confirm: t('.confirm_resubmit_all'))
|
7
|
+
.card
|
8
|
+
.card-body
|
9
|
+
.table-responsive.text-no-wrap
|
10
|
+
%table.table.card-table.border.table-striped
|
11
|
+
%thead
|
12
|
+
%tr
|
13
|
+
%th Run At
|
14
|
+
%th Name
|
15
|
+
%th Priority
|
16
|
+
%th Status
|
17
|
+
%th Actions
|
18
|
+
%tbody
|
19
|
+
- @delayed_jobs.each do |delayed_job|
|
20
|
+
%tr
|
21
|
+
%td=current_user.local_time(delayed_job.created_at)
|
22
|
+
%td.name=link_to(delayed_job.display_name, model_path(delayed_job))
|
23
|
+
%td=delayed_job.priority
|
24
|
+
%td=delayed_job.status_description
|
25
|
+
%td.actions
|
26
|
+
= dropdown_menu do
|
27
|
+
= replay_dropdown_item(delayed_job, model_action_path(delayed_job, :resubmit), confirm: 'Are you sure you want to restart this job?')
|
28
|
+
= delete_dropdown_item(delayed_job, model_path(delayed_job))
|
@@ -1 +1,55 @@
|
|
1
|
-
|
1
|
+
- title t('.title')
|
2
|
+
- content_for :breadcrumbs do
|
3
|
+
=breadcrumb_step delayed_jobs_path, 'Delayed Job Queue'
|
4
|
+
.card
|
5
|
+
.card-header
|
6
|
+
%h3.float-start=t('.title')
|
7
|
+
= card_nav_items do
|
8
|
+
= delete_nav_link(@delayed_job, delayed_job_path(@delayed_job))
|
9
|
+
= restart_nav_link(@delayed_job, resubmit_delayed_job_path(@delayed_job))
|
10
|
+
.card-body
|
11
|
+
.table-responsive
|
12
|
+
%table.table.card-table.border.table-stripped
|
13
|
+
%thead
|
14
|
+
%tr
|
15
|
+
%th Key
|
16
|
+
%th Value
|
17
|
+
%tbody
|
18
|
+
%tr
|
19
|
+
%td=t('.name_label')
|
20
|
+
%td=@delayed_job.name
|
21
|
+
%tr
|
22
|
+
%td=t('.queue_label')
|
23
|
+
%td=@delayed_job.queue&.titleize
|
24
|
+
%tr
|
25
|
+
%td=t('.priority_label')
|
26
|
+
%td=@delayed_job.priority
|
27
|
+
%tr
|
28
|
+
%td=t('.run_at_label')
|
29
|
+
%td=current_user.local_time(@delayed_job.run_at)
|
30
|
+
%tr
|
31
|
+
%td=t('.locked_at_label')
|
32
|
+
%td=current_user.local_time(@delayed_job.locked_at)
|
33
|
+
%tr
|
34
|
+
%td=t('.locked_by_label')
|
35
|
+
%td=@delayed_job.locked_by.presence || 'N/A'
|
36
|
+
%tr
|
37
|
+
%td=t('.handler_label')
|
38
|
+
%td=@delayed_job.job_payload
|
39
|
+
- if @delayed_job.failed?
|
40
|
+
%tr
|
41
|
+
%td=t('.failed_at_label')
|
42
|
+
%td=current_user.local_time(@delayed_job.failed_at)
|
43
|
+
%tr
|
44
|
+
%td=t('.failed_object_label')
|
45
|
+
%td=@delayed_job.failed_object.inspect
|
46
|
+
%tr
|
47
|
+
%td=t('.failed_method_label')
|
48
|
+
%td=@delayed_job.failed_method_name
|
49
|
+
%tr
|
50
|
+
%td=t('.failed_args_label')
|
51
|
+
%td=@delayed_job.failed_args
|
52
|
+
-if @delayed_job.last_error.present?
|
53
|
+
%tr
|
54
|
+
%td=t('.last_error_label')
|
55
|
+
%td=@delayed_job.last_error
|
@@ -1 +1,14 @@
|
|
1
|
-
|
1
|
+
- title 'Edit'
|
2
|
+
- content_for :breadcrumbs do
|
3
|
+
=breadcrumb_step(system_configurations_path, SystemConfiguration.environment.titleize)
|
4
|
+
%form{action: system_configurations_path, method: :post}
|
5
|
+
%input{type: :hidden, value: form_authenticity_token, name: :authenticity_token}
|
6
|
+
%input{type: :hidden, name: '_method', value: :put}
|
7
|
+
.card
|
8
|
+
.card-body
|
9
|
+
.container
|
10
|
+
.row
|
11
|
+
= html5_text_field(@system_configuration, :switchboard_base_url, classes: %w[col-sm-12 col-lg-4] )
|
12
|
+
= html5_text_field(@system_configuration, :switchboard_stack_id, classes: %w[col-sm-12 col-lg-4])
|
13
|
+
= html5_password(@system_configuration, :switchboard_stack_api_token, classes: %w[col-sm-12 col-lg-4])
|
14
|
+
.card-footer= render 'common/form_actions', form_cancel_path: system_configurations_path
|
@@ -1 +1,18 @@
|
|
1
|
-
|
1
|
+
- title SystemConfiguration.environment.titleize
|
2
|
+
= multiple_floating_action_button do
|
3
|
+
= edit_floating_action_link(SystemConfiguration.configuration, edit_system_configurations_path)
|
4
|
+
= refresh_floating_action_link(SystemConfiguration.configuration, sync_system_configurations_path)
|
5
|
+
.card
|
6
|
+
.card-body
|
7
|
+
.table-responsive.text-nowrap
|
8
|
+
%table.table.card-table.border.table-striped
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th Field
|
12
|
+
%th Value
|
13
|
+
%tbody.table-border-bottom-0
|
14
|
+
- SystemConfiguration.allowed_param_names.each do |field|
|
15
|
+
%tr
|
16
|
+
%td= field
|
17
|
+
%td= mask_system_configuration(field)
|
18
|
+
|
@@ -6,6 +6,20 @@
|
|
6
6
|
module CoreController
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
|
+
protected
|
10
|
+
|
11
|
+
def redirect_to_referrer(default_url)
|
12
|
+
redirect_to session.delete(:referrer) || default_url
|
13
|
+
end
|
14
|
+
|
15
|
+
def capture_referrer_url
|
16
|
+
session[:referrer] = request.referrer
|
17
|
+
end
|
18
|
+
|
19
|
+
def clear_referrer_url
|
20
|
+
session.delete(:referrer)
|
21
|
+
end
|
22
|
+
|
9
23
|
private
|
10
24
|
|
11
25
|
def index_path
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Manage cron_servers job servers
|
5
|
+
#
|
6
|
+
module CoreCronServersController
|
7
|
+
include CoreController
|
8
|
+
# Demote a cron_servers job server
|
9
|
+
def demote
|
10
|
+
cron_server.become_secondary
|
11
|
+
redirect_to_referrer(index_path)
|
12
|
+
rescue StandardError => error
|
13
|
+
log_controller_error error, true
|
14
|
+
redirect_to redirect_to_referrer(index_path)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Destroy a cron_servers job server
|
18
|
+
def destroy
|
19
|
+
cron_server.destroy!
|
20
|
+
redirect_to_referrer(index_path)
|
21
|
+
rescue StandardError => error
|
22
|
+
log_controller_error error, true
|
23
|
+
redirect_to_referrer(index_path)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def cron_server
|
29
|
+
@cron_server ||= Cron::Server.find(params[:id])
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Manage cron_servers job servers
|
5
|
+
#
|
6
|
+
module CoreCronTabsController
|
7
|
+
include CoreController
|
8
|
+
#
|
9
|
+
# Run the crontab entry now
|
10
|
+
#
|
11
|
+
def run_now
|
12
|
+
cron_tab.run
|
13
|
+
redirect_to_referrer index_path
|
14
|
+
rescue StandardError => error
|
15
|
+
log_controller_error error, true
|
16
|
+
redirect_to_referrer index_path
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Update a crontab entry
|
21
|
+
#
|
22
|
+
def update
|
23
|
+
cron_tab.update! cron_tab_params
|
24
|
+
redirect_to_referrer index_path
|
25
|
+
rescue StandardError => error
|
26
|
+
log_controller_error error
|
27
|
+
render :edit
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def cron_tab
|
33
|
+
@cron_tab ||= Cron::Tab.find(params[:id])
|
34
|
+
end
|
35
|
+
|
36
|
+
def cron_tab_params
|
37
|
+
p = params['cron_servers/job_tab']
|
38
|
+
p[:enabled] ||= false
|
39
|
+
p.permit(Cron::Tab.allowed_param_names)
|
40
|
+
end
|
41
|
+
end
|
@@ -20,10 +20,10 @@ module CoreDelayedJobMetricsController
|
|
20
20
|
authorize! :manage, delayed_job_metric
|
21
21
|
delayed_job_metric.destroy!
|
22
22
|
flash.now[:info] = 'Delayed Job Metric has been destroyed'
|
23
|
-
|
23
|
+
redirect_to_referrer index_path
|
24
24
|
rescue StandardError => error
|
25
25
|
log_controller_error error, true
|
26
|
-
|
26
|
+
redirect_to_referrer index_path
|
27
27
|
end
|
28
28
|
|
29
29
|
#
|
@@ -13,7 +13,7 @@ module Cron
|
|
13
13
|
end
|
14
14
|
|
15
15
|
#
|
16
|
-
# Check which audit logs we wanted deleted
|
16
|
+
# Check which audit logs we wanted to be deleted
|
17
17
|
#
|
18
18
|
# Should be older than 90 days and either not a user model audit log or the model associated with
|
19
19
|
# the UserModelAuditLog has been deleted
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Add methods to the Object class
|
5
|
+
#
|
6
|
+
class Object
|
7
|
+
#
|
8
|
+
# Return my class name as a readable string
|
9
|
+
#
|
10
|
+
def class_name
|
11
|
+
self.class.to_s
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# Return my class name as a readable string
|
16
|
+
#
|
17
|
+
def class_name_underscored
|
18
|
+
class_name.underscore
|
19
|
+
end
|
20
|
+
#
|
21
|
+
# Return my class name as a readable titleized string
|
22
|
+
#
|
23
|
+
def class_title
|
24
|
+
class_name_underscored.titleize
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Public: Support taggable entities
|
5
|
+
#
|
6
|
+
module TagAble
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
included do
|
10
|
+
#
|
11
|
+
# Fields
|
12
|
+
#
|
13
|
+
has_many :tags, dependent: :destroy, inverse_of: :model, class_name: 'Tag', foreign_key: :model_id
|
14
|
+
end
|
15
|
+
|
16
|
+
# @abstract Update the tags associated with the model
|
17
|
+
# First update what is from the updated tags
|
18
|
+
# Then delete any that are no longer associated with them
|
19
|
+
# @param updated_tags Array<Types::Tag> - tags to update with
|
20
|
+
def sync_tags(updated_tags)
|
21
|
+
updated_tags.each do |t|
|
22
|
+
tag = tags.where(key: t.key).first_or_initialize(key: t.key, model: self)
|
23
|
+
tag.update! value: t.value
|
24
|
+
end
|
25
|
+
keys = updated_tags.map(&:key)
|
26
|
+
tags.each { |t| t.destroy unless keys.include?(t.key) }
|
27
|
+
end
|
28
|
+
|
29
|
+
def tag_value(key, default = nil)
|
30
|
+
tags.find_by(key: key.to_s).value
|
31
|
+
rescue StandardError
|
32
|
+
default
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Represents a volume.
|
5
|
+
#
|
6
|
+
class Tag
|
7
|
+
include StandardModel
|
8
|
+
#
|
9
|
+
# Fields
|
10
|
+
#
|
11
|
+
field :key, type: String
|
12
|
+
field :value, type: String
|
13
|
+
#
|
14
|
+
# Validations
|
15
|
+
#
|
16
|
+
validates :key, presence: true, uniqueness: { scope: :model_id }
|
17
|
+
#
|
18
|
+
# Relationships
|
19
|
+
#
|
20
|
+
belongs_to :model, polymorphic: true
|
21
|
+
end
|
@@ -23,7 +23,7 @@ class UserAuditLog < AuditLog
|
|
23
23
|
end
|
24
24
|
|
25
25
|
#
|
26
|
-
# Safely return the
|
26
|
+
# Safely return the username
|
27
27
|
#
|
28
28
|
def user_name
|
29
29
|
user.name
|
@@ -34,7 +34,7 @@ class UserAuditLog < AuditLog
|
|
34
34
|
private
|
35
35
|
|
36
36
|
#
|
37
|
-
# update the
|
37
|
+
# update the username in case it is deleted
|
38
38
|
#
|
39
39
|
def record_names
|
40
40
|
return if user.blank?
|
data/lib/web47core/version.rb
CHANGED
data/lib/web47core.rb
CHANGED
@@ -3,6 +3,7 @@ require 'app/models/concerns/app47_logger'
|
|
3
3
|
require 'app/models/concerns/api_tokenable'
|
4
4
|
require 'app/models/concerns/archive_able'
|
5
5
|
require 'app/models/concerns/aws_configuration'
|
6
|
+
require 'app/models/concerns/class_name'
|
6
7
|
require 'app/models/concerns/core_system_configuration'
|
7
8
|
require 'app/models/concerns/core_account'
|
8
9
|
require 'app/models/concerns/cipher_able'
|
@@ -22,6 +23,7 @@ require 'app/models/concerns/switchboard_able'
|
|
22
23
|
require 'app/models/concerns/switchboard_configuration'
|
23
24
|
require 'app/models/concerns/secure_fields'
|
24
25
|
require 'app/models/concerns/twilio_configuration'
|
26
|
+
require 'app/models/concerns/tag_able'
|
25
27
|
require 'app/models/concerns/zendesk_configuration'
|
26
28
|
require 'app/models/command_job'
|
27
29
|
require 'app/models/command_job_log'
|
@@ -44,6 +46,7 @@ require 'app/models/notification_template'
|
|
44
46
|
require 'app/models/slack_notification'
|
45
47
|
require 'app/models/sms_notification'
|
46
48
|
require 'app/models/smtp_configuration'
|
49
|
+
require 'app/models/tag'
|
47
50
|
#
|
48
51
|
# Cron
|
49
52
|
#
|
@@ -80,7 +83,8 @@ require 'web47core/version'
|
|
80
83
|
require 'app/controllers/concerns/restful_controller'
|
81
84
|
require 'app/controllers/concerns/core_controller'
|
82
85
|
require 'app/controllers/concerns/core_system_configuration_controller'
|
83
|
-
require 'app/controllers/concerns/
|
86
|
+
require 'app/controllers/concerns/core_cron_servers_controller'
|
87
|
+
require 'app/controllers/concerns/core_cron_tabs_controller'
|
84
88
|
require 'app/controllers/concerns/core_delayed_jobs_controller'
|
85
89
|
require 'app/controllers/concerns/core_delayed_job_metrics_controller'
|
86
90
|
require 'app/controllers/concerns/core_delayed_job_workers_controller'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web47core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -564,43 +564,32 @@ files:
|
|
564
564
|
- app/controllers/exceptions_controller.rb
|
565
565
|
- app/controllers/notifications_controller.rb
|
566
566
|
- app/controllers/status_controller.rb
|
567
|
+
- app/helpers/core_breadcrumb_helper.rb
|
568
|
+
- app/helpers/core_card_nav_items_helper.rb
|
569
|
+
- app/helpers/core_dropdown_helper.rb
|
570
|
+
- app/helpers/core_floating_action_button_helper.rb
|
567
571
|
- app/helpers/core_form_helper.rb
|
568
572
|
- app/helpers/core_helper.rb
|
573
|
+
- app/helpers/core_html5_form_helper.rb
|
574
|
+
- app/helpers/core_job_state_helper.rb
|
569
575
|
- app/helpers/core_link_helper.rb
|
570
576
|
- app/helpers/core_nav_bar_helper.rb
|
577
|
+
- app/helpers/core_remix_icon_helper.rb
|
578
|
+
- app/helpers/core_select_two_helper.rb
|
571
579
|
- app/helpers/core_table_helper.rb
|
572
580
|
- app/helpers/model_modal_helper.rb
|
573
|
-
- app/views/admin/cron/edit.html.haml
|
574
|
-
- app/views/admin/cron/index.html.haml
|
575
|
-
- app/views/admin/delayed_jobs/index.html.haml
|
576
|
-
- app/views/admin/delayed_jobs/show.html.haml
|
577
|
-
- app/views/admin/system_configurations/edit.html.haml
|
578
|
-
- app/views/admin/system_configurations/show.html.haml
|
579
581
|
- app/views/common/_create_actions.html.haml
|
580
582
|
- app/views/common/_flash.html.haml
|
581
583
|
- app/views/common/_form_actions.html.haml
|
582
584
|
- app/views/common/_update_actions.html.haml
|
583
|
-
- app/views/
|
584
|
-
- app/views/
|
585
|
-
- app/views/
|
586
|
-
- app/views/cron/index.html.haml
|
587
|
-
- app/views/delayed_job_metrics/_index.html.haml
|
585
|
+
- app/views/cron_servers/index.html.haml
|
586
|
+
- app/views/cron_tabs/edit.html.haml
|
587
|
+
- app/views/cron_tabs/index.html.haml
|
588
588
|
- app/views/delayed_job_metrics/index.html.haml
|
589
|
-
- app/views/delayed_job_workers/_index.html.haml
|
590
589
|
- app/views/delayed_job_workers/index.html.haml
|
591
|
-
- app/views/delayed_jobs/_index.html.haml
|
592
|
-
- app/views/delayed_jobs/_show.html.haml
|
593
590
|
- app/views/delayed_jobs/index.html.haml
|
594
591
|
- app/views/delayed_jobs/show.html.haml
|
595
|
-
- app/views/stack/cron/edit.html.haml
|
596
|
-
- app/views/stack/cron/index.html.haml
|
597
|
-
- app/views/stack/delayed_jobs/index.html.haml
|
598
|
-
- app/views/stack/delayed_jobs/show.html.haml
|
599
|
-
- app/views/stack/system_configurations/edit.html.haml
|
600
|
-
- app/views/stack/system_configurations/show.html.haml
|
601
592
|
- app/views/status/index.html.haml
|
602
|
-
- app/views/system_configurations/_edit.html.haml
|
603
|
-
- app/views/system_configurations/_show.html.haml
|
604
593
|
- app/views/system_configurations/edit.html.haml
|
605
594
|
- app/views/system_configurations/show.html.haml
|
606
595
|
- bin/cron_server
|
@@ -615,7 +604,8 @@ files:
|
|
615
604
|
- config/locales/en.yml
|
616
605
|
- config/routes.rb
|
617
606
|
- lib/app/controllers/concerns/core_controller.rb
|
618
|
-
- lib/app/controllers/concerns/
|
607
|
+
- lib/app/controllers/concerns/core_cron_servers_controller.rb
|
608
|
+
- lib/app/controllers/concerns/core_cron_tabs_controller.rb
|
619
609
|
- lib/app/controllers/concerns/core_delayed_job_metrics_controller.rb
|
620
610
|
- lib/app/controllers/concerns/core_delayed_job_workers_controller.rb
|
621
611
|
- lib/app/controllers/concerns/core_delayed_jobs_controller.rb
|
@@ -649,6 +639,7 @@ files:
|
|
649
639
|
- lib/app/models/concerns/aws_configuration.rb
|
650
640
|
- lib/app/models/concerns/cdn_url.rb
|
651
641
|
- lib/app/models/concerns/cipher_able.rb
|
642
|
+
- lib/app/models/concerns/class_name.rb
|
652
643
|
- lib/app/models/concerns/core_account.rb
|
653
644
|
- lib/app/models/concerns/core_smtp_configuration.rb
|
654
645
|
- lib/app/models/concerns/core_system_configuration.rb
|
@@ -664,6 +655,7 @@ files:
|
|
664
655
|
- lib/app/models/concerns/standard_model.rb
|
665
656
|
- lib/app/models/concerns/switchboard_able.rb
|
666
657
|
- lib/app/models/concerns/switchboard_configuration.rb
|
658
|
+
- lib/app/models/concerns/tag_able.rb
|
667
659
|
- lib/app/models/concerns/time_zone_able.rb
|
668
660
|
- lib/app/models/concerns/twilio_configuration.rb
|
669
661
|
- lib/app/models/concerns/zendesk_configuration.rb
|
@@ -681,6 +673,7 @@ files:
|
|
681
673
|
- lib/app/models/slack_notification.rb
|
682
674
|
- lib/app/models/sms_notification.rb
|
683
675
|
- lib/app/models/smtp_configuration.rb
|
676
|
+
- lib/app/models/tag.rb
|
684
677
|
- lib/app/models/template.rb
|
685
678
|
- lib/app/models/user_action_audit_log.rb
|
686
679
|
- lib/app/models/user_audit_log.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
=render '/cron/edit'
|
@@ -1 +0,0 @@
|
|
1
|
-
=render '/cron/index'
|
@@ -1 +0,0 @@
|
|
1
|
-
=render '/delayed_jobs/index'
|
@@ -1 +0,0 @@
|
|
1
|
-
=render '/delayed_jobs/show'
|
@@ -1 +0,0 @@
|
|
1
|
-
= render '/system_configurations/edit'
|
@@ -1 +0,0 @@
|
|
1
|
-
= render '/system_configurations/show'
|
@@ -1,19 +0,0 @@
|
|
1
|
-
- title t('.title', name: @cron_tab.name)
|
2
|
-
|
3
|
-
%form{action: model_path(@cron_tab), method: :post}
|
4
|
-
%input{type: :hidden, value: form_authenticity_token, name: :authenticity_token}
|
5
|
-
%input{type: :hidden, name: '_method', value: :put}
|
6
|
-
.container
|
7
|
-
.row
|
8
|
-
.col.s12
|
9
|
-
.card
|
10
|
-
.card-content
|
11
|
-
.card-title= t('.title', name: @cron_tab.name)
|
12
|
-
.row
|
13
|
-
= form_text_field(@cron_tab, :min)
|
14
|
-
= form_text_field(@cron_tab, :hour)
|
15
|
-
= form_text_field(@cron_tab, :mday)
|
16
|
-
= form_text_field(@cron_tab, :month)
|
17
|
-
= form_text_field(@cron_tab, :wday)
|
18
|
-
= form_checkbox(@cron_tab, :enabled)
|
19
|
-
= render 'common/update_actions', form_cancel_path: index_path
|
@@ -1,77 +0,0 @@
|
|
1
|
-
- title t('cron.index.title')
|
2
|
-
.container
|
3
|
-
.row
|
4
|
-
.col.s12
|
5
|
-
.card
|
6
|
-
.card-content
|
7
|
-
.card-title= t('cron.index.title')
|
8
|
-
.card.section-data-tables
|
9
|
-
.card-content
|
10
|
-
%ul.tabs#stack_cron
|
11
|
-
%li.tab.col.s6
|
12
|
-
%a{href: '#cron_job_servers'}='Cron Servers'
|
13
|
-
%li.tab.col.s6
|
14
|
-
%a{href: '#job_cron_tabs'}='Cron Jobs'
|
15
|
-
.container
|
16
|
-
.row
|
17
|
-
.col.s12
|
18
|
-
#cron_job_servers{data: {cache: 'stack_cron'}}
|
19
|
-
%table.highlight.data-table
|
20
|
-
%thead
|
21
|
-
%tr
|
22
|
-
= table_header_tag :host
|
23
|
-
= table_header_tag :state, priority: 3
|
24
|
-
= table_header_tag :last_check_in_at, priority: 4
|
25
|
-
= table_header_actions_tag
|
26
|
-
%tbody.white-text
|
27
|
-
- Cron::Server.all.each do |server|
|
28
|
-
%tr{class: server.alive? ? 'green lighten-1' : 'red lighten-1'}
|
29
|
-
%td="#{server.host_name}:#{server.pid}"
|
30
|
-
%td.center-align
|
31
|
-
- if server.primary?
|
32
|
-
%i.material-icons.white-text
|
33
|
-
grade
|
34
|
-
- else
|
35
|
-
|
36
|
-
%td=current_user.local_time(server.last_check_in_at)
|
37
|
-
%td.center-align
|
38
|
-
- if can? :manage, server
|
39
|
-
.actions
|
40
|
-
- if server.primary?
|
41
|
-
= action_link_tag(can?(:manage, Cron::Server), model_action_path(server, :demote), icon_name: 'thumb_down' )
|
42
|
-
- else
|
43
|
-
= delete_link_tag(server, model_path(server))
|
44
|
-
.col.s12
|
45
|
-
#job_cron_tabs{data: {cache: 'stack_cron'}}
|
46
|
-
%table.highlight.data-table
|
47
|
-
%thead
|
48
|
-
%tr
|
49
|
-
= table_header_tag :name
|
50
|
-
= table_header_tag :last_run_at, priority: 4
|
51
|
-
= table_header_tag :min, priority: 5
|
52
|
-
= table_header_tag :hour, priority: 6
|
53
|
-
= table_header_tag :mday, priority: 7
|
54
|
-
= table_header_tag :month, priority: 8
|
55
|
-
= table_header_tag :wday, priority: 9
|
56
|
-
= table_header_tag :enabled, priority: 3
|
57
|
-
= table_header_actions_tag
|
58
|
-
%tbody
|
59
|
-
- Cron::JobTab.matching_search_text(params[:search]).each do |cron_tab|
|
60
|
-
%tr
|
61
|
-
%td.name=cron_tab.name.humanize
|
62
|
-
%td=current_user.local_time(cron_tab.last_run_at)
|
63
|
-
%td=cron_tab.min
|
64
|
-
%td=cron_tab.hour
|
65
|
-
%td=cron_tab.mday
|
66
|
-
%td=cron_tab.month
|
67
|
-
%td=cron_tab.wday
|
68
|
-
%td
|
69
|
-
- if cron_tab.valid_environment?
|
70
|
-
%i.material-icons.green-text
|
71
|
-
check
|
72
|
-
- else
|
73
|
-
%nbsp
|
74
|
-
%td.actions
|
75
|
-
= edit_link_tag(cron_tab, edit_model_path(cron_tab))
|
76
|
-
- if cron_tab.valid_environment?
|
77
|
-
= replay_link_tag(cron_tab, model_action_path(cron_tab, :run_now), icon_name: 'directions_run', confirm: t('.confirm', name: cron_tab.name.humanize))
|
@@ -1 +0,0 @@
|
|
1
|
-
= render 'edit'
|
@@ -1 +0,0 @@
|
|
1
|
-
= render 'index'
|