adding informational callout when step_info message is present (#27046) (#27074)

* adding informational callout when step_info message is present

* updating test and snapshot

* changing title to action status
This commit is contained in:
Bill McConaghy 2018-12-12 16:39:08 -05:00 committed by GitHub
parent 66a432b1c2
commit 86de250655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 1 deletions

View file

@ -122,6 +122,7 @@ exports[`ilm summary extension should return extension when index has lifecycle
"step": "ERROR",
"step_info": Object {
"reason": "setting [index.lifecycle.rollover_alias] for index [testy3] is empty or not defined",
"stack_trace": "fakestacktrace",
"type": "illegal_argument_exception",
},
"step_time_millis": 1544187776208,

View file

@ -82,6 +82,7 @@ const indexWithLifecycleError = {
step_info: {
type: 'illegal_argument_exception',
reason: 'setting [index.lifecycle.rollover_alias] for index [testy3] is empty or not defined',
stack_trace: 'fakestacktrace'
},
phase_execution: {
policy: 'testy',

View file

@ -169,7 +169,7 @@ export class IndexLifecycleSummary extends Component {
/>
</h3>
</EuiTitle>
{ ilm.step_info && ilm.step_info.type ? (
{ ilm.step_info && ilm.step_info.type && ilm.step_info.stack_trace ? (
<Fragment>
<EuiSpacer size="s"/>
<EuiCallOut
@ -188,6 +188,22 @@ export class IndexLifecycleSummary extends Component {
</EuiCallOut>
</Fragment>
) : null}
{ ilm.step_info && ilm.step_info.message && !ilm.step_info.stack_trace ? (
<Fragment>
<EuiSpacer size="s"/>
<EuiCallOut
color="primary"
title={
<FormattedMessage
defaultMessage="Action status"
id="xpack.idxMgmt.indexLifecycleMgmtSummary.actionStatusTitle"
/>
}
>
{ilm.step_info.message}
</EuiCallOut>
</Fragment>
) : null}
<EuiSpacer size="m"/>
<EuiFlexGroup>
<EuiFlexItem>