Skip to content

Commit

Permalink
Feature added node name of agent (#3039)
Browse files Browse the repository at this point in the history
* Added node name of agent on Agent list table and info.

* Fixed validation.

* Updated CHANGELOG

* Changed label by node name.

* Changed label by Cluster node.
  • Loading branch information
gabiwassan authored Mar 16, 2021
1 parent a3e010c commit ecabdbd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ All notable changes to the Wazuh app project will be documented in this file.
### Added

- Creation of index pattern after the default one is changes in Settings [#2985](https://github.com/wazuh/wazuh-kibana-app/pull/2985)
- Added node name of agent list and detail [#3039](https://github.com/wazuh/wazuh-kibana-app/pull/3039)

### Fixed

- Improved validation and prevention for caching bundles in client side [#3063](https://github.com/wazuh/wazuh-kibana-app/pull/3063)

## Wazuh v4.1.2 - Kibana 7.10.0 , 7.10.2 - Revision 4103

### Added
## Wazuh v4.1.1 - Kibana 7.10.0 , 7.10.2 - Revision 4103

- Refactor of some prompts [#3015](https://github.com/wazuh/wazuh-kibana-app/pull/3015)
- Add `run_as` setting to example host configuration in Add new API view [#3021](https://github.com/wazuh/wazuh-kibana-app/pull/3021)
- Refactor of some prompts [#3015](https://github.com/wazuh/wazuh-kibana-app/pull/3015)

### Fixed

Expand Down
22 changes: 12 additions & 10 deletions public/components/common/welcome/agents-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,8 @@ export class AgentInfo extends Component {

render() {
const { agent } = this.props;

let arrayStats;



if (this.props.isCondensed) {
arrayStats = [
{ title: agent.id, description: 'ID', style: { maxWidth: 100 } },
Expand All @@ -196,14 +193,19 @@ export class AgentInfo extends Component {
description: 'Operating system',
style: {}
},
{
title: this.parseDateTime(agent.dateAdd),
description: 'Registration date',
{
title: agent.node_name && agent.node_name !== 'unknown' ? agent.node_name : '-',
description: 'Cluster node',
style: { maxWidth: 150 }
},
{
title: this.parseDateTime(agent.dateAdd),
description: 'Registration date',
style: { maxWidth: 150 } },
{
title: this.parseDateTime(agent.lastKeepAlive),
description: 'Last keep alive',
style: { maxWidth: 150 }
{
title: this.parseDateTime(agent.lastKeepAlive),
description: 'Last keep alive',
style: { maxWidth: 150 }
},
];
}
Expand Down
12 changes: 11 additions & 1 deletion public/controllers/agent/components/agents-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ export class AgentsTable extends Component {
const agentVersion =
agent.version !== undefined ? agent.version.split(' ')[1] : '-';
const { timeService } = this.props;
const node_name = agent.node_name && agent.node_name !== 'unknown' ? agent.node_name : '-';

return {
id: agent.id,
name: agent.name,
Expand All @@ -245,6 +247,7 @@ export class AgentsTable extends Component {
group: checkField(agent.group),
os_name: agent,
version: agentVersion,
node_name: node_name,
dateAdd: timeService(agent.dateAdd),
lastKeepAlive: lastKeepAlive(agent.lastKeepAlive, timeService),
actions: agent,
Expand Down Expand Up @@ -748,6 +751,13 @@ export class AgentsTable extends Component {
truncateText: true,
render: this.addIconPlatformRender
},
{
field: 'node_name',
name: 'Cluster node',
width: '10%',
truncateText: true,
sortable: true
},
{
field: 'version',
name: 'Version',
Expand Down Expand Up @@ -858,7 +868,7 @@ export class AgentsTable extends Component {

const getCellProps = (item, column) => {
if(column.field=="actions"){
return
return
}
return {
onMouseDown: (ev) => {
Expand Down

0 comments on commit ecabdbd

Please sign in to comment.