-
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
[Watcher] New Platform (NP) Migration #50908
Merged
Merged
Changes from 30 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2a401e3
First iteration of watch public -> new platform
jloleysens 58b7d0c
Merge remote-tracking branch 'upstream/master' into np-migration/watc…
jloleysens b0afa91
- Switched to using np ready request
jloleysens 4b26855
First attempt at server shim
jloleysens 5e8b01b
Rename file and re-enable react hooks linting
jloleysens ac97bb7
Fix some public types and react hooks lint rules
jloleysens fb37ccf
Fix types
jloleysens 12085c1
More ES lint react hooks fixes
jloleysens c8a3c13
Migrated server lib -> ts. Part way done with migrating routes to NP …
jloleysens ee2b87d
Big subset of routes to TS and NP router - almost there
jloleysens e26e7bb
Delete legacy error wrappers and moved last set of routes to TS and N…
jloleysens c40a6f0
Remove @ts-ignore's and update route registration to use shim with ht…
jloleysens 25c1f6b
Added routes validations, fixes for hooks and fixes for types
jloleysens e0eefdc
Fix more types and finish testing API routes
jloleysens 04709a4
Merge branch 'master' into np-migration/watcher
elasticmachine 8067bd0
Fix usage of feature catalogue and fix time buckets types
jloleysens 1d4771b
Fix error message shape [skip ci]
jloleysens 21df366
Merge branch 'master' into np-migration/watcher
elasticmachine 1fa7917
Split legacy from new platform dependencies server-side
jloleysens e0232df
Refactor: Seperate client legacy and NP dependencies
jloleysens 4ab3cf9
Add file: added types file
jloleysens 55bb85e
Merge branch 'master' into np-migration/watcher
elasticmachine 37ca71c
Fix UISettings client type import
jloleysens 4cb17dc
Update license pre-routing factory spec
jloleysens 5a628b8
Merge branch 'master' into np-migration/watcher
elasticmachine 991cee2
Merge branch 'master' into np-migration/watcher
elasticmachine 0ed3d4b
Update variable names, use of I18nContext (use NP) and docs
jloleysens f65a526
Use NP elasticsearchclient
jloleysens 3d0e61b
Simplify is_es_error_factory
jloleysens cbf30e1
Fix types
jloleysens c47884c
Improve code legibility and remove second use of `useAppContext`
jloleysens 61078aa
Use @kbn/config-schema (not validate: false) on routes!
jloleysens 293265b
Fix watch create JSON spec
jloleysens c3ed455
Create threshold test working
jloleysens fd8b0ec
Unskip watch_edit.test.ts
jloleysens c6aef83
Unskip watch_list.test.ts
jloleysens 6e90b77
Done re-enabling component integration tests
jloleysens 471c801
TimeBuckets typo + remove unnecessary // @ts-ignore
jloleysens 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 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,22 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
declare module 'ui/time_buckets' { | ||
export const TimeBuckets: any; | ||
} |
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
51 changes: 51 additions & 0 deletions
51
x-pack/legacy/plugins/watcher/__jest__/client_integration/helpers/app_context.mock.tsx
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,51 @@ | ||
/* | ||
* 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 from 'react'; | ||
import { ComponentType } from 'enzyme'; | ||
|
||
import { AppContextProvider } from '../../../public/np_ready/application/app_context'; | ||
|
||
export const withAppContext = (Component: ComponentType<any>) => (props: any) => { | ||
return ( | ||
<AppContextProvider | ||
value={ | ||
{ | ||
docLinks: { | ||
DOC_LINK_VERSION: 'test', | ||
ELASTIC_WEBSITE_URL: 'test', | ||
links: {} as any, | ||
}, | ||
chrome: { | ||
setBreadcrumbs: () => {}, | ||
} as any, | ||
legacy: { | ||
TimeBuckets: class MockTimeBuckets { | ||
setBounds(_domain: any) { | ||
return {}; | ||
} | ||
getInterval() { | ||
return { | ||
expression: {}, | ||
}; | ||
} | ||
}, | ||
MANAGEMENT_BREADCRUMB: { text: 'test' }, | ||
savedObjects: { | ||
create: jest.fn(), | ||
} as any, | ||
}, | ||
uiSettings: { | ||
get: () => {}, | ||
isDefault: () => true, | ||
} as any, | ||
} as any | ||
} | ||
> | ||
<Component {...props} /> | ||
</AppContextProvider> | ||
); | ||
}; |
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
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
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
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
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
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,9 @@ | ||
{ | ||
"id": "watcher", | ||
"version": "kibana", | ||
"requiredPlugins": [ | ||
"home" | ||
], | ||
"server": true, | ||
"ui": true | ||
} |
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.
Can you close #49566 once this PR is merged?