From dfaffdea56069441aeda370c31463130d5febe7e Mon Sep 17 00:00:00 2001 From: Ken Hoes Date: Tue, 12 Apr 2016 13:20:21 -0400 Subject: [PATCH] Updated to handle fact vs. facts responses. Removed accidental commit inclusion from branch. --- .../src/system-tracking/system-tracking.controller.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/system-tracking/system-tracking.controller.js b/awx/ui/client/src/system-tracking/system-tracking.controller.js index fee06ee768..42e2ce3f67 100644 --- a/awx/ui/client/src/system-tracking/system-tracking.controller.js +++ b/awx/ui/client/src/system-tracking/system-tracking.controller.js @@ -89,7 +89,15 @@ function controller($rootScope, leftRange, rightRange) .then(function(responses) { - var data = _.pluck(responses, 'facts'); + var data = []; + _.each(responses, function(response) { + if(response.fact) { + data.push(response.fact); + } else if (response.facts) { + data.push(response.facts); + } + }); + if (_.isEmpty(data[0]) && _.isEmpty(data[1])) { return _.reject({ name: 'NoScanData',