If enabled, allow users and orgs to set their time machine expiration
Fixes https://www.pivotaltracker.com/story/show/142881203
This commit is contained in:
parent
eb5cebbcdf
commit
3dcbe3c631
25 changed files with 472 additions and 15 deletions
|
@ -21,6 +21,8 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
|
||||
{'id': 'registry-storage', 'title': 'Registry Storage'},
|
||||
|
||||
{'id': 'time-machine', 'title': 'Time Machine'},
|
||||
|
||||
{'id': 'ssl', 'title': 'SSL certificate and key', 'condition': function(config) {
|
||||
return config.PREFERRED_URL_SCHEME == 'https';
|
||||
}},
|
||||
|
@ -826,7 +828,8 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
'binding': '=binding',
|
||||
'placeholder': '@placeholder',
|
||||
'defaultValue': '@defaultValue',
|
||||
'itemTitle': '@itemTitle'
|
||||
'itemTitle': '@itemTitle',
|
||||
'itemPattern': '@itemPattern'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
$scope.removeItem = function(item) {
|
||||
|
@ -853,6 +856,20 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
$scope.newItemName = null;
|
||||
};
|
||||
|
||||
$scope.patternMap = {};
|
||||
|
||||
$scope.getRegexp = function(pattern) {
|
||||
if (!pattern) {
|
||||
pattern = '.*';
|
||||
}
|
||||
|
||||
if ($scope.patternMap[pattern]) {
|
||||
return $scope.patternMap[pattern];
|
||||
}
|
||||
|
||||
return $scope.patternMap[pattern] = new RegExp(pattern);
|
||||
};
|
||||
|
||||
$scope.$watch('binding', function(binding) {
|
||||
if (!binding && $scope.defaultValue) {
|
||||
$scope.binding = eval($scope.defaultValue);
|
||||
|
|
Reference in a new issue