Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ func init() {
// Add optional filters for list
appListCmd.Flags().String("name", "", "Filter by application name")
appListCmd.Flags().String("version", "", "Filter by version label")
appListCmd.Flags().Int("limit", 20, "Max apps to return (default 20)")

// Limit rows returned for app history (0 = all)
appHistoryCmd.Flags().Int("limit", 100, "Max deployments to return (default 100)")
appHistoryCmd.Flags().Int("limit", 20, "Max deployments to return (default 20)")
}

func runAppList(cmd *cobra.Command, args []string) error {
client := getKernelClient(cmd)
appName, _ := cmd.Flags().GetString("name")
version, _ := cmd.Flags().GetString("version")
lim, _ := cmd.Flags().GetInt("limit")

pterm.Debug.Println("Fetching deployed applications...")

Expand Down Expand Up @@ -76,6 +78,7 @@ func runAppList(cmd *cobra.Command, args []string) error {
{"App Name", "Version", "App Version ID", "Region", "Actions", "Env Vars"},
}

rows := 0
for _, app := range *apps {
// Format env vars
envVarsStr := "-"
Expand All @@ -98,6 +101,10 @@ func runAppList(cmd *cobra.Command, args []string) error {
actionsStr,
envVarsStr,
})
rows++
if lim > 0 && rows >= lim {
break
}
}

PrintTableNoPad(tableData, true)
Expand Down
2 changes: 1 addition & 1 deletion cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func init() {
deployLogsCmd.Flags().BoolP("with-timestamps", "t", false, "Include timestamps in each log line")
deployCmd.AddCommand(deployLogsCmd)

deployHistoryCmd.Flags().Int("limit", 100, "Max deployments to return (default 100)")
deployHistoryCmd.Flags().Int("limit", 20, "Max deployments to return (default 20)")
deployCmd.AddCommand(deployHistoryCmd)

// Flags for GitHub deploy
Expand Down