mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
[system_tracking] Display error when no scans for a particular date
This commit is contained in:
parent
5a0ba44155
commit
159ad0d2a9
@ -9,6 +9,8 @@ export default
|
||||
rightHostname: '=',
|
||||
leftScanDate: '=',
|
||||
rightScanDate: '=',
|
||||
leftDataNoScans: '=',
|
||||
rightDataNoScans: '=',
|
||||
factData: '='
|
||||
}
|
||||
};
|
||||
|
@ -6,11 +6,13 @@
|
||||
</span>
|
||||
</h3>
|
||||
<h3 class="FactDataTable-column FactDataTableHeading">
|
||||
<span class="FactDataTableHeading-host">{{leftHostname}}</span>
|
||||
<span ng-if="leftDataNoScans">No scans for {{leftHostname}} on</span>
|
||||
<span class="FactDataTableHeading-host" ng-if="!leftDataNoScans">{{leftHostname}}</span>
|
||||
<span class="FactDataTableHeading-date">{{leftScanDate|longDate}}</span>
|
||||
</h3>
|
||||
<h3 class="FactDataTable-column FactDataTableHeading">
|
||||
<span class="FactDataTableHeading-host">{{rightHostname}}</span>
|
||||
<span ng-if="rightDataNoScans">No scans for {{rightHostname}} on</span>
|
||||
<span class="FactDataTableHeading-host" ng-if="!rightDataNoScans">{{rightHostname}}</span>
|
||||
<span class="FactDataTableHeading-date">{{rightScanDate|longDate}}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
@ -63,6 +63,9 @@ function controller($rootScope,
|
||||
rightRange = searchConfig.leftRange;
|
||||
}
|
||||
|
||||
$scope.leftDataNoScans = false;
|
||||
$scope.rightDataNoScans = false;
|
||||
|
||||
waitIndicator('start');
|
||||
|
||||
return getDataForComparison(
|
||||
@ -73,8 +76,19 @@ function controller($rootScope,
|
||||
.then(function(responses) {
|
||||
var data = _.pluck(responses, 'fact');
|
||||
|
||||
if (_.isEmpty(data[0])) {
|
||||
$scope.leftDataNoScans = true;
|
||||
$scope.leftScanDate = $scope.leftDate;
|
||||
} else {
|
||||
$scope.leftScanDate = moment(responses[0].timestamp);
|
||||
}
|
||||
|
||||
if (_.isEmpty(data[1])) {
|
||||
$scope.rightDataNoScans = true;
|
||||
$scope.rightScanDate = $scope.rightDate;
|
||||
} else {
|
||||
$scope.rightScanDate = moment(responses[1].timestamp);
|
||||
}
|
||||
|
||||
return data;
|
||||
})
|
||||
|
@ -45,6 +45,8 @@
|
||||
right-hostname="rightHostname"
|
||||
left-scan-date="leftScanDate"
|
||||
right-scan-date="rightScanDate"
|
||||
left-data-no-scans="leftDataNoScans"
|
||||
right-data-no-scans="rightDataNoScans"
|
||||
fact-data="factData">
|
||||
</fact-data-table>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user