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

refactor(kubernetes): convert server group details component to react #10163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cristhian-castaneda
Copy link
Member

This PR is part of the ongoing migration from Angular to React, focusing on the Kubernetes Server Group Details component.

  • Add Kubernetes React Shims

    • Introduced KubernetesReactInjector for bridging Angular services/components with React
  • Refactored Kubernetes Server Group Details

    • Removed the AngularJS controller (details.controller.ts) and template (details.html), replacing them with a React-driven approach (KubernetesServerGroupActions.tsx, serverGroupDetailsGetter, and multiple section-based components)
    • Broke down the server group detail UI into React sections (e.g., ServerGroupManifestStatusSection, ServerGroupEventsSection, ServerGroupHealthSection) following the pattern defined in ServerGroupDetails.tsx
      {sections.map((Section, index) => (
      <Section key={index} app={app} serverGroup={serverGroup} />
      ))}
  • Remove unused AngularJS Resize component

    • Deleted AngularJS-based resizing controller (resize.controller.ts and template).

      Resize functionality is already handle by manifest scale

  • Kubernetes Manifest

    • Introduced a typed IKubernetesServerGroupView to unify server group data with an attached Kubernetes IManifest.
    • Implemented a new React-based ManifestStatus component, replacing the AngularJS version.
  • De-angularize services

    • Renamed angular-based files (e.g., serverGroupCommandBuilder.service.ts to serverGroupCommandBuilder.ts) and removed direct Angular references.

Server Group Details Views

statefulset

image

deployment -> replicaset

image

replicaset

image

daemonset

image

actions in action
Screen.Recording.2025-01-22.at.5.30.00.p.m.mov

@jasonmcintosh
Copy link
Member

I'm not sure how well these are tested. My inclination given the state of the UI is... post 1.37 we merge this as at a MINIMAL glance based upon my VERY poor UI skills this looks ok. And then we'd do manual testing of these in some environments & fix any encountered bugs.

@cristhian-castaneda
Copy link
Member Author

I'm not sure how well these are tested. My inclination given the state of the UI is... post 1.37 we merge this as at a MINIMAL glance based upon my VERY poor UI skills this looks ok. And then we'd do manual testing of these in some environments & fix any encountered bugs.

Hey @jasonmcintosh, thanks for reviewing this. That sounds like a plan. On the testing side, I'm also working on introducing Jest and React Testing Library to modernize our React testing, and I have a few PRs queued that should help increase our test coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants