Add status field in CLI metrics : success, failure, cancelled

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-09-16 17:22:21 +02:00
parent 10372b7098
commit 3ccc603461
12 changed files with 53 additions and 29 deletions

View file

@ -70,7 +70,7 @@ $ docker context create my-context --description "some description" --docker "ho
Use: "create CONTEXT",
Short: "Create new context",
RunE: func(cmd *cobra.Command, args []string) error {
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
},
Long: longHelp,

View file

@ -27,7 +27,7 @@ func inspectCommand() *cobra.Command {
Use: "inspect",
Short: "Display detailed information on one or more contexts",
RunE: func(cmd *cobra.Command, args []string) error {
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
},
}

View file

@ -69,7 +69,7 @@ func runList(cmd *cobra.Command, opts lsOpts) error {
return err
}
if opts.format != "" {
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
}

View file

@ -56,7 +56,7 @@ func runLogin(cmd *cobra.Command, args []string) error {
backend := args[0]
return errors.New("unknown backend type for cloud login: " + backend)
}
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
}

View file

@ -37,6 +37,6 @@ func Command() *cobra.Command {
}
func runLogout(cmd *cobra.Command, args []string) error {
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
}

View file

@ -51,7 +51,7 @@ func runVersion(cmd *cobra.Command, version string) error {
// we don't want to fail on error, there is an error if the engine is not available but it displays client version info
// Still, technically the [] byte versionResult could be nil, just let the original command display what it has to display
if versionResult == nil {
mobycli.Exec()
mobycli.Exec(cmd.Root())
return nil
}
var s string = string(versionResult)