Skip to content

Commit

Permalink
Adding kibana- to beginning of prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Apr 7, 2021
1 parent 75dcb88 commit 095b495
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/common/alert_history_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { isEmpty } from 'lodash';

export const ALERT_HISTORY_PREFIX = 'alert-history-';
export const ALERT_HISTORY_PREFIX = 'kibana-alert-history-';
export const AlertHistoryDefaultIndexName = `${ALERT_HISTORY_PREFIX}default`;
export const AlertHistoryEsIndexConnectorId = 'preconfigured-alert-history-es-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('createAlertHistoryIndexTemplate', () => {

await createAlertHistoryIndexTemplate({ client: clusterClient, logger });
expect(clusterClient.indices.putIndexTemplate).toHaveBeenCalledWith({
name: `alert-history-template`,
name: `kibana-alert-history-template`,
body: getAlertHistoryIndexTemplate(),
create: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('action params validation', () => {
expect(
actionTypeModel.validateParams({
documents: [{ test: 1234 }],
indexOverride: 'alert-history-anything',
indexOverride: 'kibana-alert-history-anything',
})
).toEqual({
errors: {
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('action params validation', () => {
expect(
actionTypeModel.validateParams({
documents: [{}],
indexOverride: 'alert-history-',
indexOverride: 'kibana-alert-history-',
})
).toEqual({
errors: {
Expand All @@ -146,7 +146,7 @@ describe('action params validation', () => {
).toEqual({
errors: {
documents: ['Document is required and should be a valid JSON object.'],
indexOverride: ['Alert history index must begin with "alert-history-".'],
indexOverride: ['Alert history index must begin with "kibana-alert-history-".'],
},
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const actionConnector = {
const preconfiguredActionConnector = {
actionTypeId: '.index',
config: {
index: 'alert-history-default',
index: 'kibana-alert-history-default',
},
id: AlertHistoryEsIndexConnectorId,
isPreconfigured: true,
Expand Down Expand Up @@ -102,7 +102,7 @@ describe('IndexParamsFields renders', () => {
test('all params fields are rendered correctly for preconfigured alert history connector when params are defined', async () => {
const actionParams = {
documents: undefined,
indexOverride: 'alert-history-not-the-default',
indexOverride: 'kibana-alert-history-not-the-default',
};
const wrapper = mountWithIntl(
<ParamsFields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const IndexParamsFields = ({
<>
<FormattedMessage
id="xpack.triggersActionsUI.components.builtinActionTypes.indexAction.preconfiguredIndexHelpText"
defaultMessage="Documents are indexed into the {alertHistoryIndex} index. "
defaultMessage={`Documents are indexed into the "{alertHistoryIndex}" index. `}
values={{ alertHistoryIndex: `${ALERT_HISTORY_PREFIX}${alertHistoryIndexSuffix}` }}
/>
<EuiLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FtrProviderContext } from '../../../../common/ftr_provider_context';
import { getTestAlertData, ObjectRemover } from '../../../../common/lib';
import { AlertHistoryDefaultIndexName } from '../../../../../../plugins/actions/common';

const ALERT_HISTORY_OVERRIDE_INDEX = 'alert-history-not-the-default';
const ALERT_HISTORY_OVERRIDE_INDEX = 'kibana-alert-history-not-the-default';

// eslint-disable-next-line import/no-default-export
export default function preconfiguredAlertHistoryConnectorTests({
Expand Down

0 comments on commit 095b495

Please sign in to comment.