Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 4.5]Fix display of remote protocols when there are more than one #4941

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
- Fixed references to Elasticsearch in Wazuh-stack plugin [4894](https://github.com/wazuh/wazuh-kibana-app/pull/4894)

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