mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Fix license expires on to use license_date instead of number of days remaining.
This commit is contained in:
parent
e1cb9615cb
commit
22a4279615
@ -25,11 +25,9 @@ export default
|
||||
return duration;
|
||||
};
|
||||
|
||||
|
||||
var calcExpiresOn = function(days){
|
||||
var calcExpiresOn = function(seconds){
|
||||
// calculate the expiration date of the license
|
||||
days = parseInt(days);
|
||||
return moment().add(days, 'days').calendar();
|
||||
return moment.unix(seconds).calendar();
|
||||
};
|
||||
|
||||
var reset = function(){
|
||||
@ -47,7 +45,7 @@ export default
|
||||
$scope.license.version = config.version.split('-')[0];
|
||||
$scope.time = {};
|
||||
$scope.time.remaining = calcDaysRemaining($scope.license.license_info.time_remaining);
|
||||
$scope.time.expiresOn = calcExpiresOn($scope.time.remaining);
|
||||
$scope.time.expiresOn = calcExpiresOn($scope.license.license_info.license_date);
|
||||
$scope.valid = CheckLicense.valid($scope.license.license_info);
|
||||
$scope.compliant = $scope.license.license_info.compliant;
|
||||
Wait('stop');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user