parent
e72ddfa483
commit
6d234d1765
|
@ -379,16 +379,12 @@ describe('<FollowerIndicesList />', () => {
|
|||
test('should have a section to render the follower index shards stats', async () => {
|
||||
await actions.clickFollowerIndexAt(0);
|
||||
expect(exists('followerIndexDetail.shardsStatsSection')).toBe(true);
|
||||
});
|
||||
|
||||
test('should render a EuiCodeEditor for each shards stats', async () => {
|
||||
await actions.clickFollowerIndexAt(0);
|
||||
const codeBlocks = find('shardsStats');
|
||||
|
||||
const codeEditors = component.find(`EuiCodeEditor`);
|
||||
|
||||
expect(codeEditors.length).toBe(index1.shards.length);
|
||||
codeEditors.forEach((codeEditor, i) => {
|
||||
expect(JSON.parse(codeEditor.props().value)).toEqual(index1.shards[i]);
|
||||
expect(codeBlocks.length).toBe(index1.shards.length);
|
||||
codeBlocks.forEach((codeBlock, i) => {
|
||||
expect(JSON.parse(codeBlock.props().children)).toEqual(index1.shards[i]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
EuiButton,
|
||||
EuiButtonEmpty,
|
||||
EuiCallOut,
|
||||
EuiCodeEditor,
|
||||
EuiCodeBlock,
|
||||
EuiDescriptionList,
|
||||
EuiDescriptionListDescription,
|
||||
EuiDescriptionListTitle,
|
||||
|
@ -356,18 +356,9 @@ export class DetailPanel extends Component {
|
|||
</h3>
|
||||
</EuiTitle>
|
||||
<EuiSpacer size="s" />
|
||||
<EuiCodeEditor
|
||||
mode="json"
|
||||
theme="textmate"
|
||||
width="100%"
|
||||
isReadOnly
|
||||
setOptions={{ maxLines: Infinity }}
|
||||
value={JSON.stringify(shard, null, 2)}
|
||||
editorProps={{
|
||||
$blockScrolling: Infinity,
|
||||
}}
|
||||
data-test-subj={`shardsStats${i}`}
|
||||
/>
|
||||
<EuiCodeBlock language="json" data-test-subj="shardsStats">
|
||||
{JSON.stringify(shard, null, 2)}
|
||||
</EuiCodeBlock>
|
||||
</Fragment>
|
||||
))}
|
||||
</section>
|
||||
|
|
Loading…
Reference in a new issue