-
Notifications
You must be signed in to change notification settings - Fork 934
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
cf service: Update headers to make them more consistent #2150
Conversation
- Updated headers - Indented data on each block
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/177164120 The labels on this github issue will be updated when the story is started. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Don't really like adding the indent literal every time it's used. I'd prefer:
const indent = " "
cmd.UI.DisplayKeyValueTable(indent, table, 3)
cmd.UI.DisplayText(indent + "This service instance is not currently being shared.")
What do you think?
Actually I prefer using a constant for padding too: cmd.UI.DisplayKeyValueTable(indent, table, ui.DefaultTableSpacePadding) |
command/v7/service_command.go
Outdated
} | ||
if serviceInstanceWithDetails.SharedStatus.FeatureFlagIsDisabled || serviceInstanceWithDetails.SharedStatus.OfferingDisablesSharing { | ||
if serviceInstanceWithDetails.SharedStatus.FeatureFlagIsDisabled { | ||
cmd.UI.DisplayText(` The "service_instance_sharing" feature flag is disabled for this Cloud Foundry platform.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
command/v7/service_command.go
Outdated
status := fmt.Sprintf("%s %s", serviceInstanceWithDetails.LastOperation.Type, serviceInstanceWithDetails.LastOperation.State) | ||
table := [][]string{ | ||
{cmd.UI.TranslateText("status:"), status}, | ||
{cmd.UI.TranslateText("message:"), serviceInstanceWithDetails.LastOperation.Description}, | ||
{cmd.UI.TranslateText("started:"), serviceInstanceWithDetails.LastOperation.CreatedAt}, | ||
{cmd.UI.TranslateText("updated:"), serviceInstanceWithDetails.LastOperation.UpdatedAt}, | ||
} | ||
cmd.UI.DisplayKeyValueTable("", table, 3) | ||
cmd.UI.DisplayKeyValueTable(indent+"", table, ui.DefaultTableSpacePadding) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a mistake. If there's a type problem, could a cast work?
#176901932