foreman-tasks 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/foreman_tasks/api/tasks_controller.rb +29 -1
  3. data/app/controllers/foreman_tasks/tasks_controller.rb +3 -11
  4. data/app/models/foreman_tasks/task.rb +4 -0
  5. data/app/models/setting/foreman_tasks.rb +1 -1
  6. data/app/services/ui_notifications/tasks/task_bulk_stop.rb +36 -0
  7. data/app/views/foreman_tasks/api/tasks/details.json.rabl +0 -1
  8. data/config/routes.rb +1 -0
  9. data/db/migrate/20200517215015_rename_bookmarks_controller.rb +35 -0
  10. data/db/migrate/20200519093217_drop_dynflow_allow_dangerous_actions_setting.foreman_tasks.rb +5 -0
  11. data/db/seeds.d/30-notification_blueprints.rb +7 -0
  12. data/lib/foreman_tasks/engine.rb +1 -1
  13. data/lib/foreman_tasks/tasks/cleanup.rake +2 -2
  14. data/lib/foreman_tasks/tasks/export_tasks.rake +1 -1
  15. data/lib/foreman_tasks/version.rb +1 -1
  16. data/locale/action_names.rb +1 -1
  17. data/locale/en/foreman_tasks.po +227 -41
  18. data/locale/foreman_tasks.pot +579 -288
  19. data/webpack/ForemanTasks/Components/TaskActions/TaskAction.test.js +60 -0
  20. data/webpack/ForemanTasks/Components/{TasksTable/TasksTableActionHelpers.js → TaskActions/TaskActionHelpers.js} +21 -6
  21. data/webpack/ForemanTasks/Components/{TasksTable/__tests__/TasksTableActionHelpers.test.js → TaskActions/TaskActionHelpers.test.js} +2 -2
  22. data/webpack/ForemanTasks/Components/TaskActions/TaskActionsConstants.js +16 -0
  23. data/webpack/ForemanTasks/Components/TaskActions/UnlockModals.js +60 -0
  24. data/webpack/ForemanTasks/Components/TaskActions/UnlockModals.test.js +14 -0
  25. data/webpack/ForemanTasks/Components/TaskActions/__snapshots__/TaskAction.test.js.snap +233 -0
  26. data/webpack/ForemanTasks/Components/TaskActions/__snapshots__/UnlockModals.test.js.snap +25 -0
  27. data/webpack/ForemanTasks/Components/TaskActions/index.js +115 -0
  28. data/webpack/ForemanTasks/Components/TaskDetails/Components/Task.js +130 -152
  29. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/Task.test.js +67 -3
  30. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/TaskInfo.test.js +0 -1
  31. data/webpack/ForemanTasks/Components/TaskDetails/Components/__tests__/__snapshots__/Task.test.js.snap +101 -70
  32. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsActions.js +0 -15
  33. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsConstants.js +0 -5
  34. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsReducer.js +0 -6
  35. data/webpack/ForemanTasks/Components/TaskDetails/TaskDetailsSelectors.js +0 -9
  36. data/webpack/ForemanTasks/Components/TaskDetails/TasksDetailsHelper.js +6 -1
  37. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/TaskDetails.test.js +5 -0
  38. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/__snapshots__/TaskDetails.test.js.snap +2 -7
  39. data/webpack/ForemanTasks/Components/TaskDetails/__tests__/integration.test.js +4 -0
  40. data/webpack/ForemanTasks/Components/TaskDetails/index.js +4 -8
  41. data/webpack/ForemanTasks/Components/TasksTable/Components/ActionSelectButton.js +14 -1
  42. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModal.js +83 -0
  43. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalActions.js +106 -0
  44. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalReducer.js +38 -0
  45. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/ConfirmModalSelectors.js +45 -0
  46. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModal.test.js +36 -0
  47. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalActions.test.js +205 -0
  48. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalReducer.test.js +27 -0
  49. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/ConfirmModalSelectors.test.js +54 -0
  50. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModal.test.js.snap +41 -0
  51. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalReducer.test.js.snap +19 -0
  52. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/__test__/__snapshots__/ConfirmModalSelectors.test.js.snap +30 -0
  53. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmModal/index.js +29 -0
  54. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ActionSelectButton.test.js +1 -0
  55. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ActionSelectButton.test.js.snap +11 -0
  56. data/webpack/ForemanTasks/Components/TasksTable/TasksBulkActions.js +113 -30
  57. data/webpack/ForemanTasks/Components/TasksTable/TasksTable.js +13 -9
  58. data/webpack/ForemanTasks/Components/TasksTable/TasksTableActions.js +23 -63
  59. data/webpack/ForemanTasks/Components/TasksTable/TasksTableConstants.js +10 -12
  60. data/webpack/ForemanTasks/Components/TasksTable/TasksTablePage.js +24 -94
  61. data/webpack/ForemanTasks/Components/TasksTable/TasksTableSchema.js +2 -2
  62. data/webpack/ForemanTasks/Components/TasksTable/TasksTableSelectors.js +7 -4
  63. data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksBulkActions.test.js +35 -0
  64. data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTable.fixtures.js +2 -12
  65. data/webpack/ForemanTasks/Components/TasksTable/__tests__/TasksTableActions.test.js +22 -26
  66. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/SubTasksPage.test.js.snap +2 -14
  67. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksBulkActions.test.js.snap +107 -0
  68. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksIndexPage.test.js.snap +2 -14
  69. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTableActions.test.js.snap +17 -124
  70. data/webpack/ForemanTasks/Components/TasksTable/__tests__/__snapshots__/TasksTablePage.test.js.snap +24 -128
  71. data/webpack/ForemanTasks/Components/TasksTable/index.js +2 -2
  72. data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.js +47 -19
  73. data/webpack/ForemanTasks/Components/common/ActionButtons/ActionButton.test.js +61 -14
  74. data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ActionButton.test.js.snap +80 -21
  75. data/webpack/ForemanTasks/Components/common/ClickConfirmation/ClickConfirmation.scss +9 -0
  76. data/webpack/ForemanTasks/Components/common/ClickConfirmation/ClickConfirmation.test.js +44 -0
  77. data/webpack/ForemanTasks/Components/common/ClickConfirmation/__snapshots__/ClickConfirmation.test.js.snap +52 -0
  78. data/webpack/ForemanTasks/Components/common/ClickConfirmation/index.js +59 -66
  79. data/webpack/ForemanTasks/Components/common/{ToastTypesConstants.js → ToastsHelpers/ToastTypesConstants.js} +0 -0
  80. data/webpack/ForemanTasks/Components/common/ToastsHelpers/index.js +15 -0
  81. data/webpack/ForemanTasks/ForemanTasksReducers.js +2 -0
  82. data/webpack/ForemanTasks/Routes/ForemanTasksRoutes.test.js +2 -1
  83. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalHooks.js +2 -2
  84. data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +17 -3
  85. data/webpack/__mocks__/foremanReact/components/common/ActionButtons/ActionButtons.js +3 -0
  86. metadata +32 -22
  87. data/db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb +0 -9
  88. data/lib/foreman_tasks/tasks/dynflow.rake +0 -6
  89. data/webpack/ForemanTasks/Components/TasksTable/Components/CancelConfirm.js +0 -53
  90. data/webpack/ForemanTasks/Components/TasksTable/Components/ConfirmationModals.js +0 -56
  91. data/webpack/ForemanTasks/Components/TasksTable/Components/ResumeConfirm.js +0 -52
  92. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/CancelConfirm.test.js +0 -26
  93. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ConfirmationModals.test.js +0 -24
  94. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/ResumeConfirm.test.js +0 -26
  95. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/CancelConfirm.test.js.snap +0 -65
  96. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ConfirmationModals.test.js.snap +0 -30
  97. data/webpack/ForemanTasks/Components/TasksTable/Components/__test__/__snapshots__/ResumeConfirm.test.js.snap +0 -63
  98. data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.js +0 -23
  99. data/webpack/ForemanTasks/Components/common/ActionButtons/CancelButton.test.js +0 -26
  100. data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.js +0 -23
  101. data/webpack/ForemanTasks/Components/common/ActionButtons/ResumeButton.test.js +0 -27
  102. data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/CancelButton.test.js.snap +0 -15
  103. data/webpack/ForemanTasks/Components/common/ActionButtons/__snapshots__/ResumeButton.test.js.snap +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2763cf62835dc3d4375a83b6fdff446ef0f50b0229c732a0e6b17e681b45935b
4
- data.tar.gz: 8845f763b8d400ed8e8dcf267798e4891234f7eada43ae3f38292409d0ca50fd
3
+ metadata.gz: b64fbe722db23184eb2bc9db457a71ed09402fc404bed3aa0448c0f30deff8f7
4
+ data.tar.gz: 39afeebd07ee4012eb1bd9435d5d72400ef56582bb29a6f097c7f1b440cbaedc
5
5
  SHA512:
6
- metadata.gz: 7aba491ebd02b8361ea237d588b256c8d4e6bc8e7d1b0d30872acc6267fce59cbaa46695c20c4099c897081cde81ae363de22c69456a97ddbb059a0be83303df
7
- data.tar.gz: fa79277831760d12364f69f7390664e391531e98451e50861ffc174210be91073deae4bcb697b0d8adc944bc7cc3a3e28b092812e0186da5782a6ac554bc6869
6
+ metadata.gz: 03a87fdc09be2d0a66995b2ee1abcf053c16c179d616a1b7bb680c15241aa5c58485512fdfa6452e8aba1dec7016bca350ad291709c967a4e8ad8ae917e120aa
7
+ data.tar.gz: 3ae631a58bb8de68e6a8b4dac32cbf143204f99476701464a7eda552f60bd1fa93518226eaae0b6da9e18d14bfd83c5d14c3484e6a527bf26b1c4e0228ad5458
@@ -141,6 +141,34 @@ module ForemanTasks
141
141
  }
142
142
  end
143
143
 
