Skip to content
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

TypeScript conversion of Index Lifecycle Management plugin #74271

Closed
14 tasks done
yuliacech opened this issue Aug 4, 2020 · 2 comments
Closed
14 tasks done

TypeScript conversion of Index Lifecycle Management plugin #74271

yuliacech opened this issue Aug 4, 2020 · 2 comments
Assignees
Labels
chore Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@yuliacech
Copy link
Contributor

yuliacech commented Aug 4, 2020

Summary

This issue is to plan and discuss work converting JavaScript files in ILM plugin codebase to TypeScript.

Plugin components

ILM plugin consists of 3 major components: EditPolicy page, PolicyTable and IndexManagementExtension.

EditPolicy

This component allows creating/editing of an ILM policy and consists of 4 phases (hot, warm, cold, delete). The conversion to TS can be combined with switching from Redux-store to useRequest hooks and (de)serialization services. Following steps are needed to complete the conversion/refactoring:

  • Create types for policies and other objects returned from ES API
  • Convert store actions to fetch policy/policies and to save a policy to useRequest hook
  • Convert store selectors to validate inputs while editing a policy to a service
  • Convert store reducers to transform to and from ES API to a (de)serialization service
  • Convert phases components to receive props with phase data, validation errors and a callback to update phase data
  • Convert EditPolicy from a Redux connected component to useRequest hook

PR: #75148

PolicyTable

This component uses Redux store to fetch a list of policies and pagination/filtering/sorting of the table. Steps:

  • Convert store actions to fetch policies to useRequest hook
  • Convert store reducers for table pagination etc to a service
  • Convert DeletePolicy and AddPolicyToTemplate modals to TS (without UX changes/refactorings)
  • Convert PolicyTable from a Redux connected component to useRequest hook

PR: #76006

IndexManagementExtension

This part consists of several functions that add functionality to IndexManagement. Steps:

  • Convert AddLifecyclePolicy and IndexLifecycleSummary modals to TS
  • Convert IndexManagementExtension

PR: #76517

Clean up

  • Convert any remaining js files, such as jest tests, services and helpers
  • Add correct typings any remaining any types

PR: #76308

@yuliacech yuliacech self-assigned this Aug 4, 2020
@cjcenizal cjcenizal added chore Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Aug 4, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@yuliacech
Copy link
Contributor Author

Closing this issue since its last PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

3 participants