Created attachment 1229437 [details]
Description of problem:
If there is a vm with some policy events and I open timelines with policy events for provider/host/cluster, I see policy events w/o any information which entity those events belong to. See screenshot.
Actually, I'm not sure that policy events belonging to one entity should be displayed in timelines for another entity.
But if such events should be displayed, those should have appropriate information about owner like it is done for management events.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create policy with condition and events which will produce policy events when vm's PowerState is changed (f.e Vm's PowerState is not Null)
2. Create a policy profile and add created above policy to it
3. Assign the policy profile to some vm
4. Start/Stop that vm
5. Make sure that appropriate policy events appeared in policy_events table of appliance's db
6. Open Timelines for f.e provider this vm belongs to
7. Setup Timelines to show the policy events of all categories and click Apply
8. Click appeared events and look at their details
policy events in provider's timelines appear w/o any information which entity those events belong to
If the policy events of underneath entity like vm, should appear in timelines for provider and so on. Then policy events should have enough information about their possessor.
If the policy events of one entity shouldn't appear in timelines for another entity. Then there shouldn't be any vms policy events in timelines for provider and so on.
this is true for Cloud Intel->Timelines->Policy Events ... Sample 1 report.
New commit detected on ManageIQ/manageiq/master:
Author: Harpreet Kataria <firstname.lastname@example.org>
AuthorDate: Tue Dec 13 17:21:19 2016 -0500
Commit: Harpreet Kataria <email@example.com>
CommitDate: Fri Dec 16 14:02:18 2016 -0500
Added missing target information and links on Policy Event bubbles.
changes in 4f650a999c893b7519d9e7648acea92b027f59ff introduced the issue variable e_text was initialized to '' ignoring the fact that it was being set in several places above in the code. Fixed code to use TimelineMessage class to set links and other target related information for PolicyEvent timelines event bubble.
lib/report_formatter/timeline.rb | 36 ----------------------
lib/report_formatter/timeline_message.rb | 26 ++++++++++++++++
.../miq_reports/tl_policy_events_daily.yaml | 7 ++++-
.../miq_reports/tl_policy_events_hourly.yaml | 5 +++
spec/lib/report_formater/timeline_spec.rb | 23 ++++++++++++++
5 files changed, 60 insertions(+), 37 deletions(-)