-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] New Platform server shim: update filters routes to use new platf…
…orm router (#57597) * [ML] Update filters routes to use new platform router * [ML] Edits to filters route following review * [ML] Edits following review and fix job service api docs Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
6bd09d6
commit 73cb0aa
Showing
10 changed files
with
410 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { ACTION, FILTER_TYPE, APPLIES_TO, OPERATOR } from '../constants/detector_rule'; | ||
|
||
export interface DetectorRuleScope { | ||
[id: string]: { | ||
filter_id: string; | ||
filter_type: FILTER_TYPE; | ||
}; | ||
} | ||
|
||
export interface DetectorRuleCondition { | ||
applies_to: APPLIES_TO; | ||
operator: OPERATOR; | ||
value: number; | ||
} | ||
|
||
export interface DetectorRule { | ||
actions: ACTION[]; | ||
scope?: DetectorRuleScope; | ||
conditions?: DetectorRuleCondition[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export { FilterManager, Filter, FormFilter } from './filter_manager'; |
19 changes: 19 additions & 0 deletions
19
x-pack/legacy/plugins/ml/server/new_platform/filters_schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { schema } from '@kbn/config-schema'; | ||
|
||
export const createFilterSchema = { | ||
filterId: schema.string(), | ||
description: schema.maybe(schema.string()), | ||
items: schema.arrayOf(schema.string()), | ||
}; | ||
|
||
export const updateFilterSchema = { | ||
description: schema.maybe(schema.string()), | ||
addItems: schema.maybe(schema.arrayOf(schema.string())), | ||
removeItems: schema.maybe(schema.arrayOf(schema.string())), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.