mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Changing Time Remaining + Days logic on license cntrler
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
export default
|
export default
|
||||||
['Wait', '$state', '$scope', '$rootScope', '$location', 'GetBasePath',
|
['Wait', '$state', '$scope', '$rootScope', '$location', 'GetBasePath',
|
||||||
'Rest', 'ProcessErrors', 'CheckLicense', 'moment','$window', '$filter',
|
'Rest', 'ProcessErrors', 'CheckLicense', 'moment','$window',
|
||||||
function( Wait, $state, $scope, $rootScope, $location, GetBasePath, Rest,
|
function( Wait, $state, $scope, $rootScope, $location, GetBasePath, Rest,
|
||||||
ProcessErrors, CheckLicense, moment, $window, $filter){
|
ProcessErrors, CheckLicense, moment, $window){
|
||||||
$scope.getKey = function(event){
|
$scope.getKey = function(event){
|
||||||
// Mimic HTML5 spec, show filename
|
// Mimic HTML5 spec, show filename
|
||||||
$scope.fileName = event.target.files[0].name;
|
$scope.fileName = event.target.files[0].name;
|
||||||
@@ -66,7 +66,7 @@ export default
|
|||||||
var calcDaysRemaining = function(seconds){
|
var calcDaysRemaining = function(seconds){
|
||||||
// calculate the number of days remaining on the license
|
// calculate the number of days remaining on the license
|
||||||
var duration = moment.duration(seconds, 'seconds').days();
|
var duration = moment.duration(seconds, 'seconds').days();
|
||||||
duration = (duration!==1) ? $filter('number')(duration, 0) + ' days' : $filter('number')(duration, 0) + ' day';
|
duration = (duration!==1) ? `${duration} Days` : `${duration} Day`;
|
||||||
return duration;
|
return duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user