added tracker to cli abd into add and remove container on the client side
This commit is contained in:
@@ -135,6 +135,16 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
client.PrettyPrint(plugins)
|
||||
}
|
||||
|
||||
// If the flag Tracked Container is called or the flag
|
||||
// --tc
|
||||
if TrackedContainers {
|
||||
err, trackedContainers := client.ViewTrackedContainers()
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
}
|
||||
client.PrettyPrint(trackedContainers)
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ var (
|
||||
SetDefaultConfig bool
|
||||
NetworkInterface bool
|
||||
ViewPlugin bool
|
||||
TrackedContainers bool
|
||||
)
|
||||
|
||||
var AppConfigFlags = []cli.Flag{
|
||||
@@ -130,4 +131,12 @@ var AppConfigFlags = []cli.Flag{
|
||||
EnvVars: []string{"VIEW_PLUGIN"},
|
||||
Destination: &ViewPlugin,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "TrackedContainers",
|
||||
Aliases: []string{"tc"},
|
||||
Usage: "View containers which have " +
|
||||
"been created from the client side ",
|
||||
EnvVars: []string{"TRACKED_CONTAINERS"},
|
||||
Destination: &TrackedContainers,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user