Skip to content

Commit

Permalink
Changed from camel case to snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankHassanabad committed Apr 7, 2020
1 parent 9ddd2a9 commit 126b823
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const MetaRule = t.intersection([
}),
t.partial({
throttle: t.string,
kibanaSiemAppUrl: t.string,
kibana_siem_app_url: t.string,
}),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const mockAboutStepRule = (isNew = false): AboutStepRule => ({
export const mockActionsStepRule = (isNew = false, enabled = false): ActionsStepRule => ({
isNew,
actions: [],
kibanaSiemAppUrl: 'http://localhost:5601/app/siem',
kibana_siem_app_url: 'http://localhost:5601/app/siem',
enabled,
throttle: 'no_actions',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const stepActionsDefaultValue = {
enabled: true,
isNew: true,
actions: [],
kibanaSiemAppUrl: '',
kibana_siem_app_url: '',
throttle: THROTTLE_OPTIONS[0].value,
};

Expand Down Expand Up @@ -135,7 +135,7 @@ const StepRuleActionsComponent: FC<StepRuleActionsProps> = ({
}}
/>
<UseField
path="kibanaSiemAppUrl"
path="kibana_siem_app_url"
defaultValue={kibanaAbsoluteUrl}
component={GhostFormField}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormSchema } from '../../../../../shared_imports';
export const schema: FormSchema = {
actions: {},
enabled: {},
kibanaSiemAppUrl: {},
kibana_siem_app_url: {},
throttle: {
label: i18n.translate(
'xpack.siem.detectionEngine.createRule.stepRuleActions.fieldThrottleLabel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ describe('helpers', () => {
actions: [],
enabled: false,
meta: {
kibanaSiemAppUrl: 'http://localhost:5601/app/siem',
kibana_siem_app_url: 'http://localhost:5601/app/siem',
},
throttle: 'no_actions',
};
Expand All @@ -533,7 +533,7 @@ describe('helpers', () => {
actions: [],
enabled: false,
meta: {
kibanaSiemAppUrl: mockStepData.kibanaSiemAppUrl,
kibana_siem_app_url: mockStepData.kibana_siem_app_url,
},
throttle: 'no_actions',
};
Expand Down Expand Up @@ -566,7 +566,7 @@ describe('helpers', () => {
],
enabled: false,
meta: {
kibanaSiemAppUrl: mockStepData.kibanaSiemAppUrl,
kibana_siem_app_url: mockStepData.kibana_siem_app_url,
},
throttle: 'rule',
};
Expand Down Expand Up @@ -599,7 +599,7 @@ describe('helpers', () => {
],
enabled: false,
meta: {
kibanaSiemAppUrl: mockStepData.kibanaSiemAppUrl,
kibana_siem_app_url: mockStepData.kibana_siem_app_url,
},
throttle: mockStepData.throttle,
};
Expand Down Expand Up @@ -631,7 +631,7 @@ describe('helpers', () => {
],
enabled: false,
meta: {
kibanaSiemAppUrl: mockStepData.kibanaSiemAppUrl,
kibana_siem_app_url: mockStepData.kibana_siem_app_url,
},
throttle: 'no_actions',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const formatActionsStepData = (actionsStepData: ActionsStepRule): Actions
const {
actions = [],
enabled,
kibanaSiemAppUrl,
kibana_siem_app_url,
throttle = NOTIFICATION_THROTTLE_NO_ACTIONS,
} = actionsStepData;

Expand All @@ -155,7 +155,7 @@ export const formatActionsStepData = (actionsStepData: ActionsStepRule): Actions
enabled,
throttle: actions.length ? throttle : NOTIFICATION_THROTTLE_NO_ACTIONS,
meta: {
kibanaSiemAppUrl,
kibana_siem_app_url,
},
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const getActionsStepsData = (
actions: actions?.map(transformRuleToAlertAction),
isNew: false,
throttle,
kibanaSiemAppUrl: meta?.kibanaSiemAppUrl,
kibana_siem_app_url: meta?.kibana_siem_app_url,
enabled,
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface ScheduleStepRule extends StepRuleData {
export interface ActionsStepRule extends StepRuleData {
actions: AlertAction[];
enabled: boolean;
kibanaSiemAppUrl?: string;
kibana_siem_app_url?: string;
throttle?: string | null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const rulesNotificationAlertType = ({
from: fromInMs,
to: toInMs,
id: ruleAlertSavedObject.id,
kibanaSiemAppUrl: ruleAlertParams.meta?.kibanaSiemAppUrl,
kibanaSiemAppUrl: ruleAlertParams.meta?.kibana_siem_app_url,
});

logger.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const signalRulesAlertType = ({
from: fromInMs,
to: toInMs,
id: savedObject.id,
kibanaSiemAppUrl: meta?.kibanaSiemAppUrl,
kibanaSiemAppUrl: meta?.kibana_siem_app_url,
});

logger.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface ThreatParams {

export interface Meta {
[key: string]: {} | string | undefined | null;
kibanaSiemAppUrl?: string | undefined;
kibana_siem_app_url?: string | undefined;
}

export interface RuleAlertParams {
Expand Down

0 comments on commit 126b823

Please sign in to comment.