From 4cbf8e0c179e4e245e54b5d8c5f41b35f4c918ec Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 8 Jun 2015 15:38:25 -0400 Subject: [PATCH] Fix for host events viewer the host events had logic that was expecting to act on an array, but was not receiving an array --- awx/ui/static/js/helpers/EventViewer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/ui/static/js/helpers/EventViewer.js b/awx/ui/static/js/helpers/EventViewer.js index 5895f90716..fb0c3f6b1c 100644 --- a/awx/ui/static/js/helpers/EventViewer.js +++ b/awx/ui/static/js/helpers/EventViewer.js @@ -497,6 +497,9 @@ export default // only show cmd if it's a cmd that was run if (!EventsViewerForm.fields[key] && obj[key].length > 0) { // include the label head Shell Command instead of CMD in the modal + if(typeof(obj[key]) === 'string'){ + obj[key] = [obj[key]]; + } string_cmd += obj[key].join(" "); h = parseItem(string_cmd, key, "Shell Command"); if (h) { @@ -506,6 +509,9 @@ export default } } else if (key === 'warnings') { if (!EventsViewerForm.fields[key] && obj[key].length > 0) { + if(typeof(obj[key]) === 'string'){ + obj[key] = [obj[key]]; + } string_warnings += obj[key].join(" "); h = parseItem(string_warnings, key, "Warnings"); if (h) {