mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Fix display of nested facts
This commit is contained in:
@@ -9,7 +9,9 @@ import compareFlatFacts from './compare-facts/flat';
|
|||||||
|
|
||||||
export function compareFacts(module, facts) {
|
export function compareFacts(module, facts) {
|
||||||
if (module.displayType === 'nested') {
|
if (module.displayType === 'nested') {
|
||||||
return compareNestedFacts(facts);
|
return { factData: compareNestedFacts(facts),
|
||||||
|
isNestedDisplay: true
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
// For flat structures we compare left-to-right, then right-to-left to
|
// For flat structures we compare left-to-right, then right-to-left to
|
||||||
// make sure we get a good comparison between both hosts
|
// make sure we get a good comparison between both hosts
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ export function formatFacts(diffedResults) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function findFacts(factData) {
|
export function findFacts(factData) {
|
||||||
var rightData = factData[0];
|
var rightData = factData[0].facts;
|
||||||
var leftData = factData[1];
|
var leftData = factData[1].facts;
|
||||||
|
|
||||||
function factObject(keyPath, key, leftValue, rightValue) {
|
function factObject(keyPath, key, leftValue, rightValue) {
|
||||||
var obj =
|
var obj =
|
||||||
|
|||||||
@@ -79,9 +79,6 @@ function controller($rootScope,
|
|||||||
// arrays in index 1
|
// arrays in index 1
|
||||||
//
|
//
|
||||||
|
|
||||||
// Save the position of the data so we
|
|
||||||
// don't lose it later
|
|
||||||
|
|
||||||
var wrappedFacts =
|
var wrappedFacts =
|
||||||
facts.map(function(facts, index) {
|
facts.map(function(facts, index) {
|
||||||
return { position: index === 0 ? 'left' : 'right',
|
return { position: index === 0 ? 'left' : 'right',
|
||||||
|
|||||||
Reference in New Issue
Block a user