foreman-tasks 0.8.3 → 0.8.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92e635ff069d028c5e508c825046421fbb15ab24
4
- data.tar.gz: 7db062afc016cbe574b668f506acd8b6ed15c249
3
+ metadata.gz: 389ffc4bd5e783510bbc816f36d6d5d34348e6a5
4
+ data.tar.gz: 86f92a216b1429f52d5b0ab3fe1abc06f46151ba
5
5
  SHA512:
6
- metadata.gz: cc9435af11573a58fe294b01faf8e000daca7d8302a43fcb35e6a3d334989af3a6bdb5af352ea47e2eaef693eed292d1db21274bcac58031581927eeb3abf889
7
- data.tar.gz: fd81d5816a6b0155e94e11a6a802fff790b73f7c037b1d608824615e18fa03dc391a18b15e1a0108907d8b15ce94ea2211134d924746dd10de13f6707a0905f2
6
+ metadata.gz: d2dcec67bfe4d2dbda1ac3debced3e5a40121c22e324927f67bfda3371b847aa93568ad219fc8ca4c09c8140d8488a08184b333b4d2f372d42aa7f66c037c90b
7
+ data.tar.gz: b82fa528ef6d581c2c98b375f27f705d0a9e1e6928630f84e0cd6349eaf1a0f747f57d6caff01421d0e8d06f59415581ed8d90221ce15fd03bd80f51810d977e
@@ -0,0 +1,9 @@
1
+ .param-name {
2
+ display: inline-block;
3
+ width: 10em;
4
+ }
5
+
6
+ .task-details pre {
7
+ white-space: pre;
8
+ word-break: normal;
9
+ }
@@ -16,6 +16,41 @@ module ForemanTasks
16
16
  content_tag(:i, '&nbsp'.html_safe, :class => "glyphicon #{icon}") + content_tag(:span, recurring_logic.humanized_state, :class => status)
17
17
  end
18
18
 
19
+ def task_result_icon_class(task)
20
+ return 'task-status pficon-help' if task.state != 'stopped'
21
+
22
+ icon_class = case task.result
23
+ when 'success'
24
+ 'pficon-ok'
25
+ when 'error'
26
+ 'pficon-error-circle-o'
27
+ when 'warning'
28
+ 'pficon-ok status-warn'
29
+ else
30
+ 'pficon-help'
31
+ end
32
+
33
+ "task-status #{icon_class}"
34
+ end
35
+
36
+ def time_in_words_span(time)
37
+ if time.nil?
38
+ _('N/A')
39
+ else
40
+ content_tag :span, (time > Time.now.utc ? _('in %s') : _('%s ago')) % time_ago_in_words(time),
41
+ { :'data-original-title' => time.try(:in_time_zone), :rel => 'twipsy' }
42
+ end
43
+ end
44
+
45
+ def duration_in_words_span(start, finish)
46
+ if start.nil?
47
+ _('N/A')
48
+ else
49
+ content_tag :span, distance_of_time_in_words(start, finish),
50
+ { :'data-original-title' => number_with_delimiter((finish - start).to_i) + _(' seconds'), :rel => 'twipsy' }
51
+ end
52
+ end
53
+
19
54
  def recurring_logic_action_buttons(recurring_logic)
20
55
  buttons = []
21
56
  if authorized_for(:permission => :edit_recurring_logics, :auth_object => recurring_logic)
@@ -141,6 +141,11 @@ module ForemanTasks
141
141
  # we don't want to start executing the task calling to external services
142
142
  # when inside some other transaction. Might lead to unexpected results
143
143
  def ensure_not_in_transaction!
144
+ # we don't care about transactions when using InThreadWorld
145
+ if defined?(::Dynflow::Testing::InThreadWorld) &&
146
+ ForemanTasks.dynflow.world.is_a?(::Dynflow::Testing::InThreadWorld)
147
+ return
148
+ end
144
149
  if self.class.connection.open_transactions > 0
145
150
  raise 'Executing dynflow action inside a transaction is not a good idea'
146
151
  end
@@ -69,6 +69,10 @@ module ForemanTasks
69
69
  self.owner.try(:login)
70
70
  end