144
+ api :POST, '/tasks/bulk_stop', N_('Stop all stoppable tasks')
145
+ param :search, String, :desc => N_('Stop tasks matching search string')
146
+ param :task_ids, Array, :desc => N_('Stop specific tasks by ID')
147
+ def bulk_stop
148
+ if params[:search].nil? && params[:task_ids].nil?
149
+ raise BadRequest, _('Please provide at least one of search or task_ids parameters in the request')
150
+ end
151
+
152
+ filtered_scope = bulk_scope
153
+ total_length = filtered_scope.count
154
+ to_stop = filtered_scope.where.not(state: :stopped)
155
+ to_stop_length = to_stop.count
156
+ skipped_length = total_length - to_stop_length
157
+
158
+ to_stop.find_each { |task| task.update(state: :stopped) }
159
+
160
+ if params[:search]
161
+ notification = UINotifications::Tasks::TaskBulkStop.new(filtered_scope.first, to_stop_length, skipped_length)
162
+ notification.deliver!
163
+ end
164
+
165
+ render :json => {
166
+ total: total_length,
167
+ stopped_length: to_stop_length,
168
+ skipped_length: skipped_length
169
+ }
170
+ end
171
+
144
172
  api :GET, '/tasks', N_('List tasks')
145
173
  param :search, String, :desc => N_('Search string')
146
174
  param :page, :number, :desc => N_('Page number, starting at 1')
@@ -291,7 +319,7 @@ module ForemanTasks
291
319
  case params[:action]
292
320
  when 'bulk_search', 'summary', 'details', 'sub_tasks'
293
321
  :view
294
- when 'bulk_resume', 'bulk_cancel'
322
+ when 'bulk_resume', 'bulk_cancel', 'bulk_stop'
295
323
  :edit
296
324
  else
297
325
  super
@@ -3,8 +3,6 @@ module ForemanTasks
3
3
  include Foreman::Controller::AutoCompleteSearch
4
4
  include Foreman::Controller::CsvResponder
5
5
 
6
- before_action :restrict_dangerous_actions, :only => [:unlock, :force_unlock]
7
-
8
6
  def show
9
7
  @task = resource_base.find(params[:id])
10
8
  render :layout => !request.xhr?
@@ -72,19 +70,17 @@ module ForemanTasks
72
70
  if task.paused?
73
71
  task.state = :stopped
74
72
  task.save!
75
- flash[:info] = _('The task resources were unlocked.')
73
+ render json: { statusText: 'OK' }
76
74
  else
77
- flash[:warning] = _('The execution has to be paused.')
75
+ render json: {}, status: :bad_request
78
76
  end
79
- redirect_back(:fallback_location => foreman_tasks_task_path(task))
80
77
  end
81
78
 
82
79
  def force_unlock
83
80
  task = find_dynflow_task
84
81
  task.state = :stopped
85
82
  task.save!
86
- flash[:info] = _('The task resources were unlocked with force.')
87
- redirect_back(:fallback_location => foreman_tasks_task_path(task))
83
+ render json: { statusText: 'OK' }
88
84
  end
89
85
 
90
86
  # we need do this to make the Foreman helpers working properly
@@ -103,10 +99,6 @@ module ForemanTasks
103
99
  csv_response(@tasks, [:id, :action, :state, :result, 'started_at.in_time_zone', 'ended_at.in_time_zone', :username], ['Id', 'Action', 'State', 'Result', 'Started At', 'Ended At', 'User'])
104
100
  end
105
101
 
106
- def restrict_dangerous_actions
107
- render_403 unless Setting['dynflow_allow_dangerous_actions']
108
- end
109
-
110
102
  def controller_permission
111
103
  'foreman_tasks'
112
104
  end
@@ -70,6 +70,10 @@ module ForemanTasks
70
70
  end)
71
71
  scope :for_action_types, (->(action_types) { where('foreman_tasks_tasks.label IN (?)', Array(action_types)) })
72
72
 
73
+ class Jail < Safemode::Jail
74
+ allow :started_at, :ended_at, :result, :state, :label, :main_action
75
+ end
76
+
73
77
  def input
74
78
  {}
75
79
  end
@@ -2,7 +2,6 @@ class Setting::ForemanTasks < Setting
2
2
  def self.default_settings
