Skip to content

Commit

Permalink
Fix incorrect detection rules sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
xcrzx committed Apr 13, 2022
1 parent f814e0f commit 625c940
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 189 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { KueryNode } from '@kbn/es-query';
import { get, isEmpty } from 'lodash';
import mappings from '../../saved_objects/mappings.json';
import mappings from '../../saved_objects/mappings';

const astFunctionType = ['is', 'range', 'nested'];

Expand Down
5 changes: 2 additions & 3 deletions x-pack/plugins/alerting/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import type {
SavedObject,
SavedObjectsExportTransformContext,
SavedObjectsServiceSetup,
SavedObjectsTypeMappingDefinition,
} from 'kibana/server';
import mappings from './mappings.json';
import { alert } from './mappings';
import { getMigrations } from './migrations';
import { EncryptedSavedObjectsPluginSetup } from '../../../encrypted_saved_objects/server';
import { transformRulesForExport } from './transform_rule_for_export';
Expand Down Expand Up @@ -60,7 +59,7 @@ export function setupSavedObjects(
namespaceType: 'multiple-isolated',
convertToMultiNamespaceTypeVersion: '8.0.0',
migrations: getMigrations(encryptedSavedObjects, isPreconfigured),
mappings: mappings.alert as SavedObjectsTypeMappingDefinition,
mappings: alert,
management: {
displayName: 'rule',
importableAndExportable: true,
Expand Down
185 changes: 0 additions & 185 deletions x-pack/plugins/alerting/server/saved_objects/mappings.json

This file was deleted.

Loading

0 comments on commit 625c940

Please sign in to comment.