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

[SIEM] Add button with link to license management in ML popup #47841

Merged
merged 7 commits into from
Oct 11, 2019

Conversation

benskelker
Copy link
Contributor

@benskelker benskelker commented Oct 10, 2019

Summary

Adds button linking to license management to the ML popup text, as requested in #462:
Screenshot 2019-10-10 at 17 49 57

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@benskelker benskelker added Team:SIEM release_note:skip Skip the PR/issue when compiling release notes v7.5.0 labels Oct 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@benskelker
Copy link
Contributor Author

@MichaelMarcialis
Please can you take a look to ensure it meets UI standards (I'm sure I missed or screwed up something)?
Thanks

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Looking good! Left a couple of small comments to address before merging.

Comment on lines 58 to 63
<EuiButton
href={`${chrome.getBasePath()}/app/kibana#/management/elasticsearch/license_management`}
iconType="popout"
iconSide="right"
target="_blank"
>
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the management app is part of Kibana, I think it might be better to use managementApp for the iconType prop (as it's not an external link). Whether or not it should also have target="_blank" is debatable. I'm personally fine with it either way.

Also, I'm thinking we should remove the iconSide prop here (which will move the icon to the left side).

Comment on lines 50 to 63
<EuiButton
href="https://www.elastic.co/subscriptions"
iconType="popout"
iconSide="right"
target="_blank"
>
{i18n.UPGRADE_BUTTON}
</EuiButton>
<EuiButton
href={`${chrome.getBasePath()}/app/kibana#/management/elasticsearch/license_management`}
iconType="popout"
iconSide="right"
target="_blank"
>
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll need to wrap each of the EuiButton components in a EuiFlexItem component. You'll also want to give each EuiFlexItem a prop of grow={false}.

>
{i18n.UPGRADE_BUTTON}
</EuiButton>
<EuiFlexGroup justifyContent="spaceBetween" gutterSize="none">
Copy link
Contributor

Choose a reason for hiding this comment

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

Couple of changes to the props for EuiFlexGroup:

  • Remove justifyContent prop.
  • Make gutterSize prop gutterSize="s".
  • Add boolean prop wrap.

@benskelker
Copy link
Contributor Author

benskelker commented Oct 10, 2019

@MichaelMarcialis Thanks for your help, made the corrections:
Screenshot 2019-10-10 at 20 14 01

Copy link

@MikePaquette MikePaquette left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes @benskelker. This looks great. Approving now so as not to block you, but before you merge, would you mind changing the managementApp icon to gear? I thought it would inherit the button colors, but I guess it doesn't. Changing to gear should fix that :)

@benskelker
Copy link
Contributor Author

Sure:
Screenshot 2019-10-10 at 21 14 40

@@ -11157,4 +11157,4 @@
"xpack.fileUpload.fileParser.errorReadingFile": "ファイルの読み込み中にエラーが発生しました",
"xpack.fileUpload.fileParser.noFileProvided": "エラー、ファイルが提供されていません"
}
}
}
Copy link
Member

@spong spong Oct 10, 2019

Choose a reason for hiding this comment

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

Suggested change
}
}

I think these are unintentional -- does regenerating them return the newline?

@@ -11323,4 +11323,4 @@
"xpack.fileUpload.fileParser.errorReadingFile": "读取文件时出错",
"xpack.fileUpload.fileParser.noFileProvided": "错误,未提供任何文件"
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I think these are unintentional -- does regenerating them return the newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @spong
I regenerated them, but they didn't change. Is it a concern or can I merge?

Copy link
Member

Choose a reason for hiding this comment

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

Interesting. Judging by the history it looks like it's bounced back and forth between having a terminating new line and not. Generally speaking you want the terminating new line, so I would just revert these two files since that's the only changes.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}

Can try accepting this suggestion from within Github as well too 🙂

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@@ -1,4 +1,4 @@
{
SIEM_license_button_ML_popup{
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this snagged the build with the following error:

[21:11:34] Compatibility check with x-pack/plugins/translations/translations/zh-CN.json [failed]
[21:11:34] → Unexpected token S in JSON at position 0
[21:11:34] Compatibility Checks [failed]
[21:11:34] → Unexpected token S in JSON at position 0
ERROR Unhandled exception!
ERROR SyntaxError: Unexpected token S in JSON at position 0
          at JSON.parse (<anonymous>)
          at parse (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/dev/i18n/integrate_locale_files.ts:183:34)

@elasticmachine
Copy link
Contributor

💔 Build Failed

@benskelker
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@benskelker benskelker merged commit f591b59 into elastic:master Oct 11, 2019
@benskelker benskelker deleted the SIEM_license_button_ML_popup branch October 11, 2019 12:33
benskelker added a commit to benskelker/kibana that referenced this pull request Oct 15, 2019
…c#47841)

* Add button with link to license management in ML popup

* Corrections to button styling

* Updated button icon

* Update snapshots

* Correcting json translation files

* Fix zh_CN json file

* And now fixing the translation file properly
benskelker added a commit that referenced this pull request Oct 15, 2019
#48207)

* Add button with link to license management in ML popup

* Corrections to button styling

* Updated button icon

* Update snapshots

* Correcting json translation files

* Fix zh_CN json file

* And now fixing the translation file properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants