From 930e35b6f2c1d46e2fa6751260baad44f2dd01ba Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 3 Jun 2017 16:55:37 -0700 Subject: HTML_TRACK_REMAINING: Show status of item in queue Issue #386 --- src/share/poudriere/awk/json.awk | 2 ++ src/share/poudriere/common.sh | 6 ++++-- src/share/poudriere/html/assets/poudriere.js | 4 ++++ src/share/poudriere/html/build.html | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/share/poudriere/awk/json.awk b/src/share/poudriere/awk/json.awk index 47295d5c..ebac71db 100644 --- a/src/share/poudriere/awk/json.awk +++ b/src/share/poudriere/awk/json.awk @@ -94,6 +94,8 @@ function end_type() { } if (port_status_type == "built" ) { print "\"elapsed\":\"" build_reasons[3] "\"," + } else if (port_status_type == "remaining") { + print "\"status\":\"" build_reasons[2] "\"," } else if (port_status_type == "failed") { print "\"phase\":\"" build_reasons[3] "\"," print "\"errortype\":\"" build_reasons[4] "\"," diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh index b6ba5f53..882902fc 100755 --- a/src/share/poudriere/common.sh +++ b/src/share/poudriere/common.sh @@ -3368,9 +3368,11 @@ build_queue() { if [ "${HTML_TRACK_REMAINING}" = "yes" ]; then { # Find items in pool ready-to-build - find . -type d -depth 2 + find . -type d -depth 2 | \ + sed -e 's,$, ready-to-build,' # Find items in queue not ready-to-build. - find ../deps -type d -depth 1 + find ../deps -type d -depth 1 | \ + sed -e 's,$, waiting-on-dependency,' } | sed -e 's,.*/,,' > \ "${log}/.poudriere.ports.remaining.tmp" mv -f "${log}/.poudriere.ports.remaining.tmp" \ diff --git a/src/share/poudriere/html/assets/poudriere.js b/src/share/poudriere/html/assets/poudriere.js index bea08a5e..d971464f 100644 --- a/src/share/poudriere/html/assets/poudriere.js +++ b/src/share/poudriere/html/assets/poudriere.js @@ -467,6 +467,7 @@ function format_status_row(status, row, n) { table_row.push(row.reason); } else if (status == "remaining") { table_row.push(format_pkgname(row.pkgname)); + table_row.push(row.status); } else if (status == "queued") { table_row.push(format_origin(row.origin)); if (row.reason == "listed") { @@ -976,6 +977,9 @@ function setup_build() { "remaining": [ build_order_column, pkgname_column, + { + "sWidth": "7em", + }, ], "queued": [ build_order_column, diff --git a/src/share/poudriere/html/build.html b/src/share/poudriere/html/build.html index ee7ea3c8..30c30e71 100644 --- a/src/share/poudriere/html/build.html +++ b/src/share/poudriere/html/build.html @@ -266,6 +266,7 @@ # Package + Status -- cgit v1.2.3