-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sandbox create: Add wait timeout and spinner. * sandbox delete: Wait for sandbox to fully terminate. * Move print logic to separate package. * sandbox create: Print info on accessing the sandbox. * sandbox get: Print details instead of a summary table. * spinner: Truncate message to fit on one line. * Keep command-specific printers with their command implementations. * Update to go-sdk v0.1.3 * Add 'sandbox get-status' command. * sandbox create/delete: Use new /status API. * Clarify error message
- Loading branch information
Showing
18 changed files
with
516 additions
and
129 deletions.
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.