Project

General

Profile

Actions

Bug #7561

closed

`No. of CPU` search URL is incorrect

Added by b sh over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

searching for facts.processorcount="8 cores", while it should be facts.processorcount=8.

Actions #1

Updated by b sh over 10 years ago

*I don't mind fixing this. *

If I understand right, this is the flow:
Going to statistics => an html page (/app/views/statistics/index.html.erb) and a json file are rendered (/app/controllers/statistics_controller.rb), with some help from helpers (/app/helpers/statistics_helper.rb) the charts are generated.
In addition to that, the charts use the function `search_on_click`(https://github.com/theforeman/foreman/blob/develop/app/assets/javascripts/charts.js#L233) to replace `~VAL1~` and `~VAL2~` with the appropriate values in the data-series.

This is my approach to fix this: https://github.com/ripcurld00d/foreman/blob/fixyyy_patch/app/assets/javascripts/charts.js#L233 and
https://github.com/ripcurld00d/foreman/blob/fixyyy_patch/app/helpers/statistics_helper.rb

Actions #2

Updated by b sh over 10 years ago

By the way, I haven't tested it yet. Does anyone know how to test it "quickly" (just to see the logic is right)?

Best Regards.

Actions #3

Updated by Dominic Cleal over 10 years ago

Either from a git checkout or on a production install you'd have to recompile assets locally (install foreman-assets, then run foreman-rake assets:precompile & restart Apache).

Actions #4

Updated by b sh over 10 years ago

Thanks Dominic. I will do that when I get home (on my production environment). If I see it doesn't break anything, I will push it as a PR (and then wait for a review).

Actions #5

Updated by The Foreman Bot over 10 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.3
  • Pull request https://github.com/theforeman/foreman/pull/1793 added
  • Pull request deleted ()
Actions #6

Updated by Dominic Cleal about 10 years ago

  • Target version changed from 1.7.3 to 1.7.2
Actions #7

Updated by B Sh about 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by Dominic Cleal about 10 years ago

  • Translation missing: en.field_release set to 21
Actions

Also available in: Atom PDF