-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Adding space aware jobs #77916
[ML] Adding space aware jobs #77916
Changes from 86 commits
ba7bdae
4a8d36a
7793ced
3397246
837ad42
15a04e8
f430b02
5ba9d98
f049540
cd76629
815219c
837fac0
6b2ff4c
2e4674b
0490d31
a6fcb33
4a33827
b956b83
9881370
72661e8
5495f6b
3970c29
4434c33
18927bd
2c0acc9
807768c
d1fdfe7
b37f4e5
6baa5d3
4a1b06e
c6a55bc
1f4e891
d926b32
697b923
4324e00
c85c71c
eca33a4
f94b6cb
480bea1
52c6ec3
d2b3097
43eac01
de29690
1b87324
3356cef
05f894e
393a4ee
cb66804
d789ad2
535f570
a3144fb
fda0e72
435f111
51a0d6e
499fad3
14530bc
eced3bf
6b6dc95
348139f
5312023
baa4a7b
113e0df
90105ca
6d43384
cd9ab5e
30cac1a
e0069e3
39999ee
0ca4eb7
ee315f1
bd509c2
68d10ba
2532101
e4e87b2
e99cc1f
6b45fff
6c5756f
43648c8
4a79bb6
481abc4
8eedebb
6d85ab0
3a9782d
4cd0d41
9b7d26c
7071d62
39651e5
2767f7d
4cf9649
8fd05f3
9ed7d48
38fdb05
e0d6b38
763637d
807cd28
04e120c
481c33d
cd07a6d
3ba5c0e
9cfafac
660af5c
13ccded
35a981a
563526a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ export function getPluginPrivileges() { | |
const adminMlCapabilitiesKeys = Object.keys(adminMlCapabilities); | ||
const allMlCapabilitiesKeys = [...adminMlCapabilitiesKeys, ...userMlCapabilitiesKeys]; | ||
// TODO: include ML in base privileges for the `8.0` release: https://github.com/elastic/kibana/issues/71422 | ||
const savedObjects = ['index-pattern', 'dashboard', 'search', 'visualization']; | ||
const savedObjects = ['index-pattern', 'dashboard', 'search', 'visualization', 'ml-job']; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @legrego should read/all access to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think they'd just need |
||
const privilege = { | ||
app: [PLUGIN_ID, 'kibana'], | ||
excludeFromBasePrivileges: true, | ||
|
@@ -116,7 +116,7 @@ export function getPluginPrivileges() { | |
catalogue: [], | ||
savedObject: { | ||
all: [], | ||
read: [], | ||
read: ['ml-job'], | ||
}, | ||
api: apmUserMlCapabilitiesKeys.map((k) => `ml:${k}`), | ||
ui: apmUserMlCapabilitiesKeys, | ||
|
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 type JobType = 'anomaly-detector' | 'data-frame-analytics'; |
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 { JobSpacesList } from './job_spaces_list'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* 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 React, { FC } from 'react'; | ||
|
||
import { EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; | ||
|
||
interface Props { | ||
spaces: string[]; | ||
} | ||
|
||
export const JobSpacesList: FC<Props> = ({ spaces }) => ( | ||
<EuiFlexGroup wrap responsive={false} gutterSize="xs"> | ||
{spaces.map((space) => ( | ||
<EuiFlexItem grow={false} key={space}> | ||
<EuiBadge color={'hollow'}>{space}</EuiBadge> | ||
</EuiFlexItem> | ||
))} | ||
</EuiFlexGroup> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the filter by
mlJobIds
is now redundant?kibana/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.ts
Line 64 in 3a9782d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no this will still be needed in the query.
We need an explicit list of job ids passed to the function so we can check they are available in the current space.
We could attempt to retrieve them from the query, but each query object could be different and the job filtering done in a different way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an important aspect. Can we document that somewhere?