From: Frank Duncan Date: Sat, 18 Dec 2021 17:03:11 +0000 (-0600) Subject: Include projectname in job output X-Git-Url: https://code.consxy.com/gitweb/?a=commitdiff_plain;h=2a45e9d6f9b421e06095281ad47c127db3b8b476;p=candle Include projectname in job output --- diff --git a/src/main/cli.lisp b/src/main/cli.lisp index b5fc298..bacd1e3 100644 --- a/src/main/cli.lisp +++ b/src/main/cli.lisp @@ -10,11 +10,12 @@ (error-and-exit "Unknown command '~(~A~)'. See 'candle --help'.~%" command)) (defun job-info->line (job-info) - (format nil "~A (~A) ~A" - (subseq (first job-info) 0 8) + (format nil "~A:~A (~A) ~A" + (first job-info) + (subseq (second job-info) 0 8) (format nil "~{~2,,,'0@A/~2,,,'0@A/~A ~2,,,'0@A:~2,,,'0@A~}" - (utils:time-as-list (third job-info) :month :date :year :hr :min)) - (case (second job-info) + (utils:time-as-list (fourth job-info) :month :date :year :hr :min)) + (case (third job-info) (:succeeded (format nil "~c[1;32mPassed~c[0m" #\Esc #\Esc)) (:failed (format nil "~c[1;31mFailed~c[0m" #\Esc #\Esc)) (:queued "In queue") @@ -147,7 +148,7 @@ (format t (format nil "~~~A@A: ~~A~~%" width) (first branch-info) (job-info->line (second branch-info)))) - (sort branch-infos #'< :key (lambda (branch-info) (third (second branch-info))))))))) + (sort branch-infos #'< :key (lambda (branch-info) (fourth (second branch-info))))))))) (defun refresh-project (args) (let @@ -212,7 +213,7 @@ (format t "~{~A~%~}" (mapcar #'job-info->line - (sort (communication:query `(candle:project-job-information ,(opera:option-argument :project parsed-options))) #'< :key #'third)))))) + (sort (communication:query `(candle:project-job-information ,(opera:option-argument :project parsed-options))) #'< :key #'fourth)))))) (defun decompose-job-definition (job-definition) (let diff --git a/src/main/server.lisp b/src/main/server.lisp index 320ffbd..3df97f8 100644 --- a/src/main/server.lisp +++ b/src/main/server.lisp @@ -102,7 +102,7 @@ (nremove-project project))) (defun job->job-information (job) - (list (job-sha job) (job-status job) (job-create-date job))) + (list (project-name (job-project job)) (job-sha job) (job-status job) (job-create-date job))) (defun project-branch-information (name) (let