Merge branch '3.11-7.4' of https://github.com/wazuh/wazuh-kibana-app into 3.11-7.4

This commit is contained in:
JuanCarlos 2019-10-16 11:47:06 +02:00
commit b50cc199de
No known key found for this signature in database
GPG Key ID: B1C4FB733616273A
5 changed files with 103 additions and 68 deletions

View File

@ -12,7 +12,15 @@
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EuiBasicTable, EuiButtonIcon } from '@elastic/eui';
import {
EuiFlexGroup,
EuiFlexItem,
EuiBasicTable,
EuiButtonIcon,
EuiPanel,
EuiTitle,
EuiText
} from '@elastic/eui';
export class ReportingTable extends Component {
constructor(props) {
@ -116,14 +124,32 @@ export class ReportingTable extends Component {
};
return (
<div>
<EuiBasicTable
items={pageOfItems}
columns={columns}
pagination={pagination}
onChange={obj => this.onTableChange(obj)}
/>
</div>
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTitle>
<h2>Reporting</h2>
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText color="subdued" style={{ paddingBottom: '15px' }}>
From here you can check all your reports.
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiBasicTable
items={pageOfItems}
columns={columns}
pagination={pagination}
onChange={obj => this.onTableChange(obj)}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
);
}
}

View File

@ -22,7 +22,8 @@ import {
EuiButton,
EuiButtonEmpty,
EuiSteps,
EuiCallOut
EuiCallOut,
EuiPanel
} from '@elastic/eui';
export class AddApi extends Component {
@ -106,12 +107,12 @@ export class AddApi extends Component {
<div>
{(this.state.status === 'warning' ||
this.state.status === 'danger') && (
<EuiCallOut
color={this.state.status}
iconType="help"
title={this.state.message}
/>
)}
<EuiCallOut
color={this.state.status}
iconType="help"
title={this.state.message}
/>
)}
{(this.state.status === 'warning' ||
this.state.status === 'danger') && <EuiSpacer />}
<EuiText>
@ -168,28 +169,30 @@ export class AddApi extends Component {
const view = (
<EuiFlexGroup>
<EuiFlexItem />
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiText>
<h2>Getting started</h2>
</EuiText>
</EuiFlexItem>
<EuiFlexItem />
<EuiFlexItem grow={false}>
{this.state.enableClose && !this.state.blockClose && (
<EuiButtonEmpty
size="s"
onClick={() => this.props.closeAddApi()}
iconType="cross"
>
close
<EuiFlexItem className="min-guide-width">
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiText>
<h2>Getting started</h2>
</EuiText>
</EuiFlexItem>
<EuiFlexItem />
<EuiFlexItem grow={false}>
{this.state.enableClose && !this.state.blockClose && (
<EuiButtonEmpty
size="s"
onClick={() => this.props.closeAddApi()}
iconType="cross"
>
close
</EuiButtonEmpty>
)}
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer />
<EuiSteps firstStepNumber={1} steps={steps} />
)}
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer />
<EuiSteps firstStepNumber={1} steps={steps} />
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem />
</EuiFlexGroup>

View File

@ -27,7 +27,8 @@ import {
EuiCallOut,
EuiLoadingSpinner,
EuiToolTip,
EuiButtonIcon
EuiButtonIcon,
EuiPanel
} from '@elastic/eui';
export class ApiIsDown extends Component {
@ -103,8 +104,7 @@ export class ApiIsDown extends Component {
}
render() {
const apiExample = `
# Example Wazuh API configuration
const apiExample = `# Example Wazuh API configuration
hosts:
- production:
url: http://172.16.1.2
@ -165,21 +165,21 @@ hosts:
</EuiToolTip>
</span>
) : (
<span>
<EuiHealth color="danger">Offline</EuiHealth>
<EuiToolTip position="top" content={item.downReason}>
<EuiButtonIcon
color="primary"
style={{ marginTop: '-12px' }}
iconType="questionInCircle"
aria-label="Info about the error"
onClick={() =>
this.props.copyToClipBoard(item.downReason)
}
/>
</EuiToolTip>
</span>
);
<span>
<EuiHealth color="danger">Offline</EuiHealth>
<EuiToolTip position="top" content={item.downReason}>
<EuiButtonIcon
color="primary"
style={{ marginTop: '-12px' }}
iconType="questionInCircle"
aria-label="Info about the error"
onClick={() =>
this.props.copyToClipBoard(item.downReason)
}
/>
</EuiToolTip>
</span>
);
} else {
return (
<span>
@ -193,12 +193,12 @@ hosts:
]}
/>
)) || (
<EuiCallOut
color="danger"
iconType="cross"
title={this.state.error}
/>
)}
<EuiCallOut
color="danger"
iconType="cross"
title={this.state.error}
/>
)}
</div>
);
@ -239,12 +239,14 @@ hosts:
return (
<EuiFlexGroup>
<EuiFlexItem />
<EuiFlexItem>
<EuiText>
<h2>Wazuh API seems to be down</h2>
</EuiText>
<EuiSpacer />
<EuiSteps firstStepNumber={1} steps={steps} />
<EuiFlexItem className="min-guide-width">
<EuiPanel>
<EuiText>
<h2>Wazuh API seems to be down</h2>
</EuiText>
<EuiSpacer />
<EuiSteps firstStepNumber={1} steps={steps} />
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem />
</EuiFlexGroup>

View File

@ -527,7 +527,7 @@ export class SettingsController {
};
}
throw {
message: 'Some API entries are not reachable',
message: `Some Api entries are not rechable but at least one it is. That's mean that the Wazuh App can be used, but please, review your hosts configuration in order to solve the unreachable Api entries.`,
type: 'warning',
closedEnabled: true
};

View File

@ -1248,3 +1248,7 @@ md-toolbar.md-default-theme:not(.md-menu-toolbar), md-toolbar:not(.md-menu-toolb
md-chips.md-default-theme .md-chips, md-chips .md-chips{
box-shadow: none;
}
.min-guide-width{
min-width: 675px !important;
}