Project

General

Profile

Bug #25203

view chart buttons sometimes disappear after clicking

Added by boaz shust 2 months ago. Updated 2 months ago.

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

Description

On the fact values page (Monitor -> Facts) clicking on the view chart button makes the button disappear.
Looking at the console.log I see the following errors.

```
The above error occurred in the <FactChart> component:
in FactChart (created by Connect(FactChart))
in Connect(FactChart)
in Provider

Consider adding an error boundary to your tree to customize error handling behavior.

Error: The number that was passed in is not a number
```

Attaching screenshot

Screenshot_2018-10-15 Fact Values(1).png View Screenshot_2018-10-15 Fact Values(1).png 13.6 KB View Chart button gone boaz shust, 10/15/2018 10:39 AM
Screenshot_2018-10-15 Fact Values.png View Screenshot_2018-10-15 Fact Values.png 14.9 KB View Chart buttons before clicking boaz shust, 10/15/2018 10:40 AM
Screenshot 2018 10 15%20fact%20values(1) Screenshot 2018 10 15%20fact%20values

Related issues

Is duplicate of Foreman - Bug #25204: Fact chart modal triggers an errorDuplicate

Associated revisions

Revision ea48efb1 (diff)
Added by Boaz Shuster 2 months ago

Fixes #25203 - show hosts count if hostsCount is not null

ngettext expects the last argument to be a number.
factCharts.hostsCount is initialized to null in Redux.

when rendering the factChart modal the number of hosts is
translated using ngettext.

However, if factChart is rendered before the data arrives
the component will fail printing the error below in the console:

"The number that was passed in is not a number"

To fix this if factCharts.hostsCount is null don't display
hosts count in the title.

Signed-off-by: Boaz Shuster <>

History

#1 Updated by The Foreman Bot 2 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6140 added

#2 Updated by boaz shust 2 months ago

  • Is duplicate of Bug #25204: Fact chart modal triggers an error added

#3 Updated by Anonymous 2 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Marek Hulán 2 months ago

  • Fixed in Releases 1.20.0 added

Also available in: Atom PDF