Project

General

Profile

Feature #1278

Have pie chart graphs link to the hosts the slices represent

Added by Jacob McCann over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Currently the pie graph reports do not link to anything. If you click on a slice it only 'pulls' it out from the rest of the pie to highlight it. What would be nice is some functionality to link to the hosts that the chart is representing, or at least provide links near the chart to be able to click on.

Example, if I have a chart generated with data such as:

"os_count":{"SLES 11.1":225,"SLES 10.4":36}

Then clicking on the slice for SLES 11.1 would bring up the hosts tab with all of those 225 systems.

Currently, I have hacked the following to achieve functionally what I want, but outside of the pie chart. In app/views/statistics/index.html.erb

    <td>
      <%= pie_chart("os_dist" ,"OS Distribution", @os_count) %>
      <% @os_count.each do |os_dist,os_dist_count| -%>
        <% os_name, os_ver = os_dist.split(" ") -%>
        <%= link_to os_dist, "/hosts?search=facts.operatingsystem%3D#{os_name}+and+f
acts.operatingsystemrelease%3D#{os_ver}" %>: <%= os_dist_count %>
      <% end -%>
    </td>

I'm sure there are better ways to achieve this, I'm just a novice coder. :P

Having this for all charts would be the ultimate goal.


Related issues

Related to Foreman - Bug #1321: Have pie chart graphs link to the hosts the slices represent part 2Closed2011-11-14
Has duplicate Foreman - Feature #1306: Click on Serie of a Highchart should redirect to the specific pageClosed2011-11-09

History

#1 Updated by Ohad Levy over 7 years ago

  • Assignee set to Amos Benari

Amos - any ideas?

#2 Updated by Ohad Levy over 7 years ago

  • Category set to Web Interface
  • Target version set to 1.0

#3 Updated by Ohad Levy over 7 years ago

  • Status changed from New to Closed

fixed at cc90281e

#4 Updated by Ohad Levy over 7 years ago

  • Target version changed from 1.0 to 0.4.1

Also available in: Atom PDF