3
3
  [
4
4
  set('foreman_tasks_sync_task_timeout', N_('Number of seconds to wait for synchronous task to finish.'), 120),
5
- set('dynflow_allow_dangerous_actions', N_('Allow unlocking actions which can have dangerous consequences.'), false),
6
5
  set('dynflow_enable_console', N_('Enable the dynflow console (/foreman_tasks/dynflow) for debugging'), true),
7
6
  set('dynflow_console_require_auth', N_('Require user to be authenticated as user with admin rights when accessing dynflow console'), true),
8
7
  set('foreman_tasks_proxy_action_retry_count', N_('Number of attempts to start a task on the smart proxy before failing'), 4),
@@ -24,6 +23,7 @@ class Setting::ForemanTasks < Setting
24
23
 
25
24
  def self.load_defaults
26
25
  Setting::BLANK_ATTRS.push('foreman_tasks_troubleshooting_url')
26
+ Setting::NONZERO_ATTRS.push('foreman_tasks_polling_multiplier')
27
27
  super
28
28
  end
29
29
  end
@@ -0,0 +1,36 @@
1
+ module UINotifications
2
+ module Tasks
3
+ class TaskBulkStop < ::UINotifications::Base
4
+ def initialize(task, stopped_length, skipped_length)
5
+ @subject = task
6
+ @stopped_length = stopped_length
7
+ @skipped_length = skipped_length
8
+ end
9
+
10
+ def create
11
+ Notification.create!(
12
+ initiator: initiator,
13
+ audience: audience,
14
+ subject: subject,
15
+ notification_blueprint: blueprint,
16
+ message: message,
17
+ notification_recipients: [NotificationRecipient.create(:user => User.current)]
18
+ )
19
+ end
20
+
21
+ def audience
22
+ Notification::AUDIENCE_GLOBAL
23
+ end
24
+
25
+ def message
26
+ ('%{stopped} Tasks were stopped. %{skipped} Tasks were already stopped. ' %
27
+ { stopped: @stopped_length,
28
+ skipped: @skipped_length })
29
+ end
30
+
31
+ def blueprint
32
+ @blueprint ||= NotificationBlueprint.find_by(name: 'tasks_bulk_stop')
33
+ end
34
+ end
35
+ end
36
+ end
@@ -9,7 +9,6 @@ node(:failed_steps) { @task.input_output_failed_steps }
9
9
  node(:running_steps) { @task.input_output_running_steps }
10
10
  node(:help) { troubleshooting_info_text }
11
11
  node(:has_sub_tasks) { @task.sub_tasks.any? }
12
- node(:allowDangerousActions) { Setting['dynflow_allow_dangerous_actions'] }
13
12
  node(:locks) do
14
13
  @task.locks.map do |lock|
15
14
  { name: lock.name, exclusive: lock.exclusive, resource_type: lock.resource_type, resource_id: lock.resource_id }
@@ -56,6 +56,7 @@ Foreman::Application.routes.draw do
56
56
  post :bulk_search
57
57
  post :bulk_resume
58
58
  post :bulk_cancel
59
+ post :bulk_stop
59
60
  get :summary
60
61
  get '/summary/:id/sub_tasks/', action: 'summary_sub_tasks'
61
62
  post :callback
@@ -0,0 +1,35 @@
1
+ class RenameBookmarksController < ActiveRecord::Migration[5.2]
2
+ def up
3
+ original_controller = 'foreman_tasks_tasks'
4
+ original_bookmarks = Bookmark.where(controller: original_controller)
5
+ original_bookmarks_names = Hash[original_bookmarks.pluck(:name, :id)]
6
+
7
+ new_controller = 'foreman_tasks/tasks'
8
+ new_bookmarks = Bookmark.where(controller: new_controller)
9
+ new_bookmarks.find_each do |new_bookmark|
10
+ name = new_bookmark.name
11
+ is_name_taken = original_bookmarks_names.key? name
12
+
13
+ if is_name_taken
14
+ original_bookmark = original_bookmarks.find(original_bookmarks_names[name])
15
+ is_duplicated = original_bookmark.query == new_bookmark.query &&
16
+ original_bookmark.owner_id == new_bookmark.owner_id &&
17
+ original_bookmark.owner_type == new_bookmark.owner_type &&
18
+ original_bookmark.public == new_bookmark.public
19
+
20
+ if is_duplicated
21
+ original_bookmark.destroy
22
+ else
23
+ modified_name = "#{name}_#{generate_token}"
24
+ original_bookmark.update(name: modified_name)
25
+ end
26
+ end
27
+ # Revert to the original controller name
28
+ new_bookmark.update(controller: original_controller)
29
+ end
30
+ end
31
+
32
+ def generate_token
33
+ SecureRandom.base64(5).gsub(/[^0-9a-z ]/i, '')
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ class DropDynflowAllowDangerousActionsSetting < ActiveRecord::Migration[6.0]
2
+ def up
3
+ Setting.where(name: 'dynflow_allow_dangerous_actions').delete_all
4
+ end
5
+ end
@@ -41,6 +41,13 @@ blueprints = [
41
41
  name: 'tasks_bulk_cancel',
42
42
  level: 'info',
43
43
  message: "DYNAMIC",
44
+ },
45
+
46
+ {
47
+ group: N_('Tasks'),
48
+ name: 'tasks_bulk_stop',
49
+ level: 'info',
50
+ message: "DYNAMIC",
44
51
  }
45
52
  ]
46
53
 
@@ -53,7 +53,7 @@ module ForemanTasks
53
53
  :'foreman_tasks/react' => [:index],
54
54
  :'foreman_tasks/api/tasks' => [:bulk_search, :show, :index, :summary, :summary_sub_tasks, :details, :sub_tasks] }, :resource_type => ForemanTasks::Task.name
