diff options
author | Zuul <zuul@review.opendev.org> | 2022-08-30 01:45:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-08-30 01:45:17 +0000 |
commit | 3cd5c7ddc4544669698dcf52f3b22905fba5c862 (patch) | |
tree | 7f4fe64445a87081338e166047f700a73edede0f | |
parent | 6e4067c5536c31fbbc48d57540885bcaf8228723 (diff) | |
parent | 0887c2b85173fe6f9e756d346344f0d10e0f5cb6 (diff) | |
download | zuul-3cd5c7ddc4544669698dcf52f3b22905fba5c862.tar.gz |
Merge "web: fix package task results in console"
-rw-r--r-- | web/src/containers/build/Console.jsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/src/containers/build/Console.jsx b/web/src/containers/build/Console.jsx index 0b365df62..194e314ee 100644 --- a/web/src/containers/build/Console.jsx +++ b/web/src/containers/build/Console.jsx @@ -50,6 +50,19 @@ class TaskOutput extends React.Component { renderResults(value) { const interesting_results = [] + + // This was written to assume "value" is an array of + // key/value mappings to output. This seems to be a + // good assumption for the most part, but "package:" for + // whatever reason outputs a result that is just an array of + // strings with what packages were installed. So, if we + // see an array of strings as the value, we just swizzle + // that into a key/value so it displays usefully. + const isAllStrings = value.every(i => typeof i === 'string') + if (isAllStrings) { + value = [ {output: [...value]} ] + } + value.forEach((result, idx) => { const keys = Object.entries(result).filter( ([key, value]) => shouldIncludeKey( |