Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Headless chrome creation script and readme file #229

Merged

Conversation

harold-wang
Copy link
Contributor

Issue #, if available:

Description of changes:
We added script and readme file to generate the headless chrome for puppeteer.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zhongnansu
Copy link
Member

any idea why the github action fails?If a re-run will fix the issue, could you add a step retry? @joshuali925 @harold-wang

@joshuali925
Copy link
Contributor

any idea why the github action fails?If a re-run will fix the issue, could you add a step retry? @joshuali925 @harold-wang

because #228 is not merged, it will update chromium download url

Comment on lines 31 to 32
# How to call in Command line:
>> please use what you used for testing this << replace me >>
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the purpose of these two lines?

Copy link
Contributor

Choose a reason for hiding this comment

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

this was a review comment/ @harold-wang can you pls update here. thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what's the purpose of these two lines?
Josh, these are command used to verify chrome in command line.
MAC/Linux PNG : ./headless_shell --headless --disable-gpu --screenshot=test.png https://www.google.com
MAC/Linux PDF: ./headless_shell --headless --disable-gpu --print-to-pdf=test.png https://www.google.com

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks, saw the commits

libnss3-dev
fonts-liberation
libfontconfig
(installation command example : sudo apt update && apt install libnss3-dev fonts-liberation libfontconfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

These dependencies are for Ubuntu, for CentOS I had to install a lot more

sudo yum install -y libnss3.so xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype

I listed them in this PR #222, could you update it here?

Copy link
Contributor Author

@harold-wang harold-wang left a comment

Choose a reason for hiding this comment

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

Add test command to verify chrome in linux:
MAC/Linux PNG : ./headless_shell --headless --disable-gpu --screenshot=test.png https://www.google.com
MAC/Linux PDF: ./headless_shell --headless --disable-gpu --print-to-pdf=test.png https://www.google.com

Comment on lines 31 to 32
# How to call in Command line:
>> please use what you used for testing this << replace me >>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

what's the purpose of these two lines?
Josh, these are command used to verify chrome in command line.
MAC/Linux PNG : ./headless_shell --headless --disable-gpu --screenshot=test.png https://www.google.com
MAC/Linux PDF: ./headless_shell --headless --disable-gpu --print-to-pdf=test.png https://www.google.com

Copy link
Contributor

@anirudha anirudha left a comment

Choose a reason for hiding this comment

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

thanks

Copy link
Contributor

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

thanks

@zhongnansu
Copy link
Member

Add test command to verify chrome in linux:
MAC/Linux PNG : ./headless_shell --headless --disable-gpu --screenshot=test.png https://www.google.com
MAC/Linux PDF: ./headless_shell --headless --disable-gpu --print-to-pdf=test.png https://www.google.com

Np: can we use the domain we owned such as opendistro website, instead of google.com

@harold-wang
Copy link
Contributor Author

Add test command to verify chrome in linux:
MAC/Linux PNG : ./headless_shell --headless --disable-gpu --screenshot=test.png https://www.google.com
MAC/Linux PDF: ./headless_shell --headless --disable-gpu --print-to-pdf=test.png https://www.google.com

Np: can we use the domain we owned such as opendistro website, instead of google.com

image

@harold-wang harold-wang merged commit 8ff39ca into opendistro-for-elasticsearch:dev Dec 8, 2020
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Dec 8, 2020
…icsearch#229)

* Headless chrome creation script and readme file

* Rename README_chrome_headless.md to README.md

* Add README.md

* add comments on how to run chrome to get pdf and png report

* Change test web from google.com to https://opendistro.github.io/for-elasticsearch
zhongnansu pushed a commit to zhongnansu/kibana-reports that referenced this pull request Dec 11, 2020
…icsearch#229)

* Headless chrome creation script and readme file

* Rename README_chrome_headless.md to README.md

* Add README.md

* add comments on how to run chrome to get pdf and png report

* Change test web from google.com to https://opendistro.github.io/for-elasticsearch
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants