Project

General

Profile

Actions

Feature #1278

closed

Have pie chart graphs link to the hosts the slices represent

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
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 2 (0 open2 closed)

Related to Foreman - Bug #1321: Have pie chart graphs link to the hosts the slices represent part 2ClosedJacob McCann11/14/2011Actions
Has duplicate Foreman - Feature #1306: Click on Serie of a Highchart should redirect to the specific pageClosedOhad Levy11/09/2011Actions
Actions #1

Updated by Ohad Levy over 12 years ago

  • Assignee set to Amos Benari

Amos - any ideas?

Actions #2

Updated by Ohad Levy over 12 years ago

  • Category set to Web Interface
  • Target version set to 1.0
Actions #3

Updated by Ohad Levy over 12 years ago

  • Status changed from New to Closed

fixed at cc90281e

Actions #4

Updated by Ohad Levy over 12 years ago

  • Target version changed from 1.0 to 0.4.1
Actions

Also available in: Atom PDF