Skip to content

feat(greenhouse): new Clusters dashboard#1634

Open
guoda-puidokaite wants to merge 17 commits into
mainfrom
guoda-clusters
Open

feat(greenhouse): new Clusters dashboard#1634
guoda-puidokaite wants to merge 17 commits into
mainfrom
guoda-clusters

Conversation

@guoda-puidokaite
Copy link
Copy Markdown
Contributor

@guoda-puidokaite guoda-puidokaite commented Apr 27, 2026

Summary

Screenshot 2026-05-04 at 22 32 23 Screenshot 2026-05-04 at 22 32 14 Screenshot 2026-05-04 at 22 32 38

Changes Made

  • Added Clusters overview according to ACs that allows navigation to Cluster Detail page and from there, Plugin Instance page

Other agreed on ACs:

  • Added Cluster Type and Region fields and allowed to filter by them
  • No ‘Reconcile’ button needed

Design guidelines:
https://www.figma.com/design/xsRjypqDB8lGT8LsrxIFKs/%F0%9F%AB%9F--Greenhouse-UX-work?node-id=984-5344&p=f&t=R89RR3K513x3o3rM-0

Related Issues

Testing Instructions

  1. pnpm i
  2. pnpm TASK

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

@guoda-puidokaite guoda-puidokaite self-assigned this Apr 27, 2026
@guoda-puidokaite guoda-puidokaite added greenhouse Greenhouse core related task app Any app that is not specific label that lives under apps/ greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Apr 27, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 27, 2026

🦋 Changeset detected

Latest commit: b59e55f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudoperators/juno-app-greenhouse Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@guoda-puidokaite guoda-puidokaite changed the title DRAFT clusters dashboard feat(greenhouse): new Clusters dashboard Apr 27, 2026
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/index.tsx Fixed
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/index.tsx Fixed
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/index.test.tsx Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Greenhouse “Clusters” dashboard flow under /admin/clusters, including an overview grid with filtering and a new cluster detail page that links into plugin-instance details.

Changes:

  • Replaced the legacy /admin/clusters route with nested routes for clusters list and cluster detail (/admin/clusters/$clusterName).
  • Added new UI components for clusters overview (filters + grid) and cluster detail (overview/YAML + plugin instances).
  • Added new API helpers and types for fetching clusters and plugins-by-cluster, plus shared utility updates.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 28 comments.

Show a summary per file
File Description
apps/greenhouse/src/routeTree.gen.ts Updates generated route tree to reflect new nested clusters routes.
apps/greenhouse/src/routes/admin/clusters/route.tsx Adds parent “Clusters” route with breadcrumb + Outlet.
apps/greenhouse/src/routes/admin/clusters/index.tsx Adds clusters index route with search validation and default filter redirect.
apps/greenhouse/src/routes/admin/clusters/$clusterName/route.tsx Adds cluster-name route with crumb label based on param.
apps/greenhouse/src/routes/admin/clusters/$clusterName/index.tsx Adds cluster detail index route to render ClusterDetail.
apps/greenhouse/src/routes/admin/clusters.tsx Removes legacy clusters route implementation.
apps/greenhouse/src/components/admin/utils.ts Expands readiness helpers to clusters and adds formatAge.
apps/greenhouse/src/components/admin/types/schema.d.ts Updates Cluster schema typing (note: file is auto-generated).
apps/greenhouse/src/components/admin/types/k8sTypes.ts Adds Cluster type alias alongside existing types.
apps/greenhouse/src/components/admin/Layout/Breadcrumb.test.tsx Updates breadcrumb test for nested routes (currently mismatched path).
apps/greenhouse/src/components/admin/constants.ts Adds cluster-related label keys and filter IDs.
apps/greenhouse/src/components/admin/Clusters/index.tsx Implements clusters overview page (counts, refresh, filters, grid).
apps/greenhouse/src/components/admin/Clusters/ClustersGrid/index.tsx Adds clusters overview data grid header + suspense/error handling.
apps/greenhouse/src/components/admin/Clusters/ClustersGrid/index.test.tsx Adds tests for clusters grid rendering and error state.
apps/greenhouse/src/components/admin/Clusters/ClustersGrid/DataRows/index.tsx Adds suspense data rows fetching clusters and navigating to detail.
apps/greenhouse/src/components/admin/Clusters/ClustersFilters.tsx Adds filter UI (select + chips + search) for clusters.
apps/greenhouse/src/components/admin/ClusterDetail/Overview/PluginInstances.tsx Adds cluster-scoped plugin instances table with navigation to plugin instance detail.
apps/greenhouse/src/components/admin/ClusterDetail/Overview/PluginInstances.test.tsx Adds tests for plugin instances view (currently mismatched route/expectations).
apps/greenhouse/src/components/admin/ClusterDetail/Overview/index.tsx Adds cluster detail “Overview” composition (conditions/details/plugins).
apps/greenhouse/src/components/admin/ClusterDetail/Overview/Details.tsx Adds cluster detail “Details” panel, including age + node status.
apps/greenhouse/src/components/admin/ClusterDetail/Overview/Details.test.tsx Adds tests for Details (currently mismatched props/types/expectations).
apps/greenhouse/src/components/admin/ClusterDetail/Overview/Conditions.tsx Adds cluster readiness conditions section.
apps/greenhouse/src/components/admin/ClusterDetail/Overview/Conditions.test.tsx Adds tests for Conditions (currently mismatched props/types).
apps/greenhouse/src/components/admin/ClusterDetail/index.tsx Adds cluster detail page with tabs and data fetching.
apps/greenhouse/src/components/admin/ClusterDetail/index.test.tsx Adds tests for cluster detail page (currently imports/route mismatches).
apps/greenhouse/src/components/admin/api/plugins/fetchPluginsByCluster.ts Adds API helper to fetch plugins filtered by cluster label.
apps/greenhouse/src/components/admin/api/clusters/fetchClustersFilters.ts Adds API helper to derive filter values from clusters list.
apps/greenhouse/src/components/admin/api/clusters/fetchClusters.ts Adds API helper to fetch clusters and apply client-side filtering/sorting.
apps/greenhouse/src/components/admin/api/clusters/fetchCluster.ts Adds API helper to fetch a single cluster by name.
apps/greenhouse/src/components/admin/mocks/pluginPresets.ts Refactors mocks to provide cluster mock data (file name now misleading).

Comment thread apps/greenhouse/src/components/admin/Layout/Breadcrumb.test.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/Overview/Details.test.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/Overview/Details.test.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/Overview/Conditions.test.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/Overview/Details.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/Clusters/ClustersGrid/index.test.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/index.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/ClusterDetail/Overview/index.tsx Outdated
Comment thread apps/greenhouse/src/components/admin/__mocks__/pluginPresets.ts Outdated
@guoda-puidokaite guoda-puidokaite marked this pull request as ready for review May 5, 2026 07:41
@guoda-puidokaite guoda-puidokaite requested a review from a team as a code owner May 5, 2026 07:41
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@ArtieReus ArtieReus removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 13, 2026
filterSettings?: FilterSettings
}): Promise<Cluster[]> => {
const response = await apiClient.get(`/apis/greenhouse.sap/v1alpha1/namespaces/${namespace}/clusters`)
return Array.isArray(response?.items) ? applySorting(applyFilterSettings(response.items, filterSettings)) : []
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you are mutating here the original array. Since response.items comes straight from the API result and may also be cached/reused by React Query, mutating it in place can create subtle bugs or stale-cache surprises.

Copy link
Copy Markdown
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! very cool!! I like it 💪
Just left comments with minor fixes to be done before merging. Thx!!!

}}
/>
</InputGroup>
<Button
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the new pattern of adding an xs button directly after the filter pills for the "Clear all filters" functionality. Also this button should only be visible if there are filters to be cleared.

<DataGridCell nowrap>
<PopupMenu onClick={(e) => e.stopPropagation()}>
<PopupMenuOptions>
<PopupMenuItem label="View Details" onClick={canNavigateToDetails ? navigateToDetails : undefined} />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of the onClick handler on the Row this is fine but the problem here is that the "View Details" action is still visible even if no details exist. It just doesn't do anything on click in this case.