55
55
  permission :edit_foreman_tasks, { :'foreman_tasks/tasks' => [:resume, :unlock, :force_unlock, :cancel_step, :cancel, :abort],
56
- :'foreman_tasks/api/tasks' => [:bulk_resume, :bulk_cancel] }, :resource_type => ForemanTasks::Task.name
56
+ :'foreman_tasks/api/tasks' => [:bulk_resume, :bulk_cancel, :bulk_stop] }, :resource_type => ForemanTasks::Task.name
57
57
 
58
58
  permission :create_recurring_logics, {}, :resource_type => ForemanTasks::RecurringLogic.name
59
59
 
@@ -14,7 +14,7 @@ namespace :foreman_tasks do
14
14
  If TASK_SEARCH is set then AFTER, STATES can be set and it's used for cleanup. If TASK_SEARCH is not set then
15
15
  the cleanup respects the configuration file and setting AFTER or STATES will throw exception.
16
16
  DESC
17
- task :run => ['environment', 'dynflow:client'] do
17
+ task :run => 'environment' do
18
18
  options = {}
19
19
 
20
20
  options[:filter] = ENV['TASK_SEARCH'] if ENV['TASK_SEARCH']
@@ -38,7 +38,7 @@ namespace :foreman_tasks do
38
38
  end
39
39
 
40
40
  desc 'Show the current configuration for auto-cleanup'
41
- task :config => ['environment', 'dynflow:client'] do
41
+ task :config => 'environment' do
42
42
  if ForemanTasks::Cleaner.cleanup_settings[:after]
43
43
  puts _('The tasks will be deleted after %{after}') % { :after => ForemanTasks::Cleaner.cleanup_settings[:after] }
44
44
  else
@@ -19,7 +19,7 @@ namespace :foreman_tasks do
19
19
  all unsuccessful tasks in the past 60 days. The default TASK_FORMAT is html
20
20
  which requires a tar.gz file extension.
21
21
  DESC
22
- task :export_tasks => [:environment, 'dynflow:client'] do
22
+ task :export_tasks => :environment do
23
23
  deprecated_options = { :tasks => 'TASK_SEARCH',
24
24
  :days => 'TASK_DAYS',
25
25
  :export => 'TASK_FILE' }
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '1.1.3'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -1,5 +1,5 @@
1
1
  # Autogenerated!
2
2
  _("Remote action:")
3
3
  _("Import Puppet classes")
4
- _("Import facts")
5
4
  _("Action with sub plans")
5
+ _("Import facts")
@@ -17,10 +17,13 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
18
18
  "\n"
19
19
 
20
- msgid " seconds"
20
+ msgid "${taskReload ? 'Stop' : 'Start'} auto-reloading"
21
21
  msgstr ""
22
22
 
23
- msgid "%s ago"
23
+ msgid "%(last)s Last %(time)s"
24
+ msgstr ""
25
+
26
+ msgid "%(older)s Older %(time)s"
24
27
  msgstr ""
25
28
 
26
29
  msgid "%s is not valid format of cron line"
@@ -38,7 +41,10 @@ msgstr ""
38
41
  msgid "%{value} is wrong format"
39
42
  msgstr ""
40
43
 
41
- msgid "(Disabled)"
44
+ msgid "12h"
45
+ msgstr ""
46
+
47
+ msgid "24h"
42
48
  msgstr ""
43
49
 
44
50
  msgid ":after setting in tasks cleanup section is deprecated, use :after in :rules section to set the value. to cleanup rules"
@@ -56,6 +62,12 @@ msgstr ""
56
62
  msgid "Active"
57
63
  msgstr ""
58
64
 
65
+ msgid "Active Filters:"
66
+ msgstr ""
67
+
68
+ msgid "All %s tasks are selected. "
69
+ msgstr ""
70
+
59
71
  msgid "All proxies with the required feature are unavailable at the moment"
60
72
  msgstr ""
61
73
 
@@ -72,9 +84,6 @@ msgstr ""
72
84
  msgid "At"
73
85
  msgstr ""
74
86
 
75
- msgid "Auto Reload"
76
- msgstr ""
77
-
78
87
  msgid "Back to tasks"
79
88
  msgstr ""
80
89
 
@@ -87,21 +96,63 @@ msgstr ""
87
96
  msgid "Cancel"
88
97
  msgstr ""
89
98
 
99
+ msgid "Cancel Selected"
100
+ msgstr ""
101
+
102
+ msgid "Cancel Selected Tasks"
103
+ msgstr ""
104
+
105
+ msgid "Cancel all cancellable tasks"
106
+ msgstr ""
107
+
90
108
  msgid "Cancel enforced: the task might be still running on the proxy"
91
109
  msgstr ""
92
110
 
93
111
  msgid "Cancel recurring logic"
94
112
  msgstr ""
95
113
 
114
+ msgid "Cancel selected tasks"
115
+ msgstr ""
116
+
117
+ msgid "Cancel specific tasks by ID"
118
+ msgstr ""
119
+
120
+ msgid "Cancel tasks matching search string"
121
+ msgstr ""
122
+
123
+ msgid "Canceling selected tasks, this might take a while"
124
+ msgstr ""
125
+
96
126
  msgid "Cancelled"
97
127
  msgstr ""
98
128
 
129
+ msgid "Cannot cancel tasks at the moment"
130
+ msgstr ""
131
+
132
+ msgid "Cannot resume tasks at the moment"
133
+ msgstr ""
134
+
99
135
  msgid "Cannot update a cancelled Recurring Logic."
100
136
  msgstr ""
101
137
 
102
138
  msgid "Changing request id %{request_id} to saved id %{saved_id}"
103
139
  msgstr ""
104
140
 
141
+ msgid "Clear All Filters"
142
+ msgstr ""
143
+
144
+ msgid "Clear Cancelled"
145
+ msgstr ""
146
+
147
+ msgid "Complete"
148
+ msgstr ""
149
+
150
+ msgid "Conflicts with tasks:"
151
+ msgstr ""
152
+
153
+ msgid "Could not receive data: ${error && error.message}"
154
+ msgstr ""
155
+
105
156
  msgid "Cron line"
106
157
  msgstr ""
107
158
 
@@ -123,9 +174,15 @@ msgstr ""
123
174
  msgid "Delayed"
124
175
  msgstr ""
125
176
 
177
+ msgid "Delete recurring logics by search query"
178
+ msgstr ""
179
+
126
180
  msgid "Details"
127
181
  msgstr ""
128
182
 
183
+ msgid "Details of %s task"
184
+ msgstr ""
185
+
129
186
  msgid "Disable"
130
187
  msgstr ""
131
188
 
@@ -147,9 +204,6 @@ msgstr ""
147
204
  msgid "Enable the dynflow console (/foreman_tasks/dynflow) for debugging"
148
205
  msgstr ""
149
206
 
150
- msgid "Ended at"
151
- msgstr ""
152
-
153
207
  msgid "Ends"
154
208
  msgstr ""
155
209
 
@@ -159,6 +213,9 @@ msgstr ""
159
213
  msgid "Errors"
160
214
  msgstr ""
161
215
 
216
+ msgid "Errors:"
217
+ msgstr ""
218
+
162
219
  msgid "Event delivered by request %{request_id}"
163
220
  msgstr ""
164
221
 
@@ -171,7 +228,7 @@ msgstr ""
171
228
  msgid "Execution plan data not available "
172
229
  msgstr ""
173
230
 
174
- msgid "Execution type"
231
+ msgid "Export All"
175
232
  msgstr ""
176
233
 
177
234
  msgid "External Id"
@@ -204,9 +261,6 @@ msgstr ""
204
261
  msgid "How to order the sorted results (e.g. ASC for ascending)"
205
262
  msgstr ""
206
263
 
207
- msgid "I understand that this may cause harm and have working database backups of all backend services."
208
- msgstr ""
209
-
210
264
  msgid "ID"
211
265
  msgstr ""
212
266
 
@@ -246,6 +300,9 @@ msgstr ""
246
300
  msgid "Latest Warning/Error Tasks"
247
301
  msgstr ""
248
302
 
303
+ msgid "Less than a second"
304
+ msgstr ""
305
+
249
306
  msgid "List of tasks"
250
307
  msgstr ""
251
308
 
@@ -261,6 +318,9 @@ msgstr ""
261
318
  msgid "Mon"
262
319
  msgstr ""
263
320
 
321
+ msgid "More than"
322
+ msgstr ""
323
+
264
324
  msgid "N/A"
265
325
  msgstr ""
266
326
 
@@ -273,6 +333,12 @@ msgstr ""
273
333
  msgid "Next occurrence"
274
334
  msgstr ""
275
335
 
336
+ msgid "No"
337
+ msgstr ""
338
+
339
+ msgid "No Tasks"
340
+ msgstr ""
341
+
276
342
  msgid "No errors"
277
343
  msgstr ""
278
344
 
@@ -282,12 +348,21 @@ msgstr ""
282
348
  msgid "No running steps"
283
349
  msgstr ""
284
350
 
351
+ msgid "No start or end dates"
352
+ msgstr ""
353
+
285
354
  msgid "No task could be started"
286
355
  msgstr ""
287
356
 
288
357
  msgid "No. of Tasks"
289
358
  msgstr ""
290
359
 
360
+ msgid "Not all the selected tasks can be cancelled"
361
+ msgstr ""
362
+
363
+ msgid "Not all the selected tasks can be resumed"
364
+ msgstr ""
365
+
291
366
  msgid "Number of attempts to start a task on the smart proxy before failing"
292
367
  msgstr ""
293
368
 
@@ -304,15 +379,39 @@ msgstr ""
304
379
  msgid "On"
305
380
  msgstr ""
306
381
 
382
+ msgid "Operation"
383
+ msgstr ""
384
+
307
385
  msgid "Output"
308
386
  msgstr ""
309
387
 
388
+ msgid "Output:"
389
+ msgstr ""
390
+
310
391
  msgid "Page number, starting at 1"
311
392
  msgstr ""
312
393
 
313
394
  msgid "Parent task"
314
395
  msgstr ""
315
396
 