71
71
 
72
+ def execution_type
73
+ self.start_at.to_i == self.started_at.to_i ? N_('Immediate') : N_('Delayed')
74
+ end
75
+
72
76
  def humanized
73
77
  { action: label,
74
78
  input: "",
@@ -13,6 +13,12 @@
13
13
  cancel_foreman_tasks_task_path(@task),
14
14
  class: ['btn', 'btn-sm', 'btn-primary', ('disabled' unless @task.cancellable?)].compact,
15
15
  method: :post) %>
16
+ <% if @task.parent_task %>
17
+ <%= link_to(_("Parent task"), foreman_tasks_task_path(@task.parent_task), class: ['btn', 'btn-sm', 'btn-default']) %>
18
+ <% end %>
19
+ <% if @task.sub_tasks.any? %>
20
+ <%= link_to(_("Sub tasks"), sub_tasks_foreman_tasks_task_path(@task), class: ['btn', 'btn-sm', 'btn-default']) %>
21
+ <% end %>
16
22
  <% if Setting['dynflow_allow_dangerous_actions'] %>
17
23
  <%= link_to(_('Unlock'),
18
24
  '',
@@ -79,72 +85,68 @@
79
85
  </div>
80
86
  </div>
81
87
 
82
- <div>
83
- <span class="param-name"><%= _("Id") %>:</span>
84
- <span class="param-value"><%= @task.id %></span>
85
- </div>
86
- <div>
87
- <span class="param-name"><%= _("Label") %>:</span>
88
- <span class="param-value"><%= @task.label %></span>
89
- </div>
90
- <div>
91
- <span class="param-name"><%= _("Name") %>:</span>
92
- <span class="param-value"><%= @task.humanized[:action] %></span>
93
- </div>
94
- <div>
95
- <span class="param-name"><%= _("Owner") %>:</span>
96
- <span class="param-value"><%= @task.username %></span>
97
- </div>
98
- <div>
99
- <span class="param-name"><%= _("Execution type") %>:</span>
100
- <span class="param-value"><%= @task.start_at.nil? ? _('Immediate') : _('Delayed') %></span>
101
- </div>
102
- <div>
103
- <span class="param-name"><%= _("Start at") %>:</span>
104
- <span class="param-value"><%= @task.start_at.nil? ? '-' : @task.start_at %></span>
105
- </div>
106
- <div>
107
- <span class="param-name"><%= _("Start before") %>:</span>
108
- <span class="param-value"><%= @task.start_before.nil? ? '-' : @task.start_before %></span>
109
- </div>
110
- <div>
111
- <span class="param-name"><%= _("Started at") %>:</span>
112
- <span class="param-value"><%= @task.started_at.try(:in_time_zone) %></span>
113
- </div>
114
- <div>
115
- <span class="param-name"><%= _("Ended at") %>:</span>
116
- <span class="param-value"><%= @task.ended_at.try(:in_time_zone) %></span>
117
- </div>
118
- <div>
119
- <span class="param-name"><%= _("State") %>:</span>
120
- <span class="param-value"><%= @task.state %></span>
121
- </div>
122
- <div>
123
- <span class="param-name"><%= _("Result") %>:</span>
124
- <span class="param-value"><%= @task.state == 'running' ? '-' : @task.result %></span>
125
- </div>
126
- <div>
127
- <span class="param-name"><%= _("Params") %>:</span>
128
- <span class="param-value"><%= format_task_input(@task) %></span>
129
- </div>
130
- <% if @task.parent_task %>
131
- <div>
132
- <span class="param-name"><%= link_to(_("Parent task"), foreman_tasks_task_path(@task.parent_task)) %></span>
133
- </div>
134
- <% end %>
135
- <% if @task.sub_tasks.any? %>
136
- <div>
137
- <span class="param-name"><%= link_to(_("Sub tasks"), sub_tasks_foreman_tasks_task_path(@task)) %></span>
88
+ <div class="row">
89
+ <div class="col-md-6">
90
+ <div>
91
+ <span class="param-name list-group-item-heading"><%= _("Name") %>:</span>
92
+ <% task_label = format_task_input(@task, true) %>
93
+ <span class="param-value" data-original-title="<%= task_label %>" rel="twipsy"> <%= truncate(task_label, :length => 50) %></span>
94
+ </div>
95
+ <div>
96
+ <span class="param-name list-group-item-heading"><%= _("Result") %>:</span>
97
+ <span class="param-value">
98
+ <% if @task.state != 'stopped' %>
99
+ <%= content_tag(:i, '&nbsp'.html_safe, :class => 'task-status pficon-help') %>
100
+ <% else %>
101
+ <%= content_tag(:i, '&nbsp'.html_safe, :class => task_result_icon_class(@task)) + content_tag(:span, @task.result) %>
102
+ <% end %>
103
+ </span>
104
+ </div>
105
+ <div>
106
+ <span class="param-name list-group-item-heading"><%= _("Triggered by") %>:</span>
107
+ <span class="param-value">
108
+ <% if @task.owner.present? && @task.username != User::ANONYMOUS_API_ADMIN && @task.username != User::ANONYMOUS_ADMIN %>
109
+ <%= link_to_if_authorized(@task.username, hash_for_edit_user_path(@task.owner)) %>
110
+ <% else %>
111
+ <%= @task.username %>
112
+ <% end %>
113
+ </span>
114
+ </div>
115
+ <div>
116
+ <span class="param-name list-group-item-heading"><%= _("Execution type") %>:</span>
117
+ <span class="param-value"><%= _(@task.execution_type) %></span>
118
+ </div>
119
+ </div>
120
+
121
+ <div class="col-md-6">
122
+ <div>
123
+ <span class="param-name list-group-item-heading"><%= _("Start at") %>:</span>
124
+ <span class="param-value"><%= @task.start_at.nil? ? '-' : time_in_words_span(@task.start_at) %></span>
125
+ </div>
126
+ <div>
127
+ <span class="param-name list-group-item-heading"><%= _("Started at") %>:</span>
128
+ <span class="param-value"><%= time_in_words_span @task.started_at.try(:in_time_zone) %></span>
129
+ </div>
130
+ <div>
131
+ <span class="param-name list-group-item-heading"><%= _("Ended at") %>:</span>
132
+ <span class="param-value"><%= time_in_words_span @task.ended_at.try(:in_time_zone) %></span>
133
+ </div>
134
+ <div>
135
+ <span class="param-name list-group-item-heading"><%= _("Start before") %>:</span>
136
+ <span class="param-value"><%= @task.start_before.nil? ? '-' : time_in_words_span(@task.start_before) %></span>
137
+ </div>
138
+ </div>
138
139
  </div>
139
- <% end %>
140
+
141
+ <br />
142
+
140
143
  <div class="row">
141
- <div class="col-xs-11">
142
- <div class="progress progress-striped <%= 'active' if @task.state == 'running' %>">
143
- <% progress = 100 * @task.progress %>
144
- <% progress_class = if @task.state == 'running'
145
- nil
146
- else
147
- case @task.result
144
+ <div class="col-xs-12">
145
+ <% progress = 100 * @task.progress %>
146
+ <% progress_class = if @task.state == 'running'
147
+ nil
148
+ else
149
+ case @task.result
148
150
  when 'success'
149
151
  'progress-bar-success'
150
152
  when 'error'
@@ -153,27 +155,28 @@
153
155
  'progress-bar-warning'
154
156
  else
155
157
  nil
156
- end
157
- end %>
158
- <% classes = ['progress-bar', progress_class] %>
159
- <div class="<%= classes.join ' ' %>"
158
+ end
159
+ end %>
160
+
161
+ <div class="progress-description <%= 'active' if @task.state == 'running' %>">
162
+ <span class="list-group-item-heading">State:</span> <%= @task.state %>
163
+ </div>
164
+ <div class="progress progress-striped progress-label-top-right">
165
+ <div class="progress-bar <%= progress_class %>"
160
166
  role="progressbar"
161
167
  aria-valuenow="<%= progress %>"
162
168
  aria-valuemin="0"
163
169
  aria-valuemax="100"
164
170
  style="width: <%= progress %>%;">
165
- <span class="sr-only"><%= progress %>% Complete</span>
171
+ <span><%= progress %>% Complete</span>
166
172
  </div>
167
173
  </div>
168
174
  </div>
169
- <div class="col-xs-1">
170
- <%= progress.round %>%
171
- </div>
172
175
  </div>
173
176
 
174
177
  <% unless @task.humanized[:output].blank? %>
175
178
  <div>
176
- <span class="param-name"><%= _("Output") %>:</span>
179
+ <span class="param-name list-group-item-heading"><%= _("Output") %>:</span>
177
180
  <span class="param-value">
178
181
  <pre><%= @task.humanized[:output] %></pre>
179
182
  </span>
@@ -1,13 +1,19 @@
1
- <div>
2
- <ul>
1
+ <%= alert(:close => false, :class => 'alert-info', :header => '',
2
+ :text => _("You can find resource locks on this page. Exclusive lock marked with locked icon means that no other task can use locked resource while this task is running. Non-exclusive lock marked with unlocked icon means other tasks can access the resource freely, it is only used to indicate the relation of this task with the resource")) %>
3
+
4
+ <div class="container-fluid container-cards-pf">
5
+ <div class="row row-cards-pf">
3
6
  <% @task.locks.each do |lock| %>
4
- <li>
5
- name: <%= lock.name %>
6
- <br/>
7
- resource: <%= format('%s id:%s', lock.resource_type, lock.resource_id) %>
8
- <br/>
9
- exclusive: <%= lock.exclusive %>
10
- </li>
7
+ <div class="col-xs-6 col-sm-4 col-md-4">
8
+ <div class="card-pf card-pf-accented card-pf-aggregate-status">
9
+ <h2 class="card-pf-title">
10
+ <span class="fa <%= lock.exclusive ? 'fa-lock' : 'fa-unlock-alt' %>"></span> <%= lock.name %>
11
+ </h2>
12
+ <div class="card-pf-body">
13
+ <%= format('%s id:%s', lock.resource_type, lock.resource_id) %><br>
14
+ </div>
15
+ </div>
16
+ </div>
11
17
  <% end %>
12
- </ul>
18
+ </div>
13
19
  </div>
@@ -1,16 +1,28 @@
1
1
  <div>
2
- <span class="param-name"><%= _("Raw input") %>:</span>
2
+ <span class="param-name list-group-item-heading"><%= _("Id") %>:</span>
3
+ <span class="param-value"><%= @task.id %></span>
4
+ </div>
5
+ <div>
6
+ <span class="param-name list-group-item-heading"><%= _("Label") %>:</span>
7
+ <span class="param-value"><%= @task.label %></span>
8
+ </div>
9
+ <div>
10
+ <span class="param-name list-group-item-heading"><%= _("Duration") %>:</span>
11
+ <span class="param-value"><%= duration_in_words_span(@task.started_at, @task.ended_at || Time.now.utc) %></span>
12
+ </div>
13
+ <div>
14
+ <span class="param-name list-group-item-heading"><%= _("Raw input") %>:</span>
3
15
  <span class="param-value">
4
16
  <pre><%= @task.input.pretty_inspect %></pre>
5
17
  </span>
6
18
  </div>
7
19
  <div>
8
- <span class="param-name"><%= _("Raw output") %>:</span>
20
+ <span class="param-name list-group-item-heading"><%= _("Raw output") %>:</span>
9
21
  <span class="param-value">
10
22
  <pre><%= @task.output.pretty_inspect %></pre>
11
23
  </span>
12
24
  </div>
13
25
  <div>
14
- <span class="param-name"><%= _("External Id") %>:</span>
26
+ <span class="param-name list-group-item-heading"><%= _("External Id") %>:</span>
15
27
  <span class="param-value"><%= @task.external_id %></span>
16
28
  </div>
@@ -1,17 +1,6 @@
1
1
  <% title _("Tasks") %>
2
2
  <% title_actions SETTINGS[:version].short <= '1.13' ? help_path : help_button %>
3
-
4
- <style>
5
- .param-name {
6
- display: inline-block;
7
- width: 10em;
8
- }
9
-
10
- .task-details pre {
11
- white-space: pre;
12
- word-break: normal;
13
- }
14
- </style>
3
+ <% stylesheet 'foreman_tasks/tasks' %>
15
4
 
16
5
  <script>
17
6
 
@@ -1,3 +1,5 @@
1
+ <% stylesheet 'foreman_tasks/tasks' %>
2
+
1
3
  <script>
2
4
  if (typeof taskProgressReloader === 'undefined') {
3
5
  var taskProgressReloader = {
@@ -29,7 +29,7 @@ DESC
29
29
  s.extra_rdoc_files = Dir['README*', 'LICENSE']
30
30
 
31
31
  s.add_dependency "foreman-tasks-core"
32
- s.add_dependency "dynflow", '~> 0.8.16'
32
+ s.add_dependency "dynflow", '~> 0.8.17'
33
33
  s.add_dependency "sequel" # for Dynflow process persistence
34
34
  s.add_dependency "sinatra" # for Dynflow web console
35
35
  s.add_dependency "daemons" # for running remote executor
@@ -82,6 +82,10 @@ module ForemanTasks
82
82
  return @world
83
83
  end
84
84
 
85
+ def world=(world)
86
+ @world = world
87
+ end
88
+
85
89
  def web_console
86
90
  ::Dynflow::Web.setup do
87
91
  before do
@@ -94,8 +94,6 @@ module ForemanTasks
94
94
  end
95
95
  end
96
96
 
97
- protected
98
-
99
97
  # generates the options hash consumable by the Dynflow's world
100
98
  def world_config
101
99
  ::Dynflow::Config.new.tap do |config|
@@ -112,6 +110,8 @@ module ForemanTasks
112
110
  end
113
111
  end
114
112
 
113
+ protected
114
+
115
115
  def default_sequel_adapter_options
116
116
  db_config = ActiveRecord::Base.configurations[Rails.env].dup
117
117
  db_config['adapter'] = 'postgres' if db_config['adapter'] == 'postgresql'
@@ -131,7 +131,6 @@ module ForemanTasks
131
131
  ::PuppetclassesController.send :include, ForemanTasks::Concerns::EnvironmentsExtension
132
132
  ::EnvironmentsController.send :include, ForemanTasks::Concerns::EnvironmentsExtension
133
133
  ::Host::Base.send :include, ForemanTasks::Concerns::HostActionSubject
134
- ::Architecture.send :include, ForemanTasks::Concerns::ArchitectureActionSubject
135
134
  end
136
135
  end
137
136
 
@@ -0,0 +1,23 @@
1
+ require 'dynflow/testing'
2
+ module ForemanTasks
3
+ module TestHelpers
4
+ def self.test_in_thread_world
5
+ world_config = ForemanTasks.dynflow.config.world_config
6
+ @test_in_thread_world ||= ::Dynflow::Testing::InThreadWorld.new(world_config)
7
+ end
8
+
9
+ module WithInThreadExecutor
10
+ extend ActiveSupport::Concern
11
+ included do
12
+ setup do
13
+ @old_dynflow_world = ForemanTasks.dynflow.world
14
+ ForemanTasks.dynflow.world = ForemanTasks::TestHelpers.test_in_thread_world
15
+ end
16
+
17
+ teardown do
18
+ ForemanTasks.dynflow.world = @old_dynflow_world
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-01 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks-core
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.8.16
33
+ version: 0.8.17
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.8.16
40
+ version: 0.8.17
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sequel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -114,6 +114,7 @@ files:
114
114
  - README.md
115
115
  - app/assets/javascripts/trigger_form.js
116
116
  - app/assets/stylesheets/foreman_tasks/application.css.scss
117
+ - app/assets/stylesheets/foreman_tasks/tasks.css.scss
117
118
  - app/assets/stylesheets/foreman_tasks/trigger_form.css
118
119
  - app/controllers/foreman_tasks/api/recurring_logics_controller.rb
119
120
  - app/controllers/foreman_tasks/api/tasks_controller.rb
@@ -128,9 +129,6 @@ files:
128
129
  - app/lib/actions/base.rb
129
130
  - app/lib/actions/bulk_action.rb
130
131
  - app/lib/actions/entry_action.rb
131
- - app/lib/actions/foreman/architecture/create.rb
132
- - app/lib/actions/foreman/architecture/destroy.rb
133
- - app/lib/actions/foreman/architecture/update.rb
134
132
  - app/lib/actions/foreman/host/import_facts.rb
135
133
  - app/lib/actions/foreman/puppetclass/import.rb
136
134
  - app/lib/actions/helpers/args_serialization.rb
@@ -146,7 +144,6 @@ files:
146
144
  - app/lib/proxy_api/foreman_dynflow/dynflow_proxy.rb
147
145
  - app/models/foreman_tasks/concerns/action_subject.rb
148
146
  - app/models/foreman_tasks/concerns/action_triggering.rb
149
- - app/models/foreman_tasks/concerns/architecture_action_subject.rb
150
147
  - app/models/foreman_tasks/concerns/host_action_subject.rb
151
148
  - app/models/foreman_tasks/lock.rb
152
149
  - app/models/foreman_tasks/recurring_logic.rb
@@ -223,6 +220,7 @@ files:
223
220
  - lib/foreman_tasks/tasks/dynflow.rake
224
221
  - lib/foreman_tasks/tasks/export_tasks.rake
225
222
  - lib/foreman_tasks/test_extensions.rb
223
+ - lib/foreman_tasks/test_helpers.rb
226
224
  - lib/foreman_tasks/triggers.rb
227
225
  - lib/foreman_tasks/version.rb
228
226
  - lib/tasks/gettext.rake
@@ -1,29 +0,0 @@
1
- module Actions
2
- module Foreman
3
- module Architecture
4
- class Create < Actions::EntryAction
5
-
6
- def plan(architecture)
7
- action_subject(architecture, :changes => architecture.changes)
8
- end
9
-
10
- def humanized_name
11
- _("Create architecture")
12
- end
13
-
14
- def humanized_input
15
- input[:architecture] && input[:architecture][:name]
16
- end
17
-
18
- def cli_example
19
- return unless input[:architecture]
20
- <<-EXAMPLE
21
- hammer architecture create --id '#{task_input[:architecture][:id]}' \
22
- --name '#{task_input[:architecture][:name]}'
23
- EXAMPLE
24
- end
25
-
26
- end
27
- end
28
- end
29
- end
@@ -1,28 +0,0 @@
1
- module Actions
2
- module Foreman
3
- module Architecture
4
- class Destroy < Actions::EntryAction
5
-
6
- def plan(architecture)
7
- action_subject(architecture)
8
- end
9
-
10
- def humanized_name
11
- _("Delete architecture")
12
- end
13
-
14
- def humanized_input
15
- input[:architecture] && input[:architecture][:name]
16
- end
17
-
18
- def cli_example
19
- return unless input[:architecture]
20
- <<-EXAMPLE
21
- hammer architecture delete --id '#{task_input[:architecture][:id]}'
22
- EXAMPLE
23
- end
24
-
25
- end
26
- end
27
- end
28
- end
@@ -1,21 +0,0 @@
1
- module Actions
2
- module Foreman
3
- module Architecture
4
- class Update < Actions::EntryAction
5
-
6
- def plan(architecture)
7
- action_subject(architecture, :changes => architecture.changes)
8
- end
9
-
10
- def humanized_name
11
- _("Update architecture")
12
- end
13
-
14
- def humanized_input
15
- input[:architecture] && input[:architecture][:name]
16
- end
17
-
18
- end
19
- end
20
- end
21
- end
@@ -1,21 +0,0 @@
1
- module ForemanTasks
2
- module Concerns
3
- module ArchitectureActionSubject
4
- extend ActiveSupport::Concern
5
- include ForemanTasks::Concerns::ActionSubject
6
- include ForemanTasks::Concerns::ActionTriggering
7
-
8
- def create_action
9
- ::Actions::Foreman::Architecture::Create
10
- end
11
-
12
- def update_action
13
- ::Actions::Foreman::Architecture::Update
14
- end
15
-
16
- def destroy_action
17
- ::Actions::Foreman::Architecture::Destroy
18
- end
19
- end
20
- end
21
- end