|
7 | 7 |
|
8 | 8 | import React, { useEffect } from 'react'; |
9 | 9 | import { RouteComponentProps } from 'react-router-dom'; |
10 | | -import { EuiButton, EuiEmptyPrompt, EuiLoadingSpinner } from '@elastic/eui'; |
| 10 | +import { EuiButton, EuiEmptyPrompt, EuiLoadingSpinner, EuiPageContent } from '@elastic/eui'; |
11 | 11 | import { FormattedMessage } from '@kbn/i18n/react'; |
12 | 12 |
|
13 | 13 | import { MIN_SEARCHABLE_SNAPSHOT_LICENSE } from '../../../../common/constants'; |
@@ -52,43 +52,47 @@ export const EditPolicy: React.FunctionComponent<Props & RouteComponentProps<Rou |
52 | 52 |
|
53 | 53 | if (isLoading) { |
54 | 54 | return ( |
55 | | - <EuiEmptyPrompt |
56 | | - title={<EuiLoadingSpinner size="xl" />} |
57 | | - body={ |
58 | | - <FormattedMessage |
59 | | - id="xpack.indexLifecycleMgmt.editPolicy.policiesLoading" |
60 | | - defaultMessage="Loading policies..." |
61 | | - /> |
62 | | - } |
63 | | - /> |
| 55 | + <EuiPageContent verticalPosition="center" horizontalPosition="center" color="subdued"> |
| 56 | + <EuiEmptyPrompt |
| 57 | + title={<EuiLoadingSpinner size="xl" />} |
| 58 | + body={ |
| 59 | + <FormattedMessage |
| 60 | + id="xpack.indexLifecycleMgmt.editPolicy.policiesLoading" |
| 61 | + defaultMessage="Loading policies..." |
| 62 | + /> |
| 63 | + } |
| 64 | + /> |
| 65 | + </EuiPageContent> |
64 | 66 | ); |
65 | 67 | } |
66 | 68 | if (error || !policies) { |
67 | 69 | const { statusCode, message } = error ? error : { statusCode: '', message: '' }; |
68 | 70 | return ( |
69 | | - <EuiEmptyPrompt |
70 | | - title={ |
71 | | - <h2> |
72 | | - <FormattedMessage |
73 | | - id="xpack.indexLifecycleMgmt.editPolicy.lifecyclePoliciesLoadingFailedTitle" |
74 | | - defaultMessage="Unable to load existing lifecycle policies" |
75 | | - /> |
76 | | - </h2> |
77 | | - } |
78 | | - body={ |
79 | | - <p> |
80 | | - {message} ({statusCode}) |
81 | | - </p> |
82 | | - } |
83 | | - actions={ |
84 | | - <EuiButton onClick={resendRequest} iconType="refresh" color="danger"> |
85 | | - <FormattedMessage |
86 | | - id="xpack.indexLifecycleMgmt.editPolicy.lifecyclePoliciesReloadButton" |
87 | | - defaultMessage="Try again" |
88 | | - /> |
89 | | - </EuiButton> |
90 | | - } |
91 | | - /> |
| 71 | + <EuiPageContent verticalPosition="center" horizontalPosition="center" color="danger"> |
| 72 | + <EuiEmptyPrompt |
| 73 | + title={ |
| 74 | + <h2> |
| 75 | + <FormattedMessage |
| 76 | + id="xpack.indexLifecycleMgmt.editPolicy.lifecyclePoliciesLoadingFailedTitle" |
| 77 | + defaultMessage="Unable to load existing lifecycle policies" |
| 78 | + /> |
| 79 | + </h2> |
| 80 | + } |
| 81 | + body={ |
| 82 | + <p> |
| 83 | + {message} ({statusCode}) |
| 84 | + </p> |
| 85 | + } |
| 86 | + actions={ |
| 87 | + <EuiButton onClick={resendRequest} iconType="refresh" color="danger"> |
| 88 | + <FormattedMessage |
| 89 | + id="xpack.indexLifecycleMgmt.editPolicy.lifecyclePoliciesReloadButton" |
| 90 | + defaultMessage="Try again" |
| 91 | + /> |
| 92 | + </EuiButton> |
| 93 | + } |
| 94 | + /> |
| 95 | + </EuiPageContent> |
92 | 96 | ); |
93 | 97 | } |
94 | 98 |
|
|
0 commit comments