From 01d22956aa2c359825b7c4c48f03ca89bf118bdc Mon Sep 17 00:00:00 2001 From: Zahi Akiva Date: Tue, 29 Aug 2017 16:47:33 +0300 Subject: [PATCH] Image scanning: Add image name to task name --- .../manageiq/providers/kubernetes/container_manager_mixin.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb b/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb index 62f7d1a9ae..e4d25eac4e 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb @@ -175,11 +175,12 @@ def scan_job_create(entity) def raw_scan_job_create(target_class, target_id = nil, userid = nil) target_class, target_id = target_class.class.name, target_class.id if target_class.kind_of?(ContainerImage) + target_name = target_class.constantize.find_by(:id => target_id).name userid ||= User.current_user.userid Job.create_job( "ManageIQ::Providers::Kubernetes::ContainerManager::Scanning::Job", :userid => userid, - :name => "Container image analysis", + :name => "Container image '#{target_name}' analysis", :target_class => target_class, :target_id => target_id, :zone => my_zone,