Trends are not usable

Hello,
We have around 4k hosts in foreman and a ton of facts!
So I can’t add any trends, pretty much page is not loading on 1.16.2.
If there a way to add trends through API or Hammer?
Thanks!

konrasko https://community.theforeman.org/u/konrasko
August 31

Hello,
We have around 4k hosts in foreman and a ton of facts!
So I can’t add any trends, pretty much page is not loading on 1.16.2.

Can you provide more info? What exactly is not working (logs might help
too).

If there a way to add trends through API or Hammer?

This was added at a later version afair 1.18.

Ohad

I think the problem is in trends form. There’s a select box listing all facts. In case you have thousands of them, it takes ages to render. We should have autocomplete field there instead. Mind to open RFE issue in redmine? IIRC there is API for trends, that could be used as a workaround.

@Walden is there already react component for autocompletion, perhaps we could reuse something from search box? Might be easy react related excercise.

1 Like

This is indeed caused by the form loading all fact names into the selection. It has already been reported at Bug #18058: trend new page slow to load - Foreman.
Should be a fairly simple fix using react auto-completion, can someone from @ui_ux team please take a look at this?

It seems to me that Ron’s React search box component can solve this issue.

Sorry for the late reply.
@tbrisker is absolutely rights.
It’s UI issues.
Thanks