From 073b7ffeabaec51688486ef94916cdf693b8d3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20David=20Guti=C3=A9rrez?= Date: Mon, 16 Dec 2024 12:59:04 +0100 Subject: [PATCH] fix: revert number definition --- .eslintrc.js | 1 + plugins/wazuh-core/common/constants.ts | 12 ++++++------ plugins/wazuh-core/public/services/http/constants.ts | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 16133261ff..53f46b96fc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -171,6 +171,7 @@ module.exports = { /* -------------------------------------------------------------------------- */ 'unicorn/prefer-module': 'off', 'unicorn/prefer-ternary': 'off', + 'unicorn/numeric-separators-style': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md 'unicorn/custom-error-definition': 'error', // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md diff --git a/plugins/wazuh-core/common/constants.ts b/plugins/wazuh-core/common/constants.ts index 726ac2c535..ff996a0568 100644 --- a/plugins/wazuh-core/common/constants.ts +++ b/plugins/wazuh-core/common/constants.ts @@ -101,7 +101,7 @@ export const WAZUH_SECURITY_PLUGINS = [ ]; // App configuration -export const WAZUH_CONFIGURATION_CACHE_TIME = 10_000; // time in ms; +export const WAZUH_CONFIGURATION_CACHE_TIME = 10000; // time in ms; // Reserved ids for Users/Role mapping export const WAZUH_API_RESERVED_ID_LOWER_THAN = 100; @@ -249,7 +249,7 @@ export const PLUGIN_PLATFORM_SETTING_NAME_TIME_FILTER = 'timepicker:timeDefaults'; // Default maxBuckets set by the app -export const WAZUH_PLUGIN_PLATFORM_SETTING_MAX_BUCKETS = 200_000; +export const WAZUH_PLUGIN_PLATFORM_SETTING_MAX_BUCKETS = 200000; export const PLUGIN_PLATFORM_SETTING_NAME_MAX_BUCKETS = 'timeline:max_buckets'; // Default metaFields set by the app @@ -389,7 +389,7 @@ export const NOT_TIME_FIELD_NAME_INDEX_PATTERN = 'not_time_field_name_index_pattern'; // Customization -export const CUSTOMIZATION_ENDPOINT_PAYLOAD_UPLOAD_CUSTOM_FILE_MAXIMUM_BYTES = 1_048_576; +export const CUSTOMIZATION_ENDPOINT_PAYLOAD_UPLOAD_CUSTOM_FILE_MAXIMUM_BYTES = 1048576; // Plugin settings export enum SettingCategory { @@ -1474,12 +1474,12 @@ hosts: title: 'Port', description: 'Port', type: EpluginSettingType.number, - defaultValue: 55_000, + defaultValue: 55000, isConfigurableFromSettings: true, options: { number: { min: 0, - max: 65_535, + max: 65535, integer: true, }, }, @@ -1713,7 +1713,7 @@ hosts: 'Maximum time, in milliseconds, the app will wait for an API response when making requests to it. It will be ignored if the value is set under 1500 milliseconds.', category: SettingCategory.GENERAL, type: EpluginSettingType.number, - defaultValue: 20_000, + defaultValue: 20000, isConfigurableFromSettings: true, options: { number: { diff --git a/plugins/wazuh-core/public/services/http/constants.ts b/plugins/wazuh-core/public/services/http/constants.ts index ad812bbb3d..8ea7ec6d05 100644 --- a/plugins/wazuh-core/public/services/http/constants.ts +++ b/plugins/wazuh-core/public/services/http/constants.ts @@ -2,4 +2,4 @@ export const PLUGIN_PLATFORM_REQUEST_HEADERS = { 'osd-xsrf': 'kibana', }; -export const HTTP_CLIENT_DEFAULT_TIMEOUT = 20_000; +export const HTTP_CLIENT_DEFAULT_TIMEOUT = 20000;