-
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
[Snapshot restore] Add support for feature_states #131310
Merged
sabarasaba
merged 37 commits into
elastic:main
from
sabarasaba:snapshot_restore/system_indices_fix
May 16, 2022
Merged
Changes from 18 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
837cb19
Update copy to not include system indices
sabarasaba 5de8d29
Dont include system indices in ds/indices dropdown
sabarasaba 236f978
Start working on supporting feature states
sabarasaba a3bda45
Store feature states array of options in local state
sabarasaba 8a6473c
Fix up server side integration and show deets in flyout
sabarasaba 181d500
Fix linter issues
sabarasaba cb899ef
commit using @elastic.co
sabarasaba 8e16971
Connect the dots in restore snapshot wizard
sabarasaba 0080dcd
Fix linter issues
sabarasaba 469a53c
Finish up wiring up last features
sabarasaba 5e5ada2
Fix copy
sabarasaba b8a7dd9
CR
sabarasaba 3d4c2ca
Refactor tooltip implementation
sabarasaba 13c83ef
Fix tests
sabarasaba 1595fa7
Fix i18n
sabarasaba 7711a1c
Add tests
sabarasaba d6f0a7d
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine e0b2f84
Add missing tests
sabarasaba e845207
Merge branch 'main' into snapshot_restore/system_indices_fix
kibanamachine ec9d815
Add option for selecting none of the feature states
sabarasaba d750fee
Finish off refactoring label placement and fixing up tests
sabarasaba 79f5736
Add tests
sabarasaba 433b30b
Remove nextTick and refactor tests
sabarasaba dbebbfc
Refactor feature states into its own setting
sabarasaba 5cea032
Fix docs link
sabarasaba 38fe3d1
Copy review
sabarasaba fa8c67b
Fix tests
sabarasaba 3aad8f3
Fix small bug and add more tests
sabarasaba d8f782f
Merge branch 'main' into snapshot_restore/system_indices_fix
kibanamachine 8f16d3b
Fix linter issue
sabarasaba 1c514ee
Address CR
sabarasaba 63c69e6
Change duped locale id
sabarasaba 5b3dc19
Address CR changes
sabarasaba 1413dd6
Copy updates
sabarasaba fef1131
Merge branch 'main' into snapshot_restore/system_indices_fix
kibanamachine eca5016
CR changes
sabarasaba 9124877
Merge branch 'main' into snapshot_restore/system_indices_fix
kibanamachine 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
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
59 changes: 59 additions & 0 deletions
59
x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/policy_list.helpers.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,59 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { act } from 'react-dom/test-utils'; | ||
import { | ||
registerTestBed, | ||
AsyncTestBedConfig, | ||
TestBed, | ||
findTestSubject, | ||
} from '@kbn/test-jest-helpers'; | ||
import { HttpSetup } from '@kbn/core/public'; | ||
import { PolicyList } from '../../../public/application/sections/home/policy_list'; | ||
import { WithAppDependencies } from './setup_environment'; | ||
|
||
const testBedConfig: AsyncTestBedConfig = { | ||
memoryRouter: { | ||
initialEntries: ['/policies'], | ||
componentRoutePath: '/policies/:policyName?', | ||
}, | ||
doMountAsync: true, | ||
}; | ||
|
||
const createActions = (testBed: TestBed) => { | ||
const clickPolicyAt = async (index: number) => { | ||
const { component, table, router } = testBed; | ||
const { rows } = table.getMetaData('policyTable'); | ||
const repositoryLink = findTestSubject(rows[index].reactWrapper, 'policyLink'); | ||
|
||
await act(async () => { | ||
const { href } = repositoryLink.props(); | ||
router.navigateTo(href!); | ||
}); | ||
|
||
component.update(); | ||
}; | ||
|
||
return { | ||
clickPolicyAt, | ||
}; | ||
}; | ||
|
||
export type PoliciesListTestBed = TestBed & { | ||
actions: ReturnType<typeof createActions>; | ||
}; | ||
|
||
export const setupPoliciesListPage = async (httpSetup: HttpSetup) => { | ||
const initTestBed = registerTestBed(WithAppDependencies(PolicyList, httpSetup), testBedConfig); | ||
|
||
const testBed = await initTestBed(); | ||
|
||
return { | ||
...testBed, | ||
actions: createActions(testBed), | ||
}; | ||
}; |
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
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.
Thanks for cleaning this up!