invoiceninja / ui

Invoice Ninja: Web admin portal built with React
https://app.invoicing.co
Other
55 stars 47 forks source link

Live reports preview #1299

Open alexgauvin opened 10 months ago

alexgauvin commented 10 months ago

Would be nice to have a real live report preview in React UI.

beganovich commented 10 months ago

Hey, thanks for reaching to us. Would you be keen to explain a tiny bit more about the live preview? We feature live preview both for designs and resource previvews (invoices, etc). Thanks!

alexgauvin commented 10 months ago

The Reports module, in Flutter (and previously in IN4) displays live infos when using filters (activity, date range, ...). The only available option in React UI Reports module is to export data. This is useful for more in-depth analysis, but live display is useful for quick overviews of some specific filters.

turbo124 commented 10 months ago

I've just tagged a new release of the app, this should also contain the live previews for reports now :)

alexgauvin commented 10 months ago

@turbo124 I am on latest build and it's not rendering anything. Actually, it stays on processing mode forever. image

turbo124 commented 10 months ago

@alexgauvin

can you try and reduce the range down to say a month?

Also if you open the browser console, do you see some automatic requests occuring every couple of seconds?

alexgauvin commented 10 months ago

@turbo124 : Reducing to 7 days finally output some data ... after 7 min !!!

Here's a screenshot of console during process Screenshot_2

turbo124 commented 10 months ago

7 minutes does not sound right, i think the system would time out and stop polling well before this. Can you confirm?

alexgauvin commented 10 months ago

It does not time out, but it does not display as well

alexgauvin commented 3 months ago

Hi,

I'm still having issues with reports in React UI. Nothing ever display and Processing spinner goes round forever. There are a bunch of errors in the browser's console. 409 errors, never seen these !!! Don't know if its related. Capture d’écran 2024-05-28 053202

And a drill down with more details on 409 error Capture d’écran 2024-05-28 053931

Nothing in the laravel.log file.

Thanks for your support

beganovich commented 3 months ago

409 means the resource isn't ready.

What does your setup look like? Is it an official Docker image or a manual installation?

alexgauvin commented 3 months ago

Manual installation on shared hosting

turbo124 commented 3 months ago

@alexgauvin i am guessing here that the job may only be attempted every 5 minutes, rather than on a proper queue system where the job would run almost instantly. Hence the timeouts.

alexgauvin commented 3 months ago

@turbo124 You're talking about the cronjob on the server ?

turbo124 commented 3 months ago

@alexgauvin

yes, the preview relies on a job being spun up to process the report data, the 409's you see in the browser is the front end polling for when this has been completed. when it has completed, the front end retrieves the data and displays it.

because of the way shared hosting works, i do not think it is possible to get the live previews.

alexgauvin commented 3 months ago

Mmm, even if I set cronjob to run every minute ? If not, that means that React UI won't be able to serve reports on any shared hosting. That's sad. It was actually working in v4.