-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect external URL allow list in TSVB
- Loading branch information
1 parent
a565fa0
commit 201f44a
Showing
3 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
...ugins/vis_types/timeseries/public/application/components/lib/external_url_error_modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { | ||
EuiButton, | ||
EuiModal, | ||
EuiModalBody, | ||
EuiModalFooter, | ||
EuiModalHeader, | ||
EuiModalHeaderTitle, | ||
EuiTextColor, | ||
} from '@elastic/eui'; | ||
|
||
interface ExternalUrlErrorModalProps { | ||
url: string; | ||
handleClose: () => void; | ||
} | ||
|
||
export const ExternalUrlErrorModal = ({ url, handleClose }: ExternalUrlErrorModalProps) => ( | ||
<EuiModal onClose={handleClose}> | ||
<EuiModalHeader> | ||
<EuiModalHeaderTitle> | ||
<FormattedMessage | ||
id="visTypeTimeseries.externalUrlErrorModal.headerTitle" | ||
defaultMessage="External URL access denied" | ||
/> | ||
</EuiModalHeaderTitle> | ||
</EuiModalHeader> | ||
<EuiModalBody> | ||
<FormattedMessage | ||
id="visTypeTimeseries.externalUrlErrorModal.bodyMessage" | ||
defaultMessage='External URL {url} was denied by ExternalUrl service. | ||
You can configure external URL policies using "{externalUrlPolicy}" setting in {kibanaConfigFileName}.' | ||
values={{ | ||
url: ( | ||
<EuiTextColor color="warning" component="span"> | ||
{url} | ||
</EuiTextColor> | ||
), | ||
externalUrlPolicy: 'externalUrl.policy', | ||
kibanaConfigFileName: 'kibana.yml', | ||
}} | ||
/> | ||
</EuiModalBody> | ||
<EuiModalFooter> | ||
<EuiButton onClick={handleClose} fill> | ||
<FormattedMessage | ||
id="visTypeTimeseries.externalUrlErrorModal.closeButtonLabel" | ||
defaultMessage="Close" | ||
/> | ||
</EuiButton> | ||
</EuiModalFooter> | ||
</EuiModal> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters