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

[Share Modal Redesign] Reporting Refactor Modals #180009

Merged
merged 250 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 209 commits
Commits
Show all changes
250 commits
Select commit Hold shift + click to select a range
d3a728b
initial commit
rshen91 Feb 22, 2024
ea7ebab
working link preview
rshen91 Feb 22, 2024
e450c70
link
rshen91 Feb 22, 2024
850cc41
tsconfig
rshen91 Feb 22, 2024
fd9e622
tsconfig
rshen91 Feb 22, 2024
700e6a4
copy link on click
rshen91 Feb 22, 2024
0158da8
wip
rshen91 Feb 29, 2024
a51d6c1
working on embed modal hooks
rshen91 Mar 4, 2024
1988c49
fix embed behavior in url
rshen91 Mar 4, 2024
2f3aaec
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 4, 2024
7c54bbe
design chx
rshen91 Mar 4, 2024
02b5eb9
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Mar 4, 2024
9134ea9
fix order of tabs to match figma
rshen91 Mar 5, 2024
656bd50
short urls when click copy link
rshen91 Mar 6, 2024
0c2ec06
add package to i18n
rshen91 Mar 6, 2024
504d34f
add padding right to code block
rshen91 Mar 6, 2024
730f080
fix
rshen91 Mar 6, 2024
33a3b52
wip adapt eyos work to pr
rshen91 Mar 8, 2024
ab933c5
wip refactor to use tabbedModal
rshen91 Mar 11, 2024
a4c6b67
wip
rshen91 Mar 11, 2024
9c5a774
wip for collab
rshen91 Mar 12, 2024
4ff4dcd
rework implementation for v2 share
eokoneyo Mar 19, 2024
e4865e8
fix issue with switching state within tabbed modal
eokoneyo Mar 20, 2024
bf4e6a4
integrate link and embed modal into modal to receive correct value on…
eokoneyo Mar 20, 2024
ca21906
visual styling for share modal
eokoneyo Mar 20, 2024
0bde2f5
test1
rshen91 Mar 21, 2024
7ef4cd4
test2 wip
rshen91 Mar 21, 2024
569149c
working
rshen91 Mar 22, 2024
7aa8f43
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 22, 2024
b14eaf8
got lens exports to work - pdf layout needs attention
rshen91 Mar 22, 2024
fe63217
fix lens reports
rshen91 Mar 22, 2024
8e087a9
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 25, 2024
4a3b887
add licensing to kibana.jsonc for lens
rshen91 Mar 25, 2024
e65e3d2
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 25, 2024
9e68156
some cleaning
rshen91 Mar 25, 2024
80c393a
Merge branch 'main' into test-reporting-modal-eyo
rshen91 Mar 25, 2024
0a0e541
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 25, 2024
853cb54
fix buttons fordashboard
rshen91 Mar 25, 2024
7a18154
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 25, 2024
83bb65a
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Mar 25, 2024
269e20e
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 26, 2024
b728380
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 26, 2024
3eb21bc
i18n updates
rshen91 Mar 26, 2024
2093d26
Merge branch 'main' into test-reporting-modal-eyo
rshen91 Mar 26, 2024
cd68a9b
fix some i18n but still issues with buttons not being string literals
rshen91 Mar 26, 2024
1a1d1af
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 26, 2024
ab16686
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 26, 2024
d365a13
remove old share modal component package
rshen91 Mar 26, 2024
e98ef9a
wip refactor reporting in lens
rshen91 Mar 27, 2024
54dfbb1
fix lens licensing for rendering csv only when not gold
rshen91 Mar 27, 2024
d6f1554
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 27, 2024
ffa2dee
design changes and more lens work
rshen91 Mar 27, 2024
17cdbe1
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 27, 2024
4d3bc58
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 27, 2024
110f063
fix lens rendering of image-export-modal
rshen91 Mar 27, 2024
a813ee4
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 27, 2024
cc27642
lens working
rshen91 Mar 27, 2024
3da70f8
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 27, 2024
f2d05ea
fix circ dep
rshen91 Mar 27, 2024
e7927af
[CI] Auto-commit changed files from 'node scripts/lint_packages --fix'
kibanamachine Mar 27, 2024
1b7fa3f
fix imports
rshen91 Mar 27, 2024
4984ade
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 27, 2024
014b8ca
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Mar 27, 2024
6c8615c
design fixes
rshen91 Mar 27, 2024
f240814
lint change
rshen91 Mar 27, 2024
0e3d4d7
Merge branch 'main' into test-reporting-modal-eyo
rshen91 Mar 27, 2024
553ca08
add jest config file
rshen91 Mar 27, 2024
2475cdc
fix
rshen91 Mar 27, 2024
91b99f8
styling change
rshen91 Mar 28, 2024
9d3b482
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 28, 2024
31428d8
disable csv if not saved
rshen91 Mar 28, 2024
ebe2b53
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 28, 2024
b8688e7
refactored tabbed_modal
rshen91 Mar 28, 2024
96c5193
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 28, 2024
4fab0f5
Merge branch 'main' into test-reporting-modal-eyo
rshen91 Mar 28, 2024
19f904b
clean up types
rshen91 Mar 28, 2024
49f4d55
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 28, 2024
a50db5c
delete files not related to this pr
rshen91 Mar 28, 2024
8ebf6af
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 28, 2024
f08d494
remove download csv from lens to avoid bundle size and put in share
rshen91 Mar 29, 2024
de84c0a
cleanup
rshen91 Mar 29, 2024
5076c0f
Merge branch 'main' into test-reporting-modal-eyo
rshen91 Mar 29, 2024
b00b380
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Mar 29, 2024
5f7ecdb
Merge remote-tracking branch 'origin/test-reporting-modal-eyo' into t…
rshen91 Mar 29, 2024
0f4403a
put download csv back to avoid circ dependency with the data plugin
rshen91 Mar 29, 2024
22f5e9b
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 1, 2024
2d0e9c8
refactor new register method for new share redesign
rshen91 Apr 2, 2024
315487f
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 2, 2024
d1be71b
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 2, 2024
44b8393
refactor the registry
rshen91 Apr 2, 2024
a6fab4c
refactor to send to share plugin wip
rshen91 Apr 2, 2024
3c736bf
got the export tab modal rendering
rshen91 Apr 3, 2024
4ad06bd
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 3, 2024
24cad86
wip reports dont work but modals set up
rshen91 Apr 3, 2024
2f7b903
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 3, 2024
61d5405
wip reporting is working except for console errors and lens csv
rshen91 Apr 3, 2024
d60cc52
Merge remote-tracking branch 'upstream/main' into test-reporting-moda…
rshen91 Apr 3, 2024
32b26db
each report type sends to share
rshen91 Apr 4, 2024
5780949
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
ea48f51
add render copy url to registers
rshen91 Apr 4, 2024
08f64df
fixes
rshen91 Apr 4, 2024
971adaf
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
06e3153
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 4, 2024
d883d0a
fix for lens without license
rshen91 Apr 4, 2024
a456364
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
859d070
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 4, 2024
14de199
fix
rshen91 Apr 4, 2024
fb3c54a
merge
rshen91 Apr 4, 2024
1dc236d
clean
rshen91 Apr 4, 2024
42202ae
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
ea22575
more cleaning
rshen91 Apr 4, 2024
5815ba8
fix pdf
rshen91 Apr 4, 2024
f5f898f
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
717d40d
fix lens radio bug
rshen91 Apr 4, 2024
fbb8c1f
clean
rshen91 Apr 4, 2024
f9cb9f4
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 4, 2024
06dba35
updatel limits
rshen91 Apr 4, 2024
a062cb5
more cleaning
rshen91 Apr 4, 2024
02b25de
clean
rshen91 Apr 4, 2024
3a3f5d7
fix
rshen91 Apr 4, 2024
b33d57d
clean
rshen91 Apr 5, 2024
3bad40b
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 5, 2024
b95512f
fix so that both versions can run
rshen91 Apr 5, 2024
4f97659
fix
rshen91 Apr 5, 2024
763af6e
move kibana.json deps
rshen91 Apr 5, 2024
85f743c
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 5, 2024
4523779
fix registry and add button action
rshen91 Apr 5, 2024
5ebb09d
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 5, 2024
38f8ddc
confing awareness
rshen91 Apr 5, 2024
dfa4acd
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 5, 2024
bd24e02
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 5, 2024
3c22110
allow users to generate copy urls and send reports for read only users
rshen91 Apr 5, 2024
2ee2b48
clean
rshen91 Apr 5, 2024
3f3f6ec
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 5, 2024
1f02066
fix
rshen91 Apr 5, 2024
ffe903b
Merge branch 'main' into trying-single-export
rshen91 Apr 5, 2024
2d94ff7
test updates
rshen91 Apr 5, 2024
88f15ea
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 5, 2024
9004368
fix
rshen91 Apr 5, 2024
8e2c802
fix
rshen91 Apr 5, 2024
1141fe4
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 5, 2024
a629264
removal of example reporting app
rshen91 Apr 5, 2024
15b471d
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Apr 5, 2024
3c40d8d
aint no party like a ci party
rshen91 Apr 8, 2024
dc2e661
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 8, 2024
365fb5a
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 8, 2024
ced397e
fix lens ftr
rshen91 Apr 8, 2024
dcde9f2
revert test
rshen91 Apr 8, 2024
2a990a9
code review
rshen91 Apr 8, 2024
f6b46e7
fix visualizations show radio
rshen91 Apr 8, 2024
cc8fb5d
fix
rshen91 Apr 8, 2024
63e4e8d
fix state so that embed and links are copied
rshen91 Apr 8, 2024
8ca550f
fix lens to not break on main
rshen91 Apr 8, 2024
801d53e
dashboard link needs to be short
rshen91 Apr 8, 2024
cf1b154
hannah code review
rshen91 Apr 8, 2024
eb6f6c8
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 8, 2024
8e3c4d6
code review
rshen91 Apr 8, 2024
b4e7f9d
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 8, 2024
e64192c
changes after demo with kevin
rshen91 Apr 8, 2024
afaadb3
move lens limits down
rshen91 Apr 8, 2024
9d6b644
lens doesnt show layout switch fix
rshen91 Apr 8, 2024
f7a593f
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 8, 2024
4f8201d
Apply suggestions from code review
rshen91 Apr 8, 2024
10476c9
code review
rshen91 Apr 8, 2024
2578146
code review
rshen91 Apr 8, 2024
c553ca1
checks
rshen91 Apr 8, 2024
6e76572
intl needs to be with the register reporting stuff not through the sh…
rshen91 Apr 9, 2024
928da44
fix intl in reporting plugin
rshen91 Apr 9, 2024
a9a19b0
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
4c2d08a
show a link before short url load
rshen91 Apr 9, 2024
db60e93
Apply suggestions from code review
rshen91 Apr 9, 2024
3bec36e
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 9, 2024
8234e9a
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
7f7c49c
clean up
rshen91 Apr 9, 2024
75c53a8
clean
rshen91 Apr 9, 2024
c336f0b
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
d1563bb
clean
rshen91 Apr 9, 2024
d64d028
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
470a1a0
Merge branch 'main' into trying-single-export
rshen91 Apr 9, 2024
76bbe81
code review
rshen91 Apr 9, 2024
cc98b19
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 9, 2024
2c9873f
type
rshen91 Apr 9, 2024
8debe7f
default short url when allowed
rshen91 Apr 9, 2024
ab933c3
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
c03f55b
Apply suggestions from code review
rshen91 Apr 9, 2024
9f15deb
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 9, 2024
44958d9
make dashboard saved state aware if not using short urls
rshen91 Apr 9, 2024
6ea4062
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 10, 2024
5239c2d
code review fix
rshen91 Apr 10, 2024
6cf3051
remove embed from link_content
rshen91 Apr 10, 2024
eef16ed
fix copy long url setDashboardLink
rshen91 Apr 10, 2024
56d1cc2
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 10, 2024
975c9b0
saved object url only once
rshen91 Apr 10, 2024
cc5afac
saved objects and copy
rshen91 Apr 10, 2024
4545917
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 10, 2024
2b4f667
clean up
rshen91 Apr 10, 2024
b7412d5
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 10, 2024
4572bd3
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 11, 2024
0f688ad
Merge branch 'main' into trying-single-export
rshen91 Apr 11, 2024
f9fffe8
code review
rshen91 Apr 11, 2024
d1e20e4
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 11, 2024
b0dda2b
Apply suggestions from code review
rshen91 Apr 11, 2024
d92969f
save state changes
rshen91 Apr 11, 2024
041088b
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 11, 2024
6a83a97
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 11, 2024
5929ff9
code review
rshen91 Apr 11, 2024
8d3635a
fix intl issue
rshen91 Apr 11, 2024
8419da2
fix edge case
rshen91 Apr 11, 2024
c2e92fd
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 11, 2024
85eae8b
Update src/plugins/share/public/components/tabs/export/index.tsx
rshen91 Apr 11, 2024
dde4a7f
Merge branch 'main' into trying-single-export
rshen91 Apr 11, 2024
047d76f
align footer for export tab action buttons
eokoneyo Apr 12, 2024
946f3d2
visual changes to match design specs
eokoneyo Apr 12, 2024
1d187fc
rework exports implementation to support modal close on action comple…
eokoneyo Apr 13, 2024
9da21fb
keep tabbed modal component generic
eokoneyo Apr 15, 2024
ec91412
rework share modal embed tab
eokoneyo Apr 15, 2024
501e323
more changes to align with design spec
eokoneyo Apr 15, 2024
419d5a1
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 15, 2024
83823c9
more changes to align with design spec
eokoneyo Apr 15, 2024
c0c661b
Merge branch 'main' into trying-single-export
kibanamachine Apr 15, 2024
80110d3
Merge branch 'main' into trying-single-export
rshen91 Apr 15, 2024
475867a
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
0c28a30
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 16, 2024
69ae32a
type fix
rshen91 Apr 16, 2024
3922de0
Merge branch 'main' into trying-single-export
rshen91 Apr 16, 2024
1b19751
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
2cc3abe
design suggestions
rshen91 Apr 16, 2024
c439922
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
aa95b08
Merge remote-tracking branch 'origin/trying-single-export' into tryin…
rshen91 Apr 16, 2024
6bbf3e2
spelling error
rshen91 Apr 16, 2024
4947793
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
02a849c
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
a41d7fd
change data test subjects so tests pass
rshen91 Apr 16, 2024
0eb9f7e
update jest test
rshen91 Apr 16, 2024
577f1c1
revert change for old tests to pass
rshen91 Apr 16, 2024
6ab6c7e
update jest test
rshen91 Apr 16, 2024
0129d87
revert types to work
rshen91 Apr 16, 2024
d123874
need to disable link and not generate url for lens if not saved
rshen91 Apr 16, 2024
88f0c50
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
ed443b8
button label
rshen91 Apr 16, 2024
dcd726c
pass
rshen91 Apr 16, 2024
6a6be07
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
1c9c539
type check
rshen91 Apr 16, 2024
aef7506
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
ad69726
lens button
rshen91 Apr 16, 2024
09186c5
fix lens
rshen91 Apr 16, 2024
a4e2bff
fix link button
rshen91 Apr 16, 2024
52d9883
styling
rshen91 Apr 16, 2024
b28aab3
fix
rshen91 Apr 16, 2024
91ec5dc
Merge remote-tracking branch 'upstream/main' into trying-single-export
rshen91 Apr 16, 2024
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ packages/kbn-repo-path @elastic/kibana-operations
packages/kbn-repo-source-classifier @elastic/kibana-operations
packages/kbn-repo-source-classifier-cli @elastic/kibana-operations
packages/kbn-reporting/common @elastic/appex-sharedux
x-pack/examples/reporting_example @elastic/appex-sharedux
packages/kbn-reporting/get_csv_panel_actions @elastic/appex-sharedux
packages/kbn-reporting/export_types/csv @elastic/appex-sharedux
packages/kbn-reporting/export_types/csv_common @elastic/appex-sharedux
packages/kbn-reporting/export_types/pdf @elastic/appex-sharedux
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@
"@kbn/repo-info": "link:packages/kbn-repo-info",
"@kbn/repo-packages": "link:packages/kbn-repo-packages",
"@kbn/reporting-common": "link:packages/kbn-reporting/common",
"@kbn/reporting-example-plugin": "link:x-pack/examples/reporting_example",
"@kbn/reporting-csv-share-panel": "link:packages/kbn-reporting/get_csv_panel_actions",
"@kbn/reporting-export-types-csv": "link:packages/kbn-reporting/export_types/csv",
"@kbn/reporting-export-types-csv-common": "link:packages/kbn-reporting/export_types/csv_common",
"@kbn/reporting-export-types-pdf": "link:packages/kbn-reporting/export_types/pdf",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pageLoadAssetSize:
presentationUtil: 58834
profiling: 36694
remoteClusters: 51327
reporting: 57003
reporting: 58600
rollup: 97204
runtimeFields: 41752
savedObjects: 108518
Expand All @@ -137,7 +137,7 @@ pageLoadAssetSize:
serverlessObservability: 68747
serverlessSearch: 72995
sessionView: 77750
share: 71239
share: 88160
slo: 37039
snapshotRestore: 79032
spaces: 57868
Expand Down
9 changes: 9 additions & 0 deletions packages/kbn-reporting/get_csv_panel_actions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export { ReportingCsvPanelAction } from './panel_actions/get_csv_panel_action';
13 changes: 13 additions & 0 deletions packages/kbn-reporting/get_csv_panel_actions/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/packages/kbn-reporting/get_csv_panel_actions'],
};
5 changes: 5 additions & 0 deletions packages/kbn-reporting/get_csv_panel_actions/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "shared-browser",
"id": "@kbn/reporting-csv-share-panel",
"owner": "@elastic/appex-sharedux"
}
6 changes: 6 additions & 0 deletions packages/kbn-reporting/get_csv_panel_actions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@kbn/reporting-csv-share-panel",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { dataViewMock } from '@kbn/discover-utils/src/__mocks__';
import { LicenseCheckState } from '@kbn/licensing-plugin/public';
import { licensingMock } from '@kbn/licensing-plugin/public/mocks';
import type { SavedSearch } from '@kbn/saved-search-plugin/public';
import { ReportingAPIClient } from '../..';
import type { ClientConfigType } from '../../types';
import { ReportingAPIClient } from '@kbn/reporting-public';
import type { ClientConfigType } from '@kbn/reporting-public/types';
import {
ActionContext,
type PanelActionDependencies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import type { UiActionsActionDefinition as ActionDefinition } from '@kbn/ui-acti
import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public';

import { CSV_REPORTING_ACTION, JobAppParamsCSV } from '@kbn/reporting-export-types-csv-common';
import type { ClientConfigType } from '../../types';
import { checkLicense } from '../../license_check';
import type { ReportingAPIClient } from '../../reporting_api_client';
import type { ClientConfigType } from '@kbn/reporting-public/types';
import { checkLicense } from '@kbn/reporting-public/license_check';
import type { ReportingAPIClient } from '@kbn/reporting-public/reporting_api_client';
import { getI18nStrings } from './strings';

function isSavedSearchEmbeddable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import React from 'react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import type { ReportingAPIClient } from '../../reporting_api_client';
import type { ReportingAPIClient } from '@kbn/reporting-public/reporting_api_client';

interface I18nStrings {
displayName: string;
Expand Down
31 changes: 31 additions & 0 deletions packages/kbn-reporting/get_csv_panel_actions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node"
]
},
"include": [
"**/*.ts", "**/*.tsx"
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/core",
"@kbn/data-plugin",
"@kbn/i18n",
"@kbn/reporting-export-types-csv-common",
"@kbn/licensing-plugin",
"@kbn/i18n-react",
"@kbn/discover-utils",
"@kbn/saved-search-plugin",
"@kbn/discover-plugin",
"@kbn/embeddable-plugin",
"@kbn/ui-actions-plugin",
"@kbn/react-kibana-mount",
"@kbn/reporting-public",
]
}
4 changes: 3 additions & 1 deletion packages/kbn-reporting/public/share/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
*/