Instead the whole PopupMenu shouldn't be rendered if there are no actions that can be taken.

{/* Support Group */}
<DataGridCell>{preset.metadata?.labels?.[SUPPORT_GROUP_LABEL] || NO_VALUE_DEFAULT}</DataGridCell>
{/* Actions */}
<DataGridCell nowrap>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ensure that the PopupMenu kebap icon is aligned all the way to the right of the row (easiest way to do this is to set the cell as a minWidthColumn in the DataGrid).

const navigateToDetails = () => {
if (!pluginPresetName) return
navigate({
to: "/admin/plugin-presets/$pluginPresetName/plugin-instances/$pluginInstance",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This links from the cluster detail view to the plugin instance detail view. However from there you can't navigate back to the cluster detail view. The cluster the plugin instance is running on is shown in the metadata section but it's not clickable. Please make it clickable :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already agreed with design, it's on the list to make all linkable details clickable (planned). I'll attach an issue number asap.

</DataGridCell>
<DataGridCell>{plugin.metadata?.name || NO_VALUE_DEFAULT}</DataGridCell>
<DataGridCell>{pluginPresetName || NO_VALUE_DEFAULT}</DataGridCell>
<DataGridCell>{ready ? "Ready" : "Not Ready"}</DataGridCell>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this directly after the cell containing the status icon. Icon and text belong next to each other

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now it's consistent. But already agreed with design, it's on the list (planned). I'll attach an issue number asap.

<DataGridHeadCell>Version</DataGridHeadCell>
<DataGridHeadCell>Cluster Type</DataGridHeadCell>
<DataGridHeadCell>Region</DataGridHeadCell>
<DataGridHeadCell>Connectivity</DataGridHeadCell>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if already on the list view we could see how many total/running/failing plugin instances the respective cluster has. Looking at the fetch functions you have defined I assume this would cause an n+1 problem. But maybe we can check with the backend colleagues if they'll consider adding this info in the status of the cluster resource.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In discussion. I've added it to the list of improvements, will link ticket asap. Since it wasn't in original ACs, I don't want to wait longer and push this chunky PR. Does that work?

<DataGridHeadCell className="align-center">
<Icon icon="monitorHeart" />
</DataGridHeadCell>
<DataGridHeadCell>Name</DataGridHeadCell>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, column order should be status -> name -> region -> cluster type -> support group -> (plugin counts if possible, see below), connectivity -> message -> action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And version?

@ArtieReus ArtieReus added the greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` label May 19, 2026
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 19, 2026
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

🚀 View preview at
https://cloudoperators.github.io/juno/pr-preview/pr-1634/

Built to branch gh-pages at 2026-05-22 09:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels May 22, 2026
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels May 22, 2026
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels May 22, 2026
@guoda-puidokaite
Copy link
Copy Markdown
Contributor Author

guoda-puidokaite commented May 26, 2026

First 2 rows from Plugin Instances can be clicked. The Details Button also doesn't work.

Screen.Recording.2026-05-18.at.14.31.58.mov

As designed - Since no plugin preset is returned, the path would be undefined -> plugin instance name.

I don't want to spam the PR with these comments that can't be replied to inline so I'll mention them here:

Note @ArtieReus:

  • I'll go over all comments in previous two PRs to make sure nothing is missed from your comments in the next ticket.
  • I want to merge this PR, it's already chunky. The focus here has been to make changes to the new dashboard only, sticking to ACs.
  • I've found many functional and design issues, we've gone through a through review with design. Therefore, if something is an existing problem across different pages (even if small), this will be fixed in a different PR where it can be thoroughly fixed across pages and tested.

Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 26, 2026
Comment thread apps/greenhouse/src/components/admin/Clusters/ClustersFilters.tsx Fixed
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label May 26, 2026
Signed-off-by: I531348 <guoda.puidokaite@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Any app that is not specific label that lives under apps/ greenhouse Greenhouse core related task greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](greenhouse): Cluster Detail View [Task](greenhouse): Cluster List View [EPIC](greenhouse): Admin Area - Clusters list and details

5 participants