Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Png output no rxjs #24098

Closed
wants to merge 11 commits into from
Closed

Conversation

bgaddis56
Copy link
Contributor

Summary

Refactored reporting so the code was easier to follow which included removal of RxJs

@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@timroes timroes added Feature:Reporting Reporting (PDF, CSV, ..) feature Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 17, 2018
@timroes
Copy link
Contributor

timroes commented Oct 17, 2018

Jenkins, test this

}

page.on('console', line => {
if (line._type === 'error') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we potentially extract this function into it's own utility and if possible flatten it, since 3 levels of nested if is quiet some nesting :-)

Also we are usually putting the closing } to the next line.

if (line._text.includes('error while loading shared libraries: libnss3.so')) {
throw new Error(`You must install nss for Reporting to work`);}
if (line._text.includes('Check failed: InitDefaultFont(). Could not find the default font')) {
throw new Error('You must install freetype and ttf-font for Reporting to work');}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These error messages are currently really focused around *NIX systems. Not sure if you wouldn't get the same error message on a windows system? I think we should try to produce the same errors on Windows and check if chromium will report the same messages. If they are different I think we can perfectly fine use those *NIX specific messages, if not we should come up with better messages. Maybe we should also link to the reporting setup documentation here.

return elementsPositionAndAttributes;
};

const getScreenshots = async ({ browser, elementsPositionAndAttributes }) => {
const getScreenshots = async (browser, elementsPositionAndAttributes) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason to remove the "named parameters" here? Usually it's easier to read the method calls that way, since you are not relying on any "arbitrary" ordering.

@timroes
Copy link
Contributor

timroes commented Oct 17, 2018

@stacey-gammon This touches a lot of reporting code, so someone with a deeper reporting understanding would require to review this. Also it seems to include the reporting to PNG code.

@bgaddis56 Is this completely based on top of the PNG exporting PR, so that this can safely be blocked until the PNG reporting is merged?

@bgaddis56
Copy link
Contributor Author

Yes this PR is completely based on top of the PNG export PR and can wait till that PR is merged.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon changed the title Png output no rxjs [WIP] Png output no rxjs Oct 17, 2018
@bgaddis56
Copy link
Contributor Author

There is currently an issue with killing off the child chromium process after the report is finished as well as when there is a timeout or report error. I am in the process of trying to fix this so until then I would wait on reviewing this any further.

Thx

@joelgriffith
Copy link
Contributor

It's been a while since we've seen any activity on this PR (and there's now numerous conflicts in our files).

Is this something still actively being pursued? If not, I'll pursue closing this in a few days, but if so please comment back @bgaddis56!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@joelgriffith
Copy link
Contributor

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Reporting Reporting (PDF, CSV, ..) feature Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants