Bug #7561
closed`No. of CPU` search URL is incorrect
Description
searching for facts.processorcount="8 cores", while it should be facts.processorcount=8.
Updated by b sh about 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
Updated by b sh about 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.
Updated by Dominic Cleal about 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).
Updated by b sh about 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).
Updated by The Foreman Bot about 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 (
)
Updated by Dominic Cleal about 10 years ago
- Target version changed from 1.7.3 to 1.7.2
Updated by B Sh about 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 357a911123f425055b180f2a224f351e59bc9617.
Updated by Dominic Cleal about 10 years ago
- Translation missing: en.field_release set to 21