Skip to content
Permalink
Browse files

fix(ps): use new sdk for sorted processes (#210)

  • Loading branch information...
Joshua-Anderson committed Sep 1, 2016
1 parent 09ca839 commit f9d85a0ac77c6c32d50dae664fe7bc80bc8fca1b
Showing with 12 additions and 12 deletions.
  1. +6 −6 cmd/ps.go
  2. +5 −5 glide.lock
  3. +1 −1 glide.yaml
@@ -103,16 +103,16 @@ func (d DeisCmd) PsRestart(appID, target string) error {
return nil
}

func printProcesses(appID string, processes []api.Pods, wOut io.Writer) {
psMap := ps.ByType(processes)
func printProcesses(appID string, input []api.Pods, wOut io.Writer) {
processes := ps.ByType(input)

fmt.Fprintf(wOut, "=== %s Processes\n", appID)

for psType, procs := range psMap {
fmt.Fprintf(wOut, "--- %s:\n", psType)
for _, process := range processes {
fmt.Fprintf(wOut, "--- %s:\n", process.Type)

for _, proc := range procs {
fmt.Fprintf(wOut, "%s %s (%s)\n", proc.Name, proc.State, proc.Release)
for _, pod := range process.PodsList {
fmt.Fprintf(wOut, "%s %s (%s)\n", pod.Name, pod.State, pod.Release)
}
}
}

Some generated files are not rendered by default. Learn more.

@@ -16,4 +16,4 @@ import:
- package: github.com/olekukonko/tablewriter
- package: github.com/arschles/assert
- package: github.com/deis/controller-sdk-go
version: 72235ec0aa14429beb569bf0b20984fc983d8aaa
version: 383a9c0cdf4591127f3dad8b7b9fa48462b1f8d0

0 comments on commit f9d85a0

Please sign in to comment.
You can’t perform that action at this time.