Project

General

Profile

Bug #7561

`No. of CPU` search URL is incorrect

Added by b sh over 4 years ago. Updated 11 months ago.

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

Description

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

Associated revisions

Revision 357a9111 (diff)
Added by B Sh over 4 years ago

Fixes #7561 - 'No. of CPU' search URL is incorrect

History

#1 Updated by b sh over 4 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

#2 Updated by b sh over 4 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.

#3 Updated by Dominic Cleal over 4 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).

#4 Updated by b sh over 4 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).

#5 Updated by The Foreman Bot over 4 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 ()

#6 Updated by Dominic Cleal over 4 years ago

  • Target version changed from 1.7.3 to 1.7.2

#7 Updated by B Sh over 4 years ago

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

#8 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 21

Also available in: Atom PDF