Merge branch 'master' into touchdown
Conflicts: static/js/app.js static/partials/organizations.html test/data/test.db
This commit is contained in:
commit
c630d7e948
65 changed files with 1843 additions and 273 deletions
|
@ -913,6 +913,12 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
return '/user';
|
||||
}
|
||||
}
|
||||
},
|
||||
'expiring_license': {
|
||||
'level': 'error',
|
||||
'message': 'Your license will expire at: {expires_at} ' +
|
||||
'<br><br>Please contact Quay.io support to purchase a new license.',
|
||||
'page': '/contact/'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3333,6 +3339,13 @@ quayApp.directive('billingOptions', function () {
|
|||
PlanService.unregisterListener(this);
|
||||
});
|
||||
|
||||
$scope.isExpiringSoon = function(cardInfo) {
|
||||
var current = new Date();
|
||||
var expires = new Date(cardInfo.exp_year, cardInfo.exp_month, 1);
|
||||
var difference = expires - current;
|
||||
return difference < (60 * 60 * 24 * 60 * 1000 /* 60 days */);
|
||||
};
|
||||
|
||||
$scope.changeCard = function() {
|
||||
var previousCard = $scope.currentCard;
|
||||
$scope.changingCard = true;
|
||||
|
@ -4815,8 +4828,8 @@ quayApp.directive('ngVisible', function () {
|
|||
};
|
||||
});
|
||||
|
||||
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', '$anchorScroll',
|
||||
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, $anchorScroll) {
|
||||
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', 'Features', '$anchorScroll',
|
||||
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, Features, $anchorScroll) {
|
||||
|
||||
// Handle session security.
|
||||
Restangular.setDefaultRequestParams(['post', 'put', 'remove', 'delete'], {'_csrf_token': window.__token || ''});
|
||||
|
@ -4830,6 +4843,11 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
|||
}
|
||||
}
|
||||
|
||||
if (!Features.BILLING && response.status == 402) {
|
||||
$('#overlicenseModal').modal({});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.status == 500) {
|
||||
document.location = '/500';
|
||||
return false;
|
||||
|
|
Reference in a new issue