Skip to content

Add datacenterlist and clusterlistitem views#269

Merged
havardelnan merged 5 commits intomainfrom
hanna-tester
Apr 17, 2026
Merged

Add datacenterlist and clusterlistitem views#269
havardelnan merged 5 commits intomainfrom
hanna-tester

Conversation

@hanlun0804
Copy link
Copy Markdown
Contributor

This PR aims to implement views for datacenters and a single cluster item, following the pattern of the other views. A single cluster can now be fetched by adding a filter to the api call, with the clusterUid.

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

This PR adds new view generators to expose datacenter listings and a “single cluster item” view via the existing /v2/views/{viewid} list-view mechanism, with cluster selection driven by a filter parameter.

Changes:

  • Added datacenterlist view generator producing a list of datacenter rows.
  • Added clusterlistitem view generator intended to return a single cluster row when filtered by clusterUid.
  • Minor swagger annotation formatting adjustment in the list view handler.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 8 comments.

File Description
pkg/services/viewservice/datacenterlist.go Introduces a new list-view generator for datacenters backed by ResourceDatacenterGVK.
pkg/services/viewservice/clusterlistitem.go Introduces a new list-view generator intended to return one cluster based on a clusterUid filter.
internal/controllers/v2/viewcontroller/listviewhandler.go Aligns swagger annotation formatting for the limit query parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/services/viewservice/clusterlistitem.go Outdated
Comment thread pkg/services/viewservice/clusterlistitem.go
Comment thread pkg/services/viewservice/clusterlistitem.go
Comment thread pkg/services/viewservice/clusterlistitem.go Outdated
Comment thread pkg/services/viewservice/clusterlistitem.go Outdated
Comment thread pkg/services/viewservice/clusterlistitem.go
Comment thread pkg/services/viewservice/clusterlistitem.go Outdated
Comment thread pkg/services/viewservice/clusterlistitem.go Outdated
@havardelnan havardelnan merged commit 14c10d8 into main Apr 17, 2026
2 checks passed
@havardelnan havardelnan deleted the hanna-tester branch April 17, 2026 12:24
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.

3 participants