Fix bug in Discover no results screen caused by shard failure reason property being an object (#21601)
This commit is contained in:
parent
a0634c42d6
commit
188d0709bc
|
@ -333,7 +333,7 @@ Array [
|
|||
<code
|
||||
class="euiCodeBlock__code"
|
||||
>
|
||||
Awful error
|
||||
{"reason":"Awful error"}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
@ -362,7 +362,7 @@ Array [
|
|||
<code
|
||||
class="euiCodeBlock__code"
|
||||
>
|
||||
Bad error
|
||||
{"reason":"Bad error"}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
|
|
@ -67,7 +67,7 @@ export class DiscoverNoResults extends Component {
|
|||
<EuiSpacer size="s" />
|
||||
|
||||
<EuiCodeBlock paddingSize="s">
|
||||
{failure.reason}
|
||||
{JSON.stringify(failure.reason)}
|
||||
</EuiCodeBlock>
|
||||
|
||||
{index < shardFailures.length - 1 ? <EuiSpacer size="l" /> : undefined}
|
||||
|
|
|
@ -33,11 +33,11 @@ describe('DiscoverNoResults', () => {
|
|||
const shardFailures = [{
|
||||
index: 'A',
|
||||
shard: '1',
|
||||
reason: 'Awful error',
|
||||
reason: { reason: 'Awful error' },
|
||||
}, {
|
||||
index: 'B',
|
||||
shard: '2',
|
||||
reason: 'Bad error',
|
||||
reason: { reason: 'Bad error' },
|
||||
}];
|
||||
|
||||
const component = render(
|
||||
|
|
Loading…
Reference in a new issue