Skip to content

Commit

Permalink
Apply prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Machi3mfl committed Dec 20, 2024
1 parent da87f62 commit f8e7b16
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions plugins/wazuh-core/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,17 @@ export type TPluginSettingOptionsTextArea = {
maxRows?: number;
minRows?: number;
maxLength?: number;
}
};

export type TPluginSettingOptionsSelect = {
select: { text: string; value: any }[];
}
};

export type TPluginSettingOptionsEditor = {
editor: {
language: string;
};
}
};

export type TPluginSettingOptionsFile = {
file: {
Expand All @@ -445,15 +445,15 @@ export type TPluginSettingOptionsFile = {
resolveStaticURL: (filename: string) => string;
};
};
}
};

export type TPluginSettingOptionsNumber = {
number: {
min?: number;
max?: number;
integer?: boolean;
};
}
};

export type TPluginSettingOptionsSwitch = {
switch: {
Expand All @@ -462,17 +462,17 @@ export type TPluginSettingOptionsSwitch = {
enabled: { label?: string; value: any };
};
};
}
};

export type TPlugginSettingOptionsObjectOf = {
objectOf: {
[key: string]: TPluginSetting;
};
}
};

type TPluginSettingOptionsArrayOf = {
arrayOf: TPluginSetting;
}
};

export enum EpluginSettingType {
text = 'text',
Expand All @@ -498,18 +498,19 @@ export interface TPluginSetting {
// Type.
type: EpluginSettingType;
source: EConfigurationProviders;
options?: TPluginSettingOptionsTextArea
| TPluginSettingOptionsSelect
| TPluginSettingOptionsEditor
| TPluginSettingOptionsFile
| TPluginSettingOptionsNumber
options?:
| TPluginSettingOptionsTextArea
| TPluginSettingOptionsSelect
| TPluginSettingOptionsEditor
| TPluginSettingOptionsFile
| TPluginSettingOptionsNumber
| TPluginSettingOptionsSwitch
| TPlugginSettingOptionsObjectOf
| TPluginSettingOptionsArrayOf;
// Default value.
defaultValue: any;
validate?: (value: any) => string | undefined;
};
}

export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
'alerts.sample.prefix': {
Expand Down Expand Up @@ -606,10 +607,7 @@ export const PLUGIN_SETTINGS: { [key: string]: TPluginSetting } = {
category: SettingCategory.GENERAL,
type: EpluginSettingType.text,
defaultValue: '',
validate: SettingsValidator.compose(
SettingsValidator.isString,
//SettingsValidator.isNotEmptyString, // ToDo: get the default password
),
validate: SettingsValidator.compose(SettingsValidator.isString),
},
hideManagerAlerts: {
title: 'Hide manager alerts',
Expand Down Expand Up @@ -733,7 +731,7 @@ hosts:
title: 'Index pattern ignore',
description:
'Disable certain index pattern names from being available in index pattern selector.',
source: EConfigurationProviders.PLUGIN_UI_SETTINGS,
source: EConfigurationProviders.PLUGIN_UI_SETTINGS,
category: SettingCategory.GENERAL,
type: EpluginSettingType.editor,
defaultValue: [],
Expand Down Expand Up @@ -1031,7 +1029,4 @@ export const WAZUH_UPDATES_DISABLED = 'wazuh.updates.disabled';

export const REQUEST_TIMEOUT = 'timeout';


export const DEFAULT_COLUMNS_SETTING = 'defaultColumns2';


0 comments on commit f8e7b16

Please sign in to comment.