mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Updated to handle fact vs. facts responses. Removed accidental commit inclusion from branch.
This commit is contained in:
@@ -89,7 +89,15 @@ function controller($rootScope,
|
|||||||
leftRange,
|
leftRange,
|
||||||
rightRange)
|
rightRange)
|
||||||
.then(function(responses) {
|
.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])) {
|
if (_.isEmpty(data[0]) && _.isEmpty(data[1])) {
|
||||||
return _.reject({
|
return _.reject({
|
||||||
name: 'NoScanData',
|
name: 'NoScanData',
|
||||||
|
|||||||
Reference in New Issue
Block a user