397
+ msgid "Paused"
398
+ msgstr ""
399
+
400
+ msgid "Please inspect their state, fix their errors and resume them."
401
+ msgstr ""
402
+
403
+ msgid "Please provide a search parameter in the request"
404
+ msgstr ""
405
+
406
+ msgid "Please provide at least one of search or task_ids parameters in the request"
407
+ msgstr ""
408
+
409
+ msgid "Polling intervals multiplier"
410
+ msgstr ""
411
+
412
+ msgid "Polling multiplier which is used to multiply the default polling intervals. This can be used to prevent polling too frequently for long running tasks."
413
+ msgstr ""
414
+
316
415
  msgid "Proxy task gone missing from the smart proxy"
317
416
  msgstr ""
318
417
 
@@ -334,9 +433,6 @@ msgstr ""
334
433
  msgid "Recurring logics"
335
434
  msgstr ""
336
435
 
337
- msgid "Remote action:"
338
- msgstr ""
339
-
340
436
  msgid "Repeat N times"
341
437
  msgstr ""
342
438
 
@@ -349,10 +445,13 @@ msgstr ""
349
445
  msgid "Require user to be authenticated as user with admin rights when accessing dynflow console"
350
446
  msgstr ""
351
447
 
352
- msgid "Resource search_params requires resource_type and resource_id to be specified"
448
+ msgid "Required lock is already taken by other running tasks."
449
+ msgstr ""
450
+
451
+ msgid "Required lock: %s"
353
452
  msgstr ""
354
453
 
355
- msgid "Resources will be unlocked and will not prevent other tasks from being run. As the task might be still running, it should be avoided to use this unless you are really sure the task got stuck"
454
+ msgid "Resource search_params requires resource_type and resource_id to be specified"
356
455
  msgstr ""
357
456
 
358
457
  msgid "Result"
@@ -361,15 +460,30 @@ msgstr ""
361
460
  msgid "Resume"
362
461
  msgstr ""
363
462
 
463
+ msgid "Resume Selected"
464
+ msgstr ""
465
+
466
+ msgid "Resume Selected Tasks"
467
+ msgstr ""
468
+
364
469
  msgid "Resume all paused error tasks"
365
470
  msgstr ""
366
471
 
472
+ msgid "Resume selected tasks"
473
+ msgstr ""
474
+
367
475
  msgid "Resume specific tasks by ID"
368
476
  msgstr ""
369
477
 
370
478
  msgid "Resume tasks matching search string"
371
479
  msgstr ""
372
480
 
481
+ msgid "Resuming selected tasks, this might take a while"
482
+ msgstr ""
483
+
484
+ msgid "Running"
485
+ msgstr ""
486
+
373
487
  msgid "Running Steps"
374
488
  msgstr ""
375
489
 
@@ -382,12 +496,27 @@ msgstr ""
382
496
  msgid "Schedule future execution"
383
497
  msgstr ""
384
498
 
499
+ msgid "Scheduled"
500
+ msgstr ""
501
+
502
+ msgid "Search query"
503
+ msgstr ""
504
+
385
505
  msgid "Search string"
386
506
  msgstr ""
387
507
 
388
508
  msgid "See %{link} for more details on how to resolve the issue"
389
509
  msgstr ""
390
510
 
511
+ msgid "Select Action"
512
+ msgstr ""
513
+
514
+ msgid "Select All"
515
+ msgstr ""
516
+
517
+ msgid "Select row"
518
+ msgstr ""
519
+
391
520
  msgid "Send data to the task from external executor (such as smart_proxy_dynflow)"
392
521
  msgstr ""
393
522
 
@@ -403,9 +532,6 @@ msgstr ""
403
532
  msgid "Start at"
404
533
  msgstr ""
405
534
 
406
- msgid "Start auto-reloading"
407
- msgstr ""
408
-
409
535
  msgid "Start before"
410
536
  msgstr ""
411
537
 
@@ -418,12 +544,15 @@ msgstr ""
418
544
  msgid "State"
419
545
  msgstr ""
420
546
 
421
- msgid "Stop auto-reloading"
547
+ msgid "Stopped"
422
548
  msgstr ""
423
549
 
424
550
  msgid "Sub tasks"
425
551
  msgstr ""
426
552
 
553
+ msgid "Sub tasks of %s"
554
+ msgstr ""
555
+
427
556
  msgid "Sun"
428
557
  msgstr ""
429
558
 
@@ -448,6 +577,9 @@ msgstr ""
448
577
  msgid "Task search_params requires task_id to be specified"
449
578
  msgstr ""
450
579
 
580
+ msgid "Task was canceled"
581
+ msgstr ""
582
+
451
583
  msgid "Tasks"
452
584
  msgstr ""
453
585
 
@@ -457,12 +589,6 @@ msgstr ""
457
589
  msgid "The execution has to be paused."
458
590
  msgstr ""
459
591
 
460
- msgid "The execution has to be resumable."
461
- msgstr ""
462
-
463
- msgid "The execution was resumed."
464
- msgstr ""
465
-
466
592
  msgid "The recommended approach is to investigate the error messages below and in 'errors' tab, address the primary cause of the issue and resume the task."
467
593
  msgstr ""
468
594
 
