Skip to content

Commit

Permalink
Modify agent overview page (#4516)
Browse files Browse the repository at this point in the history
* layout structures are modified

* change styles to fix window

* Fix visual errors

* Change structure

* Update changelog

* Fix Changelog

* Update CHANGELOG.md

Co-authored-by: Nico Guevara <nicolas.guevara@wazuh.com>
Co-authored-by: Nico Guevara <42900763+Tostti@users.noreply.github.com>
Co-authored-by: Alex Ruiz Becerra <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 309227b)
  • Loading branch information
matiasmoreno876 authored and github-actions[bot] committed Sep 22, 2022
1 parent 128640e commit 89f1e54
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed nested field rendering in security alerts table details [#4428](https://github.com/wazuh/wazuh-kibana-app/pull/4428)
- Improved Agents Overview performance [#4363](https://github.com/wazuh/wazuh-kibana-app/pull/4363)
- Fixed a bug where the Wazuh logo was used instead of the custom one [#4539](https://github.com/wazuh/wazuh-kibana-app/pull/4539)
- Fixed rendering problems of the `Agent Overview` section in low resolutions [#4516](https://github.com/wazuh/wazuh-kibana-app/pull/4516)

## Wazuh v4.3.8 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4309

Expand Down
33 changes: 25 additions & 8 deletions public/components/common/modules/module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@
padding-top: 105px;
}

.wz-module.wz-module-welcome .wz-module-body{
padding-top: 109px !important;
.wz-module.wz-module-welcome{
.wz-module-agent-body{
padding-top: 50px !important;
}
.wz-module-body{
padding-top: 109px !important;
}
}

.wz-module.wz-module-showing-agent .wz-module-body{
Expand Down Expand Up @@ -111,19 +116,23 @@ discover-app-w .sidebar-container {
padding-top: 189px !important;
}
@media only screen and (max-width: 767px){
.wz-module-header-agent h1{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.wz-module.wz-module-welcome .wz-module-agent-body{
padding-top: 0px !important;
}
.wz-module-header-agent{
height: auto;
h1{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}

.wz-module-body {
margin-top: -160px;
}

.wz-module-header-agent-wrapper, .wz-module-header-nav-wrapper{
position: relative;
padding-left: 0px;
}

.wz-module-header-nav-wrapper{
Expand All @@ -137,5 +146,13 @@ discover-app-w .sidebar-container {
.wz-module-body-agent-info > .euiFlexGroup > .euiFlexItem {
max-width: unset!important;
}

.wz-module-header-agent-title .euiFlexItem{
align-items: flex-start!important;
}
.wz-agent-empty-item .euiFlexItem{
margin-top: 0px!important;
margin-bottom:0px!important;
}
}
}
41 changes: 24 additions & 17 deletions public/components/common/welcome/agents-welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,17 @@ class AgentsWelcome extends Component {
<span style={{ display: 'inline-flex' }}>
<EuiTitle size="s">
<h1>
<WzTextWithTooltipIfTruncated position='top' elementStyle={{ maxWidth: "150px" }}>
{this.state.widthWindow >= 768?(
<WzTextWithTooltipIfTruncated position='top' elementStyle={{ maxWidth: "150px" }}>
{this.props.agent.name}
</WzTextWithTooltipIfTruncated>
</WzTextWithTooltipIfTruncated>
):
(
<WzTextWithTooltipIfTruncated position='top'>
{this.props.agent.name}
</WzTextWithTooltipIfTruncated>
)
}
</h1>
</EuiTitle>
</span>
Expand Down Expand Up @@ -308,7 +316,9 @@ class AgentsWelcome extends Component {
</EuiPopover>
</EuiFlexItem>
}
<div className="wz-agent-empty-item">
<EuiFlexItem></EuiFlexItem>
</div>
<EuiFlexItem grow={false} style={{ marginTop: 7 }}>
<EuiButtonEmpty
iconType="inspect"
Expand Down Expand Up @@ -536,28 +546,25 @@ class AgentsWelcome extends Component {

return (
<div className="wz-module wz-module-welcome">
<div className='wz-module-header-agent-wrapper'>
<div className='wz-module-header-agent wz-module-header-agent-main'>
<div className='wz-module-header-agent wz-module-header-agent-wrapper'>
<div className='wz-module-header-agent-main'>
{title}
</div>
</div>
<div>
<div className='wz-module-header-nav-wrapper'>
<div className='wz-module-header-nav'>
<div style={{ margin: '0 16px' }}>
<EuiPanel grow paddingSize='s' className="wz-welcome-page-agent-info">
<AgentInfo agent={this.props.agent} isCondensed={false} hideActions={true} {...this.props}></AgentInfo>
</EuiPanel>
</div>
</div>
</div>
</div>
<div className='wz-module-body wz-module-agents-padding-responsive'>
<div className='wz-module-agent-body wz-module-agents-padding-responsive'>
<EuiPage>
<EuiPageBody component="div">

<div className='wz-module-header-nav'>
<div>
<EuiPanel grow paddingSize='s' className="wz-welcome-page-agent-info">
<AgentInfo agent={this.props.agent} isCondensed={false} hideActions={true} {...this.props}></AgentInfo>
</EuiPanel>
</div>
</div>
<EuiFlexGroup>
<EuiFlexItem />
<EuiFlexItem style={{ alignItems: 'flex-end', marginTop: 6, marginBottom: 10 }}> {/* DatePicker */}
<EuiFlexItem style={{ alignItems: 'flex-end', marginTop: 10, marginBottom: 10 }}> {/* DatePicker */}
<WzDatePicker condensed={true} onTimeChange={() => { }} />
</EuiFlexItem>
</EuiFlexGroup>
Expand Down

0 comments on commit 89f1e54

Please sign in to comment.