diff --git a/cmd/endpointInspect.go b/cmd/endpointInspect.go index c7944bf..cdce6b4 100644 --- a/cmd/endpointInspect.go +++ b/cmd/endpointInspect.go @@ -51,10 +51,14 @@ var endpointInspectCmd = &cobra.Command{ }) common.CheckError(err) var endpointType string - if endpoint.Type == 1 { + if endpoint.Type == portainer.DockerEnvironment { endpointType = "docker" - } else if endpoint.Type == 2 { - endpointType = "agent" + } else if endpoint.Type == portainer.AgentOnDockerEnvironment { + endpointType = "agent on docker" + } else if endpoint.Type == portainer.AzureEnvironment { + endpointType = "azure" + } else if endpoint.Type == portainer.EdgeAgentEnvironment { + endpointType = "edge agent" } _, err = fmt.Fprintln(writer, fmt.Sprintf( "%v\t%s\t%v\t%s\t%s\t%v", diff --git a/cmd/endpointList.go b/cmd/endpointList.go index 7b24160..ac23979 100644 --- a/cmd/endpointList.go +++ b/cmd/endpointList.go @@ -47,10 +47,14 @@ var endpointListCmd = &cobra.Command{ common.CheckError(err) for _, e := range endpoints { var endpointType string - if e.Type == 1 { + if e.Type == portainer.DockerEnvironment { endpointType = "docker" - } else if e.Type == 2 { - endpointType = "agent" + } else if e.Type == portainer.AgentOnDockerEnvironment { + endpointType = "agent on docker" + } else if e.Type == portainer.AzureEnvironment { + endpointType = "azure" + } else if e.Type == portainer.EdgeAgentEnvironment { + endpointType = "edge agent" } _, err := fmt.Fprintln(writer, fmt.Sprintf( "%v\t%s\t%v\t%s\t%s\t%v",