-
Notifications
You must be signed in to change notification settings - Fork 1
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
Polish UX for sandbox commands #4
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ee0e8a2
sandbox create: Add wait timeout and spinner.
enisoc 5142de0
sandbox delete: Wait for sandbox to fully terminate.
enisoc c2e8bd2
Move print logic to separate package.
enisoc 8bb0f36
sandbox create: Print info on accessing the sandbox.
enisoc ffca248
sandbox get: Print details instead of a summary table.
enisoc b64e874
spinner: Truncate message to fit on one line.
enisoc 0959c9e
Keep command-specific printers with their command implementations.
enisoc a88a12e
Update to go-sdk v0.1.3
enisoc d519a12
Add 'sandbox get-status' command.
enisoc 86dcdf2
sandbox create/delete: Use new /status API.
enisoc 6bce1a3
Clarify error message
enisoc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cluster | ||
|
||
import ( | ||
"io" | ||
|
||
"github.com/signadot/cli/internal/sdtab" | ||
"github.com/signadot/go-sdk/models" | ||
) | ||
|
||
type clusterRow struct { | ||
Name string `sdtab:"NAME"` | ||
Created string `sdtab:"CREATED"` | ||
Version string `sdtab:"OPERATOR VERSION"` | ||
} | ||
|
||
func printClusterTable(out io.Writer, clusters []*models.Cluster) error { | ||
t := sdtab.New[clusterRow](out) | ||
t.AddHeader() | ||
for _, cluster := range clusters { | ||
t.AddRow(clusterRow{ | ||
Name: cluster.Name, | ||
Created: cluster.CreatedAt, | ||
Version: cluster.OperatorVersion, | ||
}) | ||
} | ||
return t.Flush() | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
seems like a weird error message - maybe we group this under "Waiting for sandbox to terminate"?
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.
Done.