func (cmd *AddChildren) Run(c *cli.Context) { activity := entities.AddChildren(cmd.network, c.Args()[0], c.Args()[1], c.Args()[2]) table := terminal.NewTable([]string{"Id", "Task", "Submitted", "Status"}) table.Add(activity.Id, activity.DisplayName, time.Unix(activity.SubmitTimeUtc/1000, 0).Format(time.UnixDate), activity.CurrentStatus) table.Print() }
func (cmd *AddChildren) Run(scope scope.Scope, c *cli.Context) { if err := net.VerifyLoginURL(cmd.network); err != nil { error_handler.ErrorExit(err) } activity, err := entities.AddChildren(cmd.network, scope.Application, scope.Entity, c.Args().First()) if nil != err { error_handler.ErrorExit(err) } table := terminal.NewTable([]string{"Id", "Task", "Submitted", "Status"}) table.Add(activity.Id, activity.DisplayName, time.Unix(activity.SubmitTimeUtc/1000, 0).Format(time.UnixDate), activity.CurrentStatus) table.Print() }