updating client with capture type
This commit is contained in:
parent
01725debbb
commit
7286af9c79
@ -18,9 +18,9 @@ type CommandMap struct {
|
|||||||
// Instance's new min_id value
|
// Instance's new min_id value
|
||||||
type RunningInstance struct {
|
type RunningInstance struct {
|
||||||
Software string `json:"software"`
|
Software string `json:"software"`
|
||||||
Min_id string
|
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
LastRun string `json:"lastrun"`
|
LastRun string `json:"lastrun"`
|
||||||
|
CaptureType string `json:"capturetype"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResponseBack struct {
|
type ResponseBack struct {
|
||||||
@ -36,8 +36,6 @@ func main() {
|
|||||||
resumePtr := flag.String("resume", "", "Instance to Resume")
|
resumePtr := flag.String("resume", "", "Instance to Resume")
|
||||||
addPtr := flag.String("add", "", "Instance to add")
|
addPtr := flag.String("add", "", "Instance to add")
|
||||||
statusPtr := flag.Bool("status", false, "Check status")
|
statusPtr := flag.Bool("status", false, "Check status")
|
||||||
// usernamePtr := flag.String("username", "", "Set username")
|
|
||||||
// passwordPtr := flag.String("password", "", "Set password")
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
/* Condition verification */
|
/* Condition verification */
|
||||||
@ -120,7 +118,7 @@ func main() {
|
|||||||
case "add":
|
case "add":
|
||||||
fmt.Println(responseback.Message)
|
fmt.Println(responseback.Message)
|
||||||
case "status":
|
case "status":
|
||||||
fmt.Println("Status\t\tLastRun\t\t\tEndpoint")
|
fmt.Println("Status\t\tLastRun\t\t\tCaptureType\tEndpoint")
|
||||||
for endpoint, runninginstance := range responseback.RunningInstances {
|
for endpoint, runninginstance := range responseback.RunningInstances {
|
||||||
if runninginstance.Status == 0 {
|
if runninginstance.Status == 0 {
|
||||||
fmt.Fprintf(os.Stdout, "New\t")
|
fmt.Fprintf(os.Stdout, "New\t")
|
||||||
@ -147,6 +145,7 @@ func main() {
|
|||||||
if runninginstance.LastRun == "Queued" {
|
if runninginstance.LastRun == "Queued" {
|
||||||
fmt.Fprintf(os.Stdout, "\t\t")
|
fmt.Fprintf(os.Stdout, "\t\t")
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(os.Stdout, "\t%s\t", runninginstance.CaptureType)
|
||||||
fmt.Fprintf(os.Stdout, "%s\n", endpoint)
|
fmt.Fprintf(os.Stdout, "%s\n", endpoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user