export { getSharedComponents } from './shared';
export { reportingExportModalProvider } from './share_context_menu/register_pdf_png_modal_reporting';
export { reportingScreenshotShareProvider } from './share_context_menu/register_pdf_png_reporting';
export { reportingCsvShareProvider } from './share_context_menu/register_csv_reporting';
export { ReportingCsvPanelAction } from './panel_actions/get_csv_panel_action';
export { reportingCsvShareProvider as reportingCsvShareModalProvider } from './share_context_menu/register_csv_modal_reporting';
export type { ReportingPublicComponents } from './shared/get_shared_components';
export type { JobParamsProviderOptions } from './share_context_menu';
11 changes: 11 additions & 0 deletions packages/kbn-reporting/public/share/share_context_menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import type {
ApplicationStart,
I18nStart,
IUiSettingsClient,
ThemeServiceSetup,
ToastsSetup,
Expand All @@ -16,6 +17,16 @@ import { ILicense } from '@kbn/licensing-plugin/public';
import type { LayoutParams } from '@kbn/screenshotting-plugin/common';
import type { ReportingAPIClient } from '../../reporting_api_client';

export interface ExportModalShareOpts {
apiClient: ReportingAPIClient;
uiSettings: IUiSettingsClient;
usesUiCapabilities: boolean;
license: ILicense;
application: ApplicationStart;
theme: ThemeServiceSetup;
i18n: I18nStart;
}

export interface ExportPanelShareOpts {
apiClient: ReportingAPIClient;
toasts: ToastsSetup;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { i18n } from '@kbn/i18n';
import React from 'react';
import { toMountPoint } from '@kbn/react-kibana-mount';

import { CSV_JOB_TYPE, CSV_JOB_TYPE_V2 } from '@kbn/reporting-export-types-csv-common';

import type { SearchSourceFields } from '@kbn/data-plugin/common';
import { ShareContext, ShareMenuItem } from '@kbn/share-plugin/public';
import { FormattedMessage, InjectedIntl } from '@kbn/i18n-react';
import type { ExportModalShareOpts } from '.';
import { checkLicense } from '../..';

export const reportingCsvShareProvider = ({
apiClient,
application,
license,
usesUiCapabilities,
i18n: i18nStart,
theme,
rshen91 marked this conversation as resolved.
Show resolved Hide resolved
}: ExportModalShareOpts) => {
const getShareMenuItems = ({ objectType, sharingData, onClose, toasts }: ShareContext) => {
if ('search' !== objectType) {
return [];
}

// only csv v2 supports esql (isTextBased) reports
// TODO: whole csv reporting should move to v2 https://github.com/elastic/kibana/issues/151190
const reportType = sharingData.isTextBased ? CSV_JOB_TYPE_V2 : CSV_JOB_TYPE;

const getSearchSource = sharingData.getSearchSource as ({
addGlobalTimeFilter,
absoluteTime,
}: {
addGlobalTimeFilter?: boolean;
absoluteTime?: boolean;
}) => SearchSourceFields;

const jobParams = {
title: sharingData.title as string,
objectType,
};

const getJobParams = (forShareUrl?: boolean) => {
if (reportType === CSV_JOB_TYPE_V2) {
// csv v2 uses locator params
return {
...jobParams,
locatorParams: sharingData.locatorParams as [Record<string, unknown>],
};
}

// csv v1 uses search source and columns
return {
...jobParams,
columns: sharingData.columns as string[] | undefined,
searchSource: getSearchSource({
addGlobalTimeFilter: true,
absoluteTime: !forShareUrl,
}),
};
};

const shareActions: ShareMenuItem[] = [];

const licenseCheck = checkLicense(license.check('reporting', 'basic'));
const licenseToolTipContent = licenseCheck.message;
const licenseHasCsvReporting = licenseCheck.showLinks;
const licenseDisabled = !licenseCheck.enableLinks;

let capabilityHasCsvReporting = false;
if (usesUiCapabilities) {
capabilityHasCsvReporting = application.capabilities.discover?.generateCsv === true;
} else {
capabilityHasCsvReporting = true; // deprecated
}

const generateReportingJobCSV = ({ intl }: { intl: InjectedIntl }) => {
const decoratedJobParams = apiClient.getDecoratedJobParams(getJobParams());
return apiClient
.createReportingJob(reportType, decoratedJobParams)
.then(() => {
toasts.addSuccess({
title: intl.formatMessage(
{
id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle',
defaultMessage: 'Queued report for {objectType}',
},
{ objectType }
),
text: toMountPoint(
<FormattedMessage
id="reporting.share.modalContent.successfullyQueuedReportNotificationDescription"
defaultMessage="Track its progress in {path}."
values={{
path: (
<a href={apiClient.getManagementLink()}>
<FormattedMessage
id="reporting.share.publicNotifier.reportLink.reportingSectionUrlLinkLabel"
defaultMessage="Stack Management &gt; Reporting"
/>
</a>
),
}}
/>,
{ theme, i18n: i18nStart }
),
'data-test-subj': 'queueReportSuccess',
});
if (onClose) {
onClose();
}
})
.catch((error) => {
toasts.addError(error, {
title: intl.formatMessage({
id: 'reporting.share.modalContent.notification.reportingErrorTitle',
defaultMessage: 'Unable to create report',
}),
toastMessage: error.body?.message,
});
});
};

if (licenseHasCsvReporting && capabilityHasCsvReporting) {
const panelTitle = i18n.translate(
'reporting.share.contextMenu.export.csvReportsButtonLabel',
{
defaultMessage: 'Export',
}
);

const reportingUrl = new URL(window.location.origin);

const relativePath = apiClient.getReportingPublicJobPath(
reportType,
apiClient.getDecoratedJobParams(getJobParams())
);

const absoluteUrl = new URL(relativePath, window.location.href).toString();

shareActions.push({
shareMenuItem: {
name: panelTitle,
toolTipContent: licenseToolTipContent,
disabled: licenseDisabled,
['data-test-subj']: 'Export',
},
helpText: (
<FormattedMessage
id="reporting.share.csv.reporting.helpTextCSV"
defaultMessage="Export a CSV of this {objectType}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence needs a period. Also might be good to clarify what a CSV is.

Suggested change
defaultMessage="Export a CSV of this {objectType}"
defaultMessage="Export a comma-separated values (CSV) file of this {objectType}."

values={{ objectType }}
/>
),
reportType,
label: 'CSV' as const,
copyURLButton: {
id: 'reporting.share.modalContent.csv.copyUrlButtonLabel',
dataTestSubj: 'shareReportingCopyURL',
label: 'Post URL',
},
generateReportButton: (
<FormattedMessage
id="reporting.share.generateButtonLabelCSV"
data-test-subj="generateReportButton"
defaultMessage="Generate CSV"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this wording better match the modal tab?

Suggested change
defaultMessage="Generate CSV"
defaultMessage="Export file"

/>
),
generateReport: generateReportingJobCSV,
generateCopyUrl: reportingUrl,
absoluteUrl,
renderCopyURLButton: true,
});
}

return shareActions;
};

return {
id: 'csvReportsModal',
getShareMenuItems,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React from 'react';
import { CSV_JOB_TYPE, CSV_JOB_TYPE_V2 } from '@kbn/reporting-export-types-csv-common';

import type { SearchSourceFields } from '@kbn/data-plugin/common';
import { ShareContext, ShareMenuProvider } from '@kbn/share-plugin/public';
import { ShareContext, ShareMenuItem, ShareMenuProvider } from '@kbn/share-plugin/public';
import type { ExportPanelShareOpts } from '.';
import { checkLicense } from '../..';
import { ReportingPanelContent } from './reporting_panel_content_lazy';
Expand Down Expand Up @@ -68,7 +68,7 @@ export const reportingCsvShareProvider = ({
};
};

const shareActions = [];
const shareActions: ShareMenuItem[] = [];

const licenseCheck = checkLicense(license.check('reporting', 'basic'));
const licenseToolTipContent = licenseCheck.message;
Expand Down
Loading