func (cmd *ActivityChildren) Run(c *cli.Context) {
	activityList := activities.ActivityChildren(cmd.network, c.Args()[0])
	table := terminal.NewTable([]string{"Id", "Task", "Submitted", "Status"})
	for _, activity := range activityList {
		table.Add(activity.Id, activity.DisplayName, time.Unix(activity.SubmitTimeUtc/1000, 0).Format(time.UnixDate), activity.CurrentStatus)
	}
	table.Print()
}
示例#2
0
func (cmd *Activity) listchildren(activity string) {
	activityList, err := activities.ActivityChildren(cmd.network, activity)
	if nil != err {
		error_handler.ErrorExit(err)
	}
	table := terminal.NewTable([]string{"Id", "Task", "Submitted", "Status", "Streams"})
	for _, activity := range activityList {
		table.Add(activity.Id,
			truncate(activity.DisplayName),
			time.Unix(activity.SubmitTimeUtc/1000, 0).Format(time.UnixDate), truncate(activity.CurrentStatus),
			streams(activity))
	}
	table.Print()
}