-
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.
Browse files
Browse the repository at this point in the history
* Respect external URL allow list in TSVB * Remove showExternalUrlErrorModal and onContextMenu handler for table * Update modal message Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
00c6f11
commit 56d1c9b
Showing
3 changed files
with
125 additions
and
13 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...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,60 @@ | ||
/* | ||
* 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="Access to this external URL is not yet enabled" | ||
/> | ||
</EuiModalHeaderTitle> | ||
</EuiModalHeader> | ||
<EuiModalBody> | ||
<FormattedMessage | ||
id="visTypeTimeseries.externalUrlErrorModal.bodyMessage" | ||
defaultMessage="Configure {externalUrlPolicy} in your {kibanaConfigFileName} to allow access to {url}." | ||
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