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

[ML] Set noopener feature when opening non-Kibana custom URLs #36205

Merged
merged 2 commits into from
May 8, 2019

Conversation

peteharverson
Copy link
Contributor

@peteharverson peteharverson commented May 7, 2019

Summary

Adds noopener and noreferrer as window features to the popup window opened for custom URLs that
use third party domains.

Checklist

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@peteharverson peteharverson added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix labels May 7, 2019
@@ -119,7 +119,11 @@ export const LinksMenu = injectI18n(class LinksMenu extends Component {
// Replace any tokens in the configured url_value with values from the source record,
// and then open link in a new tab/window.
const urlPath = replaceStringTokens(customUrl.url_value, record, true);
window.open(urlPath, '_blank');
if (isKibanaUrl(customUrl) === true) {
Copy link
Member

Choose a reason for hiding this comment

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

this block of code is repeated a few times, would it be worth moving it to a function in custom_url_utils.js called openURL or something similar?

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡️

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@peteharverson peteharverson merged commit 897280f into elastic:master May 8, 2019
@peteharverson peteharverson deleted the ml-custom-url-noopener branch May 8, 2019 13:06
peteharverson added a commit to peteharverson/kibana that referenced this pull request May 8, 2019
…c#36205)

* [ML] Set noopener feature when opening non Kibana custom URLs

* [ML] Refactor calls to open window into separate utils function
peteharverson added a commit that referenced this pull request May 8, 2019
#36272)

* [ML] Set noopener feature when opening non Kibana custom URLs

* [ML] Refactor calls to open window into separate utils function
peteharverson added a commit to peteharverson/kibana that referenced this pull request May 8, 2019
…c#36205)

* [ML] Set noopener feature when opening non Kibana custom URLs

* [ML] Refactor calls to open window into separate utils function
peteharverson added a commit that referenced this pull request May 8, 2019
#36279)

* [ML] Set noopener feature when opening non Kibana custom URLs

* [ML] Refactor calls to open window into separate utils function
@sophiec20 sophiec20 added the Feature:Anomaly Detection ML anomaly detection label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Anomaly Detection ML anomaly detection Feature:ml-results legacy - do not use :ml release_note:skip Skip the PR/issue when compiling release notes review v6.8.1 v7.1.1 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants