[ILM] TS conversion of Index Management plugin extension#76308
[ILM] TS conversion of Index Management plugin extension#76308yuliacech wants to merge 26 commits intoelastic:masterfrom
Conversation
* eui to v28.0.0 * eui to 28.2.0 * euiselectableoptions type update * targeted nohoist * src snapshot updates * x-pack snapshot updates * strong -> mark * upgrade @elastic/charts to v21.0.1 * strong -> mark * fix charts version merge * maps -> add_field_tooltip_popover type update * snapshot update * Fix gridline visibility Co-authored-by: Justin Kambic <justin.kambic@elastic.co> Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
…#76278) * fix URI decoding and editing of a policy which backs up all indices * fix type issue * fix general use of encoding and update decode algo * fix serialisation of snapshots and added a test * Fix test description name * Update attempt_to_uri_decode.ts * catch errors from decoding in the already throwing code Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Reconcile request helpers with eslint rules for React hooks. - Add clearer cleanup logic for unmounted components. - Align logic and comments in np_ready_request.ts and original request.ts. * Reorganize modules and convert tests to TS. - Split request.ts into send_request.ts and use_request.ts. - Convert test files into TS. - Relax SendRequestResponse type definition to type error as any instead of expecting an Error, since we weren't actually fulfilling this expectation. * Convert everything to hooks and add test coverage for request behavior. * Fix Watcher memoization bugs.
alisonelizabeth
left a comment
There was a problem hiding this comment.
Great work @yuliacech! I tested locally and did not find any regressions.
I left a few code comments. Also, regarding the use of any for indices - could you utilize this interface in index_management: https://github.com/elastic/kibana/blob/master/x-pack/plugins/index_management/server/types.ts#L29?
| selectedPolicyName: string; | ||
| selectedAlias: string; | ||
| policies: PolicyFromES[]; | ||
| policyError?: string; |
There was a problem hiding this comment.
nit: might be more clear as policyErrorMessage. I know this was pre-existing, so feel free to ignore 😄
| </EuiDescriptionListDescription>, | ||
| ]; | ||
| const cell = ( | ||
| <Fragment> |
There was a problem hiding this comment.
nit: you can also use <></> for fragments
| }; | ||
|
|
||
| export const removeLifecyclePolicyActionExtension = ({ indices, reloadIndices }) => { | ||
| export const removeLifecyclePolicyActionExtension = ({ indices, reloadIndices }: any) => { |
There was a problem hiding this comment.
At the very least, I think this could be improved to:
| export const removeLifecyclePolicyActionExtension = ({ indices, reloadIndices }: any) => { | |
| export const removeLifecyclePolicyActionExtension = ({ indices, reloadIndices }: {indices: any; reloadIndices: () => void}) => { |
| import { RemoveLifecyclePolicyConfirmModal } from './components/remove_lifecycle_confirm_modal'; | ||
|
|
||
| // eslint-disable-next-line @kbn/eslint/no-restricted-paths | ||
| import { ExtensionsSetup } from '../../../index_management/public/services'; |
There was a problem hiding this comment.
I think if you export ExtensionsSetup from x-pack/plugins/index_management/public/index.ts you can remove the eslint-disable.
| this.setState({ showPhaseExecutionPopover: false }); | ||
| }; | ||
| renderStackPopoverButton(ilm) { | ||
| renderStackPopoverButton(ilm: any) { |
There was a problem hiding this comment.
can we avoid using any here?
| if (!ilm.phase_execution) { | ||
| return null; | ||
| } | ||
| renderPhaseExecutionPopoverButton(ilm: any) { |
There was a problem hiding this comment.
can we avoid using any here?
* [Maps] fix duplicate ID's * tslint cleanup * use layer id instead of layer name for popover id * tslint fixes Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…ert with invalid document. (elastic#75929)
…edHosts' to 'xpack.actions.allowedHosts' (elastic#76325)
* Add telemetry around workpad variable usage * Fix typecheck Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…option. (elastic#76061) * Exposed separate from ProxySettings rejectUnauthorized configuration option. * Fixed type checks * fixed tests
* delete src/legacy/ui/public folder
* remove jest.mock('ui/XXX'); from tests
* adapt stubbedLogstashIndexPatternService
* remove delete keys from translation files
* fix types import with Capabilities
* remove legacy test utils
* remove dead file referencing ui/newPlatform
* move saved-object-finder styles to timelion plugin
* chore: group tests doing the same This will reduce the time it takes to execute the tests * chore: rephrase step * chore: extract common code to a function Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…75537) * add intergration test for install prebuilt timelines * add integration tests * add functional test for export timeline * clean up * asserts the content of the exported timeline * update selector * update selector * reuses the timeline id from the expected exported file Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
|
@elasticmachine merge upstream |
* cleanup xpack_main legacy plugin, remove capabilities mixin * fix test env * delete injectXpackSignature and related tests
…ndex_management # Conflicts: # x-pack/plugins/snapshot_restore/public/application/lib/index.ts
|
@elasticmachine merge upstream |
💔 Build Failed
Failed CI StepsBuild metricsHistory
To update your PR or re-run it, just comment with: |
Summary
This PR converts Index Management plugin extension to TypeScript as an ongoing effort of converting the ILM plugin #74271. No UI/UX changes were made in this PR. To test for any regression, navigate to Index Management plugin and check following features in the Indices tab:
Todo
After this PR and policies table conversion PR #76006 are both merged, a follow-up PR will convert all the remaining js files, such as jest tests, services and helpers, also any remaining
anytypes will be cleaned up to complete #74271