app/models/foreman_tasks/task.rb in foreman-tasks-0.11.3 vs app/models/foreman_tasks/task.rb in foreman-tasks-0.12.0
- old
+ new
@@ -34,10 +34,11 @@
has_many :owners, -> { where(['foreman_tasks_locks.name = ?', Lock::OWNER_LOCK_NAME]) },
:through => :locks, :source => :resource, :source_type => 'User'
end
scoped_search :on => :id, :complete_value => false
+ scoped_search :on => :action, :complete_value => false
scoped_search :on => :label, :complete_value => true
scoped_search :on => :state, :complete_value => true
scoped_search :on => :result, :complete_value => true
scoped_search :on => :started_at, :complete_value => false
scoped_search :on => :start_at, :complete_value => false
@@ -198,9 +199,13 @@
result[key] += result[:total] - sum
else
result[:total] = sum
end
result.symbolize_keys
+ end
+
+ def action
+ super || to_label
end
def to_label
parts = []
parts << get_humanized(:name)