-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ML] Moving to kibana capabilities #64057
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
Merged
jgowdyelastic
merged 14 commits into
elastic:master
from
jgowdyelastic:moving-to-kibana-capabilities
Apr 24, 2020
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
587d7eb
[ML] Moving to kibana capabilities
jgowdyelastic 8fa6014
fixing types
jgowdyelastic 71e0e44
renaming privilges
jgowdyelastic 05e1fbe
renaming privileges to capabilities
jgowdyelastic 0fd0bd7
renaming resolvers
jgowdyelastic 293385c
correcting admin capabilities
jgowdyelastic ec9e9b8
fixing includes
jgowdyelastic d41b155
removing any types
jgowdyelastic a14f7fd
renaming type
jgowdyelastic bd9cc69
readding spaces
jgowdyelastic b1887a4
adding capabilities switcher
jgowdyelastic 02c18c8
updating comment
jgowdyelastic fcd830d
removing unnecessary failing tests
jgowdyelastic 0eaa2a1
adding error to log
jgowdyelastic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,66 @@ | ||
| /* | ||
| * 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 { KibanaRequest } from 'kibana/server'; | ||
|
|
||
| export const userMlCapabilities = { | ||
| // Anomaly Detection | ||
| canGetJobs: false, | ||
| canGetDatafeeds: false, | ||
| // Calendars | ||
| canGetCalendars: false, | ||
| // File Data Visualizer | ||
| canFindFileStructure: false, | ||
| // Filters | ||
| canGetFilters: false, | ||
| // Data Frame Analytics | ||
| canGetDataFrameAnalytics: false, | ||
| }; | ||
|
|
||
| export const adminMlCapabilities = { | ||
| // Anomaly Detection | ||
| canCreateJob: false, | ||
| canDeleteJob: false, | ||
| canOpenJob: false, | ||
| canCloseJob: false, | ||
| canForecastJob: false, | ||
| canStartStopDatafeed: false, | ||
| canUpdateJob: false, | ||
| canUpdateDatafeed: false, | ||
| canPreviewDatafeed: false, | ||
| // Calendars | ||
| canCreateCalendar: false, | ||
| canDeleteCalendar: false, | ||
| // Filters | ||
| canCreateFilter: false, | ||
| canDeleteFilter: false, | ||
| // Data Frame Analytics | ||
| canDeleteDataFrameAnalytics: false, | ||
| canCreateDataFrameAnalytics: false, | ||
| canStartStopDataFrameAnalytics: false, | ||
| }; | ||
|
|
||
| export type UserMlCapabilities = typeof userMlCapabilities; | ||
| export type AdminMlCapabilities = typeof adminMlCapabilities; | ||
| export type MlCapabilities = UserMlCapabilities & AdminMlCapabilities; | ||
|
|
||
| export const basicLicenseMlCapabilities = ['canFindFileStructure'] as Array<keyof MlCapabilities>; | ||
|
|
||
| export function getDefaultCapabilities(): MlCapabilities { | ||
| return { | ||
| ...userMlCapabilities, | ||
| ...adminMlCapabilities, | ||
| }; | ||
| } | ||
|
|
||
| export interface MlCapabilitiesResponse { | ||
| capabilities: MlCapabilities; | ||
| upgradeInProgress: boolean; | ||
| isPlatinumOrTrialLicense: boolean; | ||
| mlFeatureEnabledInSpace: boolean; | ||
| } | ||
|
|
||
| export type ResolveMlCapabilities = (request: KibanaRequest) => Promise<MlCapabilities | null>; | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If I log in as a user with the
machine_learning_userrole. the clone item is showing for data frame analytics jobs: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.
This is a bug in master. I think it is outside the scope of this PR to fix here.
I've raised #64235 to cover it.