File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ type ListOutputWide struct {
4747}
4848
4949type ListOutput struct {
50- Name string `csv:"NAME" json:"name" yaml:"name"`
51- Begin string `csv:"BEGIN" json:"begin" yaml:"begin,omitempty"`
52- Count uint32 `csv:"COUNT" json:"count" yaml:"count,omitempty"`
53- LastTrigger * time. Time `csv:"LAST TRIGGER" json:"lastTrigger" yaml:"lastTrigger"`
50+ Name string `csv:"NAME" json:"name" yaml:"name"`
51+ Begin string `csv:"BEGIN" json:"begin" yaml:"begin,omitempty"`
52+ Count uint32 `csv:"COUNT" json:"count" yaml:"count,omitempty"`
53+ LastTrigger string `csv:"LAST TRIGGER" json:"lastTrigger" yaml:"lastTrigger"`
5454}
5555
5656type JobCount struct {
@@ -145,9 +145,12 @@ func listWideToShort(listWide []*ListOutputWide) ([]*ListOutput, error) {
145145 }
146146
147147 l := ListOutput {
148- Name : item .Name ,
149- Count : item .Count ,
150- LastTrigger : item .LastTrigger ,
148+ Name : item .Name ,
149+ Count : item .Count ,
150+ }
151+
152+ if item .LastTrigger != nil {
153+ l .LastTrigger = "-" + utils .HumanizeDuration (now .Sub (* item .LastTrigger ))
151154 }
152155
153156 if item .Begin .After (now ) {
You can’t perform that action at this time.
0 commit comments