Skip to content

Commit

Permalink
Fix display of remote protocols when there are more than one (#4917)
Browse files Browse the repository at this point in the history
* Modify render function to separate arrays

* Update changelog
  • Loading branch information
Tostti authored Nov 30, 2022
1 parent 334c1a0 commit 5dba6f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All notable changes to the Wazuh app project will be documented in this file.

- Fixed an issue that caused incorrect visualization of IPv6 addresses ([#4909](https://github.com/wazuh/wazuh-kibana-app/pull/4909)).
- Fixed several typos in the code, by @jctello [#4911](https://github.com/wazuh/wazuh-kibana-app/pull/4911)
- Fixed the display of more than one protocol in the Global configuration section [#4917](https://github.com/wazuh/wazuh-kibana-app/pull/4917)
- Handling endpoint response was done when there is no data to show [#4918]https://github.com/wazuh/wazuh-kibana-app/pull/4918

## Wazuh v4.4.0 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4400
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,15 @@ export const objectWithoutProperties = obj => {
* @param {any} defaultValue
* @returns {function}
*/
export const renderValueOrDefault = defaultValue => value =>
typeof value !== 'undefined' ? value : defaultValue;
export const renderValueOrDefault = defaultValue => value => {
if (typeof value !== 'undefined') {
if (isArray(value)) {
return value.join(', ');
}
return value;
}
return defaultValue;
};

/**
* Return value if isn't falsy or '-'
Expand Down

0 comments on commit 5dba6f4

Please sign in to comment.