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

Reporting CLI initial commit #4

Merged
merged 597 commits into from
Jan 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
597 commits
Select commit Hold shift + click to select a range
0399724
[Query Builder] Correctly handle match phrases when a single value is…
MKCG May 17, 2021
22e5489
Pass processing if doc[field] == null (#361)
uzhinskiy May 11, 2021
19ca93a
add test case for commit 368eb03e200b755870f1ad373e67561201ab6f31 (#370)
zhongnansu May 18, 2021
1260f6b
Unhash page url in case store URLs in session storage is enabled from…
zhongnansu May 21, 2021
fa2d7dc
Update Namespaces/APIs/Documentation for OpenSearch (#55)
davidcui1225 May 24, 2021
b43e33e
bump path-parse version to 1.0.7 to address CVE (#59)
davidcui1225 May 25, 2021
31bbecb
merge main into dev
davidcui1225 May 25, 2021
f517f3f
increase chromium timeout to 100s (#58)
zhongnansu May 25, 2021
4ba7ff4
Updated README.md CoC Link (#56)
ahopp May 25, 2021
83bf1b4
Fix csv parsing function (#53)
joshuali925 May 25, 2021
4a791ae
Add release notes for rc1 (#60)
davidcui1225 May 25, 2021
2341aaa
configure index settings to have default 1 replica and auto-expand up…
zhongnansu May 26, 2021
b88adc3
Rc1 release note patch (#63)
davidcui1225 May 26, 2021
c325710
Bump OpenSearch Dashboards version to 1.0 (#64)
davidcui1225 May 27, 2021
8c3b56f
fix merge conflict in readme
davidcui1225 May 27, 2021
8f8357b
Merge dev into main (#66)
davidcui1225 May 27, 2021
5ba1a9d
Revert .opensearch_dashboards index references to .kibana (#67)
davidcui1225 May 28, 2021
d08711e
Bump ws from 7.3.1 to 7.4.6 in /dashboards-reports (#68)
dependabot[bot] Jun 1, 2021
960bcaa
Add diagrams for integration with Notifications plugin (#75)
davidcui1225 Jun 8, 2021
c2c43bd
merge changes from main
davidcui1225 Jun 8, 2021
7e326be
Add i18n translation support (#362)
starcatter Jun 8, 2021
6933dd4
PDF report is no more a screenshot, increasing the overall quality
iget-esoares Apr 6, 2021
f3d5167
Add Notifications to docs (#87)
davidcui1225 Jun 15, 2021
62be0df
Better support sorting for csv report based on saved search (#86)
zhongnansu Jun 16, 2021
ab99ee3
Change Delivery Request Body for Notifications (#85)
davidcui1225 Jun 16, 2021
e5a9bfc
Remove legacy notifications/delivery related code (#94)
davidcui1225 Jun 23, 2021
3bcef87
Remove dependency on demo.elastic and use local mock html for testing…
zhongnansu Jun 24, 2021
15cb8e8
Add code cov back (#98)
zhongnansu Jun 24, 2021
48d81ab
update workflow to rename artifact in kebab case (#102)
zhongnansu Jun 25, 2021
138fb27
bump dependency version (#101)
zhongnansu Jun 25, 2021
c1bfb46
level up markdowns and readme (#97)
zhongnansu Jun 25, 2021
55d6144
Bump to version 1.0.0.0 (#103)
zhongnansu Jun 29, 2021
c7a1726
Bump test resource(job-scheduler) to 1.0.0.0 (#105)
zhongnansu Jun 30, 2021
9186448
fix failed cypress integ-testing (#106)
zhongnansu Jun 30, 2021
5c12180
Bump node version, fix workflow and gradle build (#108)
zhongnansu Jun 30, 2021
3661fa1
Add release notes for 1.0.0.0 (#104)
zhongnansu Jul 1, 2021
e517453
Fix notebooks context menu (#109)
joshuali925 Jul 6, 2021
c0b29d3
Fix context menu download request body after schema change to add not…
zhongnansu Jul 8, 2021
72705e2
Exclude time range from report details for Notebooks (#117)
davidcui1225 Jul 8, 2021
698448e
Update regex for notebooks reports (#118)
joshuali925 Jul 9, 2021
777a7f7
Add integtest script to the repo
peterzhuamazon Jul 9, 2021
938611f
Improve osd bootstrap on dub directory
peterzhuamazon Jul 10, 2021
18abf93
Improve osd bootstrap on dub directory
peterzhuamazon Jul 10, 2021
48570bd
Exclude Faulty Integration Test (#122)
davidcui1225 Jul 10, 2021
ae32282
Merge branch 'main' of github.com:opensearch-project/dashboards-repor…
peterzhuamazon Jul 10, 2021
8e2470f
Fix cypress reporting (#123)
davidcui1225 Jul 10, 2021
237a822
Merge pull request #121 from opensearch-project/opensearch-integtest-…
peterzhuamazon Jul 10, 2021
0cc55a9
toggle video on for cypress testing (#124)
davidcui1225 Jul 11, 2021
f44826f
Update Doc Links (#127)
davidcui1225 Jul 14, 2021
ea5dc61
Update template to reflect new branding (#128)
kgcreative Jul 16, 2021
a031386
Update UI for Notifications Integration (#126)
davidcui1225 Jul 19, 2021
0aeccac
Add themed logo to README (#130)
Jul 21, 2021
efb5a90
Fix url validation (#132)
joshuali925 Jul 28, 2021
55ed985
Fix url validation for context menu (#134)
joshuali925 Jul 28, 2021
b3cf1d4
Connect Notifications APIs to Reporting (#131)
davidcui1225 Jul 30, 2021
edc55c0
Fix snapshot build and upgrade to OpenSearch 1.1. (#140)
dblock Aug 19, 2021
622f334
Add release notes for 1.0.1 release (#143)
joshuali925 Aug 30, 2021
49d7937
Bump to 1.1 in main (#150)
davidcui1225 Sep 2, 2021
bf33e63
Bump opensearch ref to 1.1 in CI (#155)
joshuali925 Sep 14, 2021
dc55f62
Removed integtest.sh. (#157)
dblock Sep 17, 2021
1b08bff
Taking RBAC settings from Alerting plugin default to false
akbhatta Sep 22, 2021
c3c8e2f
Merge pull request #165 from akbhatta/main
akbhatta Sep 22, 2021
371f1d1
Bump tmpl from 1.0.4 to 1.0.5 in /dashboards-reports (#164)
dependabot[bot] Oct 1, 2021
9b1ecab
Fix quoting and url-encoding (#153)
kroussou Oct 7, 2021
6d2607b
Integrate notifications backend (#129)
joshuali925 Oct 7, 2021
a238baf
Remove hard coded localhost when calling API (#172)
joshuali925 Oct 7, 2021
5f4ef34
rename plugin helper config file name to consistent with OSD (#180)
Tengda-He Oct 12, 2021
3340e34
Add metrics for sending notifications (#173)
joshuali925 Oct 14, 2021
64c8e30
Add logic to build report detail page link and send as part of messag…
zhongnansu Oct 15, 2021
ecd95c9
Update validation for observability notebooks integration (#174)
joshuali925 Oct 18, 2021
b62ba6e
Build email message from template with reports links (#184)
zhongnansu Oct 18, 2021
b2097b8
Support range filters for csv reports (#185)
joshuali925 Oct 22, 2021
1b96740
Forward extra headers while using headless chromium (#194)
zhongnansu Oct 27, 2021
93d885c
Use advanced settings for date format in csv reports (#186)
joshuali925 Oct 27, 2021
56008de
add check in ReportInstanceActions to fix on demand report creation a…
davidcui1225 Oct 27, 2021
677fbab
Catch Notifications Errors on Details Pages (#197)
davidcui1225 Nov 1, 2021
c7b1c11
remove notifications integration from details pages and update snapsh…
davidcui1225 Nov 2, 2021
24cea4e
fix csv missing metadata fields issue and empty report on all(_source…
zhongnansu Nov 3, 2021
30bd9cf
remove notifications references from create and edit report definitio…
davidcui1225 Nov 3, 2021
b4ec424
refactor logic for creating DSL from saved object using buildOpensear…
zhongnansu Nov 3, 2021
42594da
Remove calling notifications in reports scheduler (#211)
joshuali925 Nov 4, 2021
c8dd5bf
Use advanced settings for csv separator and visual report timezone (#…
joshuali925 Nov 4, 2021
68962b3
Bump to version 1.2 (#203)
kavilla Nov 4, 2021
41523a5
Add dco and release drafter workflows (#217)
joshuali925 Nov 4, 2021
860e89c
update readme notification section (#216)
zhongnansu Nov 4, 2021
ccdadcc
revert paths to opendistro to keep cluster permissions same with ODFE…
davidcui1225 Nov 5, 2021
54b4e6c
Create opensearch-dashboards-reports.release-notes-1.2.0.0.md
kavithacm Nov 5, 2021
d0531f9
Update the copyright notices to reflect OpenSearch Contributors (#220)
davidcui1225 Nov 5, 2021
fe06fd0
changes
kavithacm Nov 5, 2021
f199e40
changes
kavithacm Nov 5, 2021
b686df8
Merge pull request #219 from kavithacm/1.2-release-notes
kavithacm Nov 5, 2021
b941c82
Remove notifications actions in reports scheduler (#221)
joshuali925 Nov 8, 2021
5f01a02
add reporting osd server configurations (#222)
zhongnansu Nov 9, 2021
1fdbadc
Add suggested font packages in troubleshooting tips (#189)
davidcui1225 Nov 10, 2021
ee7c0af
Update Copyright Headers (#226)
davidcui1225 Nov 12, 2021
507299e
Add support for codeowners to repo (#227)
ryanbogan Nov 16, 2021
497ce77
Fix reporting validation for observability (#231)
joshuali925 Nov 17, 2021
9e80976
remove poller code from frontend plugin (#235)
zhongnansu Nov 30, 2021
a2fbbe8
bump reports-scheduler to 1.3 (#241)
zhongnansu Dec 6, 2021
9f4fb7b
Fix apt source and link checker for CI (#245)
joshuali925 Dec 7, 2021
37fe669
Add Case Coverage tests for Create Report Definition (#239)
davidcui1225 Dec 7, 2021
40dc925
add bwc test for reports-scheduler (#244)
zhongnansu Dec 7, 2021
546a128
added code summary table (#243)
ps48 Dec 8, 2021
9daf116
Add Cypress Case Coverage on Details Pages (#250)
davidcui1225 Dec 9, 2021
6f30fc4
add gradle task to run integtest against remote cluster (#247)
zhongnansu Dec 9, 2021
02ae414
added untriaged and nolabel badges
ps48 Dec 17, 2021
4a93401
Merge pull request #259 from ps48/update_readme_badges
ps48 Dec 17, 2021
b08c5b4
bump dashboards-reports version to 1.3 (#265)
zhongnansu Dec 22, 2021
43bc73f
add UT for request/reseponse model (#264)
zhongnansu Dec 22, 2021
aee944b
Add .whitesource configuration file
mend-for-github-com[bot] Jan 11, 2022
d6fba2b
Address Reporting CVEs (#267)
davidcui1225 Jan 11, 2022
4355763
Merge pull request #268 from opensearch-project/whitesource/configure
ps48 Jan 11, 2022
fa3fa18
update yarn lock for cve fixes (#271)
davidcui1225 Jan 11, 2022
fed08aa
add release notes for 1.2.4
davidcui1225 Jan 12, 2022
3bf062e
remove jcenter repo from gradle build
ps48 Jan 13, 2022
48fa2c4
Merge pull request #278 from ps48/jcenter_fix_main
ps48 Jan 14, 2022
7a83ebb
Merge pull request #274 from davidcui1225/1.2.4-release-notes
ps48 Jan 18, 2022
c38ee04
update guava to 31.0.1-jre
ps48 Jan 24, 2022
03ecd26
Merge pull request #282 from ps48/guava_update
ps48 Jan 24, 2022
09fe245
WS package update (#283)
ps48 Jan 29, 2022
3b03b70
add auto-backport functionality for reporting (#286)
davidcui1225 Feb 24, 2022
f581454
Change Default CI version to JDK 11 (#290)
davidcui1225 Mar 1, 2022
a84e4b1
remove incorrect tag form issue template (#294)
zhongnansu Mar 2, 2022
d444010
Fix empty or multiple date values in csv (#293)
zhongnansu Mar 2, 2022
162373e
Update the saved object id matcher regex to match custom id (#295)
zhongnansu Mar 4, 2022
075f5ac
Replace Centos links to fix link checker CI (#297)
davidcui1225 Mar 7, 2022
d28fdd4
update regex to match custom saved object id (#298)
zhongnansu Mar 8, 2022
265e2a7
Fix reporting uuid parsing (#300)
joshuali925 Mar 8, 2022
e753b07
Add java 8 support in compile and test (#304)
zhongnansu Mar 10, 2022
2e904c5
Add 1.3 release notes (#307)
zhongnansu Mar 14, 2022
a3adae8
Bump version to 2.0.0 (#311)
eugenesk24 Mar 24, 2022
488e9d1
Support build version qualifier for reports (#322)
joshuali925 Mar 30, 2022
b86c19e
Bump to 2.0 alpha1 and gradle 7 (#325)
davidcui1225 Apr 4, 2022
9c01dfc
Make sure qualifier is applied in 2.0.0 (#327)
peterzhuamazon Apr 4, 2022
1ee8ef2
Added missing zip for bwc tests (#329)
vamsimanohar Apr 4, 2022
45fe8c1
Remove JDK14 from CI (#335)
vamsimanohar Apr 11, 2022
c736995
Updated issue templates from .github. (#328)
dblock Apr 12, 2022
87b24bb
Change alpha1 to rc1 for first 2.0 release (#333)
joshuali925 Apr 13, 2022
9b4391e
Remove zips and download from remote at build time (#337)
joshuali925 Apr 13, 2022
7642bbb
Incremented version to 2.0-rc1. (#341)
dblock Apr 15, 2022
a965daf
Remove master and whitelist text (#342)
joshuali925 Apr 18, 2022
480f1aa
Bump async from 3.2.0 to 3.2.3 in /dashboards-reports (#338)
dependabot[bot] Apr 18, 2022
095c35b
Bump moment from 2.29.1 to 2.29.3 in /dashboards-reports (#344)
dependabot[bot] Apr 18, 2022
b5b86dd
Bump minimist from 1.2.5 to 1.2.6 in /dashboards-reports (#321)
dependabot[bot] Apr 19, 2022
9346898
Add release notes for 2.0.0-rc1 (#346)
joshuali925 Apr 21, 2022
2d54efe
Bump cross-fetch from 3.0.6 to 3.1.5 in /dashboards-reports (#353)
dependabot[bot] Apr 29, 2022
56e9407
Support integTestRemote with security enabled endpoint (#354)
joshuali925 Apr 29, 2022
726ecd4
update builds from 2.0-rc1 to 2.0
ps48 May 10, 2022
38303cf
Merge pull request #358 from ps48/2.0_update
anirudha May 13, 2022
7333102
Release notes 2.0.0.0 (#361)
vamsimanohar May 19, 2022
ca25b88
Uses custom plugin to publish zips to maven (#372)
joshuali925 Jun 17, 2022
b5a533b
version bump to 2.1.0 and grade version upgrade to 7.4.2
kavithacm Jun 23, 2022
3541516
Merge pull request #379 from kavithacm/bump_to_2.1.0
kavithacm Jun 23, 2022
d70d507
Move HTML sanitization from client to server side (#382)
davidcui1225 Jun 27, 2022
47bbb32
2.1 release notes (#387)
kavithacm Jul 7, 2022
f1983fd
initial commit for reporting-anything
davidcui1225 Apr 25, 2022
4f4bd80
wrap download_report in try block
davidcui1225 Apr 25, 2022
754f3f1
address undefined errors in download
Apr 26, 2022
368c6e4
convert puppeteer evaluate expression to string
davidcui1225 Apr 26, 2022
97fdaa5
add report type const to page.evalute for puppeteer
davidcui1225 Apr 26, 2022
8fc34c5
test evaluate with google
Apr 26, 2022
a75b64e
reporting-anything functional for URL or opensearch reports, added in…
davidcui1225 Apr 27, 2022
f47deec
remove additional package.json and test report files
davidcui1225 Apr 27, 2022
fd754f7
remove additional yarn lock file
davidcui1225 Apr 27, 2022
99b1e59
address comments; remove type and object id as parameter options in f…
davidcui1225 Apr 28, 2022
c7a2b2d
added workaround for accessing auth-enabled dashboards, removed unuse…
davidcui1225 May 13, 2022
8e01eaa
Add release notes for 1.3.4.0 (#393)
joshuali925 Jul 13, 2022
6667bfb
Staging for version increment automation (#391)
prudhvigodithi Jul 26, 2022
556b5fb
Remove odfe bwc test (#408)
ps48 Aug 6, 2022
f43f7de
Release notes for 2.2.0
vamsimanohar Aug 6, 2022
51f6a6d
Add Bwc Test for OS 1.1 (#417)
ps48 Aug 16, 2022
ed351d6
Bump moment from 2.29.3 to 2.29.4 in /dashboards-reports (#410)
dependabot[bot] Aug 16, 2022
2e2fec3
Bump jsdom from 13.1.0 to 16.5.0 in /dashboards-reports (#380)
dependabot[bot] Aug 16, 2022
1c6febe
added authentication code for saml and fgac
sumukhswamy Jul 11, 2022
70800d3
added authentication code for cognito
sumukhswamy Jul 14, 2022
ec86b26
Added the code for changes of variable names and other optimizations
sumukhswamy Jul 15, 2022
6bb4808
divided the authentication implementation into functions for each aut…
sumukhswamy Jul 15, 2022
2bcaa68
commit added to change the signoff author text
sumukhswamy Jul 15, 2022
68d40a8
commit added to change the signoff author text
sumukhswamy Jul 28, 2022
9efc51f
addressed pr comments,added email sending, specified the template, di…
sumukhswamy Aug 18, 2022
c947f8d
Added release notes for 1.3.5 and 2.2.1
vamsimanohar Sep 1, 2022
b8ac313
release notes for 2.3.0
mengweieric Sep 9, 2022
b0c5643
Merge pull request #459 from mengweieric/release-notes-2.3.0
mengweieric Sep 9, 2022
3244da5
Update puppeteer flags (#460)
rupal-bq Sep 12, 2022
a607c8c
Upgrade puppeteer (#483)
rupal-bq Oct 5, 2022
32d22c6
Add Forum link in Dashboards reports plugin README.md (#455)
cwillum Oct 10, 2022
ab3e027
changes for new chromium
rupal-bq Oct 11, 2022
000d60d
fix timeout
rupal-bq Oct 11, 2022
541bba8
Fix No auth
rupal-bq Oct 11, 2022
c3688e2
change height to avoid blank space for smaller pages
rupal-bq Oct 11, 2022
3a136b3
fix for downloading report in required format only
rupal-bq Oct 11, 2022
7e45320
Merge remote-tracking branch 'origin/main' into reporting-anything
rupal-bq Oct 13, 2022
b25984b
add group = org.opensearch.plugin (#506)
prudhvigodithi Oct 13, 2022
3a6bbe0
email options draft
rupal-bq Oct 14, 2022
e1843a8
feat: enable windows and macos build (#504)
derek-ho Oct 20, 2022
3801649
Bump version to 3.0.0 (#509)
rupal-bq Oct 20, 2022
a1248a9
add minimatch 3.0.5 to resolutions (#512)
rupal-bq Oct 20, 2022
8db448e
fix email png attachment
rupal-bq Oct 21, 2022
391947c
fix command line credential value
rupal-bq Oct 21, 2022
070d53f
Reorganize command arguments
rupal-bq Oct 24, 2022
14486fc
Reorganize email functions
rupal-bq Oct 24, 2022
95b7e68
Switch to puppeteer
rupal-bq Oct 24, 2022
a56e88e
Add reference doc (draft)
rupal-bq Oct 24, 2022
54b99b7
Update doc
rupal-bq Oct 25, 2022
55837e4
Update docs
rupal-bq Oct 25, 2022
b980032
Add progress bar
rupal-bq Oct 26, 2022
4aa0a18
Update jsoup version (#514)
rupal-bq Oct 27, 2022
139e6e5
Fix snakeyaml vulnerability issue by disabling detekt (#518)
rupal-bq Oct 27, 2022
5fced6c
Update ktlint version to 0.45.1 (#521)
rupal-bq Oct 28, 2022
5e3047d
Enable Detekt (#522)
rupal-bq Oct 28, 2022
73c3670
Add loader-utils to resolutions (#524)
rupal-bq Oct 31, 2022
312e79a
Add SMTP transport
rupal-bq Nov 1, 2022
3e0e613
Change detekt version to 1.21.0 (#526)
rupal-bq Nov 1, 2022
3234832
add doc for installing & running reporting-anything
rupal-bq Nov 1, 2022
0dada24
Nit: add resolutions at once place (#529)
rupal-bq Nov 2, 2022
989f94b
Prettify help options, use commander instead of argparse
rupal-bq Nov 3, 2022
20886bc
Restructure command arguments
rupal-bq Nov 4, 2022
1d85de1
Replace progress bar with ora spinner
rupal-bq Nov 4, 2022
f8e2878
Update user doc
rupal-bq Nov 4, 2022
a1c4839
add release notes for 2.4.0.0 (#532)
rupal-bq Nov 4, 2022
4cbf99f
restructure files draft
rupal-bq Nov 7, 2022
835b6d5
add tenant for basic auth reports
rupal-bq Nov 9, 2022
3450bf0
Update spinner logs
rupal-bq Nov 14, 2022
38a9c0c
update filename default
rupal-bq Nov 16, 2022
acc4b34
Rename folder
rupal-bq Nov 19, 2022
98d33d4
Nit: missed adding deleted files in earlier commit
rupal-bq Nov 19, 2022
6d1a5db
add tenant for cognito
rupal-bq Nov 20, 2022
f250deb
Bump loader-utils from 2.0.3 to 2.0.4 in /dashboards-reports (#539)
dependabot[bot] Nov 22, 2022
666ad68
Add csv download option
rupal-bq Nov 30, 2022
09a153c
Add subject option
rupal-bq Nov 30, 2022
591fe67
Rename
rupal-bq Dec 6, 2022
f8f6583
Remove tests
rupal-bq Dec 6, 2022
18467f3
Update doc
rupal-bq Dec 6, 2022
fb5c9e0
Update flow diagram
rupal-bq Dec 6, 2022
97fe411
Remove ora logs if sending email is not required
rupal-bq Dec 6, 2022
af8c9a2
Fix csv issue with old es version
rupal-bq Dec 7, 2022
1a5c08d
Update repo name in doc
rupal-bq Dec 7, 2022
42b1650
Address PR comments
rupal-bq Dec 7, 2022
5eb1eaa
Use puppeteer v18 until dashboard pdf issue is fixed with v19
rupal-bq Dec 7, 2022
95c3779
Fix custom tenant issue
rupal-bq Dec 9, 2022
0b04cdf
Fix none auth
rupal-bq Dec 13, 2022
710b596
Make aws config optional
rupal-bq Dec 13, 2022
f5248fe
nit
rupal-bq Dec 13, 2022
e15eb33
Update reporting-cli/src/download-helpers.js
rupal-bq Dec 15, 2022
69c935f
nit: remove export
rupal-bq Dec 15, 2022
8fb8e29
Use yarn.lock instead of package-lock.json
rupal-bq Dec 15, 2022
755a2f1
Update doc
rupal-bq Dec 15, 2022
4d2f2a6
Add expected node version in dev doc
rupal-bq Dec 15, 2022
f116e76
Merge branch 'main' into reporting-anything
rupal-bq Jan 3, 2023
0699c81
Merge remote-tracking branch 'reporting-anything' into add-cli
rupal-bq Jan 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update spinner logs
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
rupal-bq committed Nov 14, 2022
commit 3450bf024763d674099135f210412c8f32112349
14 changes: 6 additions & 8 deletions reporting-anything/src/download-helpers.js
Original file line number Diff line number Diff line change
@@ -19,11 +19,10 @@ const DISCOVER = "discover";
const NOTEBOOKS = "notebooks"

const spinner = ora();
const reportSpinner = ora();

export async function downloadVisualReport(url, format, width, height, filename, authType, username, password, tenant) {
const window = new JSDOM('').window;
reportSpinner.start('Downloading report');
spinner.start('Connecting to url '+ url);
try {
const browser = await puppeteer.launch({
headless: true,
@@ -54,8 +53,6 @@ export async function downloadVisualReport(url, format, width, height, filename,
overridePage.setDefaultNavigationTimeout(0);
overridePage.setDefaultTimeout(300000);

spinner.info('Connecting to url '+ url);

// auth
if (authType !== undefined && authType !== NONE && username !== undefined && password !== undefined) {
if(authType === BASIC_AUTH){
@@ -73,7 +70,8 @@ export async function downloadVisualReport(url, format, width, height, filename,
else {
await page.goto(url, { waitUntil: 'networkidle0' });
}

spinner.info('Connected to url '+url);
spinner.start('Loading page');
await page.setViewport({
width: width,
height: height,
@@ -129,7 +127,7 @@ export async function downloadVisualReport(url, format, width, height, filename,
}
await waitForDynamicContent(page);
let buffer;
spinner.info('The page is loaded')
spinner.text =`Downloading Report...`;

// create pdf or png accordingly
if(format === FORMAT.PDF) {
@@ -155,9 +153,9 @@ export async function downloadVisualReport(url, format, width, height, filename,
await browser.close();
const data = { timeCreated, dataUrl: buffer.toString('base64'), fileName };
await readStreamToFile(data.dataUrl, fileName);
reportSpinner.succeed('The report is downloaded');
spinner.succeed('The report is downloaded');
} catch (e) {
reportSpinner.fail('Downloading report failed. ', e);
spinner.fail('Downloading report failed. ', e);
process.exit(1);
}
}
4 changes: 2 additions & 2 deletions reporting-anything/src/email-helpers.js
Original file line number Diff line number Diff line change
@@ -51,11 +51,11 @@ export async function sendEmail(filename, format, sender, recipient, transport,
}

const getTransporter = (transport, smtphost, smtpport, smtpsecure, smtpusername, smtppassword, transporter) => {
if(transport === 'SES') {
if(transport === 'ses') {
transporter = nodemailer.createTransport({
SES: ses
});
} else if (transport === 'SMTP') {
} else if (transport === 'smtp') {
transporter = nodemailer.createTransport({
host: smtphost,
port: smtpport,