-
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
[Watcher] Migrate all usages of EuiPage*_Deprecated #163128
Conversation
Co-authored-by: LuisChiej <[email protected]> Co-authored-by: gitstart_bot <[email protected]>
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Hi @gitstart! Thank you for your contribution ❤️ Can you please provide screenshots of the changes you have made? This will help us greatly with the review and confirm the changes have been tested. Also - a quick note: While the “How” section in #161413 provides a quick conversion map, unfortunately, this does not work for all cases. Please refer to the EUI guidelines on how to approach the migration and examples. You can also take a look at this PR as a reference implementation: #163134. Please let us know if you have any questions. Thanks! |
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.
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
Co-authored-by: LuisChiej <[email protected]> Co-authored-by: gitstart_bot <[email protected]>
import { FormattedMessage } from '@kbn/i18n-react'; | ||
|
||
export function PageErrorForbidden() { | ||
return ( | ||
<EuiEmptyPrompt | ||
<EuiPageTemplate.EmptyPrompt |
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.
import { FormattedMessage } from '@kbn/i18n-react'; | ||
|
||
export function PageErrorNotExist({ id }: { id?: string }) { | ||
return ( | ||
<EuiEmptyPrompt | ||
<EuiPageTemplate.EmptyPrompt |
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.
actions={[promptAction]} | ||
/> | ||
</EuiPageContent> | ||
<EuiPageTemplate.EmptyPrompt |
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.
@@ -94,7 +90,7 @@ export const JsonWatchEdit = ({ pageTitle }: { pageTitle: string }) => { | |||
); | |||
|
|||
return ( | |||
<EuiPageContentBody restrictWidth style={{ width: '100%' }}> | |||
<EuiPageSection restrictWidth style={{ width: '100%' }}> |
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.
@@ -236,7 +236,7 @@ export const ThresholdWatchEdit = ({ pageTitle }: { pageTitle: string }) => { | |||
}; | |||
|
|||
return ( | |||
<EuiPageContentBody restrictWidth style={{ width: '100%' }}> | |||
<EuiPageSection restrictWidth style={{ width: '100%' }}> |
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.
<PageError errorCode={errorCode} id={id} /> | ||
</EuiPageContent> | ||
); | ||
return <PageError errorCode={errorCode} id={id} />; |
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.
@@ -154,14 +150,14 @@ export const WatchEditPage = ({ | |||
|
|||
if (!watch) { | |||
return ( | |||
<EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued"> | |||
<EuiPageTemplate.EmptyPrompt> |
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.
@@ -178,24 +177,20 @@ export const WatchListPage = () => { | |||
|
|||
if (isWatchesLoading) { | |||
return ( | |||
<EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued"> | |||
<EuiPageTemplate.EmptyPrompt> |
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.
<PageError errorCode={errorCode} /> | ||
</EuiPageContent> | ||
); | ||
return <PageError errorCode={errorCode} />; |
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.
data-test-subj="emptyPrompt" | ||
/> | ||
</EuiPageContent> | ||
<EuiPageTemplate.EmptyPrompt |
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.
@@ -77,23 +77,19 @@ export const WatchStatusPage = ({ | |||
|
|||
if (isWatchDetailLoading) { | |||
return ( | |||
<EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued"> | |||
<EuiPageTemplate.EmptyPrompt> |
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.
<PageError errorCode={errorCode} id={id} /> | ||
</EuiPageContent> | ||
); | ||
return <PageError errorCode={errorCode} id={id} />; |
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.
]} | ||
/> | ||
</EuiPageContent> | ||
<EuiPageTemplate.EmptyPrompt |
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.
didn't verify this visually since I'm not sure, monitoring watches are still in use. The code changes LGTM
buildkite test this |
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.
Thanks a lot for the help, @gitstart!
Verified visually and added some fixes, the rest of the changes LGTM 👍
buildkite test this |
@elasticmachine run elasticsearch-ci/docs |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
What does this PR do?
Issue References
Video/Screenshot Demo
This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.