feat: show a Compute enablement banner on the empty Workloads page - #233
Open
kevwilliams wants to merge 1 commit into
Open
feat: show a Compute enablement banner on the empty Workloads page#233kevwilliams wants to merge 1 commit into
kevwilliams wants to merge 1 commit into
Conversation
When a project doesn't have an Active `compute` ServiceEntitlement yet, the Workloads page now shows a banner explaining that Compute needs to be enabled, with a button that creates the same ServiceEntitlement object datumctl's "Would you like to request access?" prompt does. The "Deploy a workload" / "List & inspect workloads" CLI cards stay visible either way, since those datumctl commands request access themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a banner to the Workloads page for projects without an Active
computeServiceEntitlement.The banner's button creates the same
ServiceEntitlementobject (services.miloapis.com/v1alpha1, namecompute,spec.serviceRef.name: compute) thatdatumctl's "Would you like to request access?" prompt creates.The banner covers three states: not requested, pending approval, and rejected (with a "Request access again" button). State comes from
status.phase.The "Deploy a workload" and "List & inspect workloads" CLI cards stay visible in all states, since those
datumctlcommands request access on their own.Extracted a shared
Bannershell (icon, title, description, actions) used by bothCliBannerand the newComputeEnablementBanner.Test plan
npm run typecheckinui/consumernpm run buildinui/consumercomputeServiceEntitlement: confirm the banner and CLI cards render, and "Enable Compute" creates the entitlement and moves the banner to pending approval