@@ -475,9 +601,6 @@ msgstr ""
475
601
  msgid "The task cannot be aborted at the moment."
476
602
  msgstr ""
477
603
 
478
- msgid "The task cannot be cancelled at the moment."
479
- msgstr ""
480
-
481
604
  msgid "The task could not be started"
482
605
  msgstr ""
483
606
 
@@ -492,7 +615,7 @@ msgid_plural "There are %{count} paused tasks in the system that need attention"
492
615
  msgstr[0] ""
493
616
  msgstr[1] ""
494
617
 
495
- msgid "This will unlock the resources that the task is running against. Please note that this might lead to inconsistent state and should be used with caution, after making sure that the task can't be resumed."
618
+ msgid "This action will delete all cancelled recurring logics. Please note that this action can't be reversed."
496
619
  msgstr ""
497
620
 
498
621
  msgid "Thu"
@@ -501,16 +624,16 @@ msgstr ""
501
624
  msgid "Time in seconds between retries"
502
625
  msgstr ""
503
626
 
504
- msgid "Triggered by"
627
+ msgid "Total"
505
628
  msgstr ""
506
629
 
507
- msgid "Trying to abort the task"
630
+ msgid "Troubleshooting"
508
631
  msgstr ""
509
632
 
510
- msgid "Trying to cancel step %s"
633
+ msgid "Trying to abort the task"
511
634
  msgstr ""
512
635
 
513
- msgid "Trying to cancel the task"
636
+ msgid "Trying to cancel step %s"
514
637
  msgstr ""
515
638
 
516
639
  msgid "Tue"
@@ -522,6 +645,9 @@ msgstr ""
522
645
  msgid "UUID of the task"
523
646
  msgstr ""
524
647
 
648
+ msgid "Undo selection"
649
+ msgstr ""
650
+
525
651
  msgid "Unlimited"
526
652
  msgstr ""
527
653
 
@@ -534,16 +660,16 @@ msgstr ""
534
660
  msgid "Url pointing to the task troubleshooting documentation. It should contain %{label} placeholder, that will be replaced with normalized task label (restricted to only alphanumeric characters)). %{version} placeholder is also available."
535
661
  msgstr ""
536
662
 
537
- msgid "User"
538
- msgstr ""
539
-
540
663
  msgid "User search_params requires user_id to be specified"
541
664
  msgstr ""
542
665
 
543
666
  msgid "Wed"
544
667
  msgstr ""
545
668
 
546
- msgid "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"
669
+ msgid "With focus on last"
670
+ msgstr ""
671
+
672
+ msgid "Yes"
547
673
  msgstr ""
548
674
 
549
675
  msgid "activation key"
@@ -555,7 +681,10 @@ msgstr ""
555
681
  msgid "content view version"
556
682
  msgstr ""
557
683
 
558
- msgid "in %s"
684
+ msgid "could not be resumed"
685
+ msgstr ""
686
+
687
+ msgid "error"
559
688
  msgstr ""
560
689
 
561
690
  #. TRANSLATORS: this translation is referring to an option which is a time interval
@@ -578,23 +707,80 @@ msgstr ""
578
707
  msgid "is month (range: 1-12)"
579
708
  msgstr ""
580
709
 
710
+ msgid "last"
711
+ msgstr ""
712
+
713
+ msgid "mode"
714
+ msgstr ""
715
+
581
716
  msgid "mode has to be one of %{allowed_modes}"
582
717
  msgstr ""
583
718
 
719
+ msgid "older"
720
+ msgstr ""
721
+
584
722
  msgid "organization"
585
723
  msgstr ""
586
724
 
725
+ msgid "paused"
726
+ msgstr ""
727
+
587
728
  msgid "product"
588
729
  msgstr ""
589
730
 
590
731
  msgid "repository"
591
732
  msgstr ""
592
733
 
734
+ msgid "result"
735
+ msgstr ""
736
+
737
+ msgid "running"
738
+ msgstr ""
739
+
740
+ msgid "scheduled"
741
+ msgstr ""
742
+
743
+ msgid "seconds"
744
+ msgstr ""
745
+
746
+ msgid "state"
747
+ msgstr ""
748
+
749
+ msgid "stopped"
750
+ msgstr ""
751
+
752
+ msgid "success"
753
+ msgstr ""
754
+
593
755
  msgid "system"
594
756
  msgstr ""
595
757
 
758
+ msgid "task has to be cancellable"
759
+ msgstr ""
760
+
761
+ msgid "task has to be resumable"
762
+ msgstr ""
763
+
764
+ msgid "tasks."
765
+ msgstr ""
766
+
767
+ msgid "time"
768
+ msgstr ""
769
+
596
770
  msgid "troubleshooting documentation"
597
771
  msgstr ""
598
772
 
599
773
  msgid "user"
600
774
  msgstr ""
775
+
776
+ msgid "warning"
777
+ msgstr ""
778
+
779
+ msgid "was cancelled"
780
+ msgstr ""
781
+
782
+ msgid "was resumed"
783
+ msgstr ""
784
+
785
+ msgid "week"
786
+ msgstr ""