Add Termination Reason (#573)
This commit is contained in:
1 parent
5bc8c8d921
commit
abe5e9b950
7 files changed
+54
-28
No files matched your search
@@ -2,6 +2,7 @@ package sessions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/boundary/api/sessions"
|
||||
@@ -24,6 +25,9 @@ func generateSessionTableOutput(in *sessions.Session) string {
|
||||
"Endpoint": in.Endpoint,
|
||||
"Status": in.Status,
|
||||
}
|
||||
if len(strings.TrimSpace(in.TerminationReason)) > 0 {
|
||||
nonAttributeMap["Termination Reason"] = in.TerminationReason
|
||||
}
|
||||
|
||||
maxLength := base.MaxAttributesLength(nonAttributeMap, nil, nil)
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ func (c *Command) Run(args []string) int {
|
||||
|
||||
case "table":
|
||||
if len(listedSessions) == 0 {
|
||||
c.UI.Output("No auth tokens found")
|
||||
c.UI.Output("No sessions found")
|
||||
return 0
|
||||
}
|
||||
var output []string
|
||||
|
||||
Reference in new issue
Block a user