Skip to content

Conversation

charliepark
Copy link
Contributor

@charliepark charliepark commented Jun 16, 2025

This PR adds policy data (already present on the sleds overview page) to the individual sled view page.

Before:
image

After:
Screenshot 2025-06-16 at 10 50 41 AM

This does lose the Location | Coming soon line, but I suspect that was added as a means of balancing the rows.
It also adjusts the order of cells in a way that makes more sense on a larger window (like having the two "Usable _____" cells in the bottom of the right-hand column), but as most of our layouts are optimized for desktops over mobile, this seemed like it made more sense.

Closes #2837

Copy link

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Jul 2, 2025 9:48pm

@david-crespo
Copy link
Collaborator

david-crespo commented Jun 22, 2025

We have this second layer of header in the list view to explain what "kind" means and to group kind and provision policy like they are in the response. (Though to be honest it's still not particularly intuitive.) We can't quite do that here, but calling kind "policy kind" might help. On the other hand it might look weird to have "policy kind" and "provision policy". Maybe @benjaminleonard will have an idea.

image

export type SledPolicy =
/** The operator has indicated that the sled is in-service. */
| {
kind: 'in_service'
/** Determines whether new resources can be provisioned onto the sled. */
provisionPolicy: SledProvisionPolicy
}
/** The operator has indicated that the sled has been permanently removed from service.
This is a terminal state: once a particular sled ID is expunged, it will never return to service. (The actual hardware may be reused, but it will be treated as a brand-new sled.)
An expunged sled is always non-provisionable. */
| { kind: 'expunged' }

@charliepark
Copy link
Contributor Author

Chatted with Ben on it and he 👍'd POLICY KIND:
image

Copy link
Collaborator

@david-crespo david-crespo left a comment

Choose a reason for hiding this comment

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

Looks good!

It seems like the elimination of PropertiesTable.Group in #2723 means we have an ordering problem. We might be able to fix this by changing the component so it goes by column instead of by row? Making a separate issue for this.

image

@david-crespo david-crespo merged commit 3da27b7 into main Jul 7, 2025
7 checks passed
@david-crespo david-crespo deleted the sled-page-data branch July 7, 2025 21:42
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.

Add sled policy data to view page
2 participants