-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Kibana Application Privileges for Reporting #94966
Changes from all commits
114e6fe
fe4d0b6
dc1389d
7ffecd5
3827e2d
29fb231
9b675f9
d2e17a9
84e881b
3110eb5
0242a40
4bf0d25
3e4d71b
4cb82e3
c293f11
9505e17
1343dca
e25809c
7ae6eff
10b9424
2bc67aa
edd866b
6a0575b
118f6db
93918be
c8888e2
9a972fb
0bf2761
7b8acb1
1c0328f
22de10f
fd47295
34b72c5
c6f912d
26f59ba
67fdf72
5d87201
525305b
1a03dac
eec188c
2e732f2
c5cc50e
4e90797
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
], | ||
"optionalPlugins": [ | ||
"home", | ||
"reporting", | ||
"usageCollection" | ||
], | ||
"requiredBundles": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ export type OnCloseFn = (type: CloseTypes) => void; | |
export type GetExportUrlFn = (type: ExportUrlTypes, layout: LayoutType) => string; | ||
|
||
export interface Props { | ||
/** Flag to include the Reporting option only if Reporting is enabled */ | ||
includeReporting: boolean; | ||
/** Handler to invoke when an export URL is copied to the clipboard. */ | ||
onCopy: OnCopyFn; | ||
/** Handler to invoke when an end product is exported. */ | ||
|
@@ -39,7 +41,12 @@ export interface Props { | |
/** | ||
* The Menu for Exporting a Workpad from Canvas. | ||
*/ | ||
export const ShareMenu: FunctionComponent<Props> = ({ onCopy, onExport, getExportUrl }) => { | ||
export const ShareMenu: FunctionComponent<Props> = ({ | ||
includeReporting, | ||
onCopy, | ||
onExport, | ||
getExportUrl, | ||
}) => { | ||
const [showFlyout, setShowFlyout] = useState(false); | ||
|
||
const onClose = () => { | ||
|
@@ -73,16 +80,18 @@ export const ShareMenu: FunctionComponent<Props> = ({ onCopy, onExport, getExpor | |
closePopover(); | ||
}, | ||
}, | ||
{ | ||
name: strings.getShareDownloadPDFTitle(), | ||
icon: 'document', | ||
panel: { | ||
id: 1, | ||
title: strings.getShareDownloadPDFTitle(), | ||
content: getPDFPanel(closePopover), | ||
}, | ||
'data-test-subj': 'sharePanel-PDFReports', | ||
}, | ||
includeReporting | ||
? { | ||
name: strings.getShareDownloadPDFTitle(), | ||
icon: 'document', | ||
panel: { | ||
id: 1, | ||
title: strings.getShareDownloadPDFTitle(), | ||
content: getPDFPanel(closePopover), | ||
}, | ||
'data-test-subj': 'sharePanel-PDFReports', | ||
} | ||
: false, | ||
Comment on lines
+83
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant |
||
{ | ||
name: strings.getShareWebsiteTitle(), | ||
icon: <EuiIcon type="globe" size="m" />, | ||
|
@@ -91,7 +100,7 @@ export const ShareMenu: FunctionComponent<Props> = ({ onCopy, onExport, getExpor | |
closePopover(); | ||
}, | ||
}, | ||
], | ||
].filter(Boolean), | ||
}); | ||
|
||
const shareControl = (togglePopover: React.MouseEventHandler<any>) => ( | ||
|
@@ -123,6 +132,7 @@ export const ShareMenu: FunctionComponent<Props> = ({ onCopy, onExport, getExpor | |
}; | ||
|
||
ShareMenu.propTypes = { | ||
includeReporting: PropTypes.bool.isRequired, | ||
onCopy: PropTypes.func.isRequired, | ||
onExport: PropTypes.func.isRequired, | ||
getExportUrl: PropTypes.func.isRequired, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this note in the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is strange. I see the note when I run the local docs server:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging, I checked that this note is indeed visible in the published docs: https://www.elastic.co/guide/en/kibana/master/secure-reporting.html