Strip whitespace from ALL the things.

This commit is contained in:
Jimmy Zelinskie 2014-11-24 16:07:38 -05:00
parent f6dd8b0a4d
commit 716d7a737b
171 changed files with 807 additions and 807 deletions

View file

@ -59,13 +59,13 @@ function PlansCtrl($scope, $location, UserService, PlanService, $routeParams) {
$scope.signedIn = function() {
$('#signinModal').modal('hide');
PlanService.handleNotedPlan();
PlanService.handleNotedPlan();
};
$scope.buyNow = function(plan) {
PlanService.notePlan(plan);
if ($scope.user && !$scope.user.anonymous) {
PlanService.handleNotedPlan();
PlanService.handleNotedPlan();
} else {
$('#signinModal').modal({});
}
@ -77,7 +77,7 @@ function PlansCtrl($scope, $location, UserService, PlanService, $routeParams) {
if ($scope && $routeParams['trial-plan']) {
$scope.buyNow($routeParams['trial-plan']);
}
}
}, /* include the personal plan */ true);
}
@ -94,7 +94,7 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService, Conf
'steps': [
{
'title': 'Welcome to the ' + Config.REGISTRY_TITLE_SHORT + ' tutorial!',
'templateUrl': '/static/tutorial/welcome.html'
'templateUrl': '/static/tutorial/welcome.html'
},
{
'title': 'Sign in to get started',
@ -235,7 +235,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
$scope.namespace = null;
$scope.page = 1;
$scope.publicPageCount = null;
// Monitor changes in the user.
UserService.updateUserIn($scope, function() {
loadMyRepos($scope.namespace);
@ -269,7 +269,7 @@ function RepoListCtrl($scope, $sanitize, Restangular, UserService, ApiService) {
}
var options = {'public': false, 'sort': true, 'namespace': namespace};
$scope.user_repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
return resp.repositories;
});
@ -318,7 +318,7 @@ function LandingCtrl($scope, UserService, ApiService, Features, Config) {
if (namespace == $scope.user.username) {
return true;
}
if ($scope.user.organizations) {
for (var i = 0; i < $scope.user.organizations.length; ++i) {
var org = $scope.user.organizations[i];
@ -483,7 +483,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
$scope.currentPullCommand = $scope.pullCommands[0];
};
$scope.showNewBuildDialog = function() {
$scope.buildDialogShowCounter++;
};
@ -655,7 +655,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
$scope.setImage = function(imageId, opt_updateURL) {
if (!$scope.images) { return; }
var image = null;
for (var i = 0; i < $scope.images.length; ++i) {
var currentImage = $scope.images[i];
@ -691,7 +691,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
// We must find a good default.
for (tagName in repo.tags) {
if (!proposedTag || tagName == 'latest') {
proposedTag = repo.tags[tagName];
proposedTag = repo.tags[tagName];
}
}
}
@ -702,7 +702,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
if ($scope.tree) {
$scope.tree.setTag(proposedTag.name);
}
}
if (opt_updateURL) {
$location.search('image', null);
@ -871,7 +871,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
};
var listImages = function() {
var params = {'repository': namespace + '/' + name};
var params = {'repository': namespace + '/' + name};
$scope.imageHistory = ApiService.listRepositoryImagesAsResource(params).get(function(resp) {
$scope.images = resp.images;
$scope.specificImages = [];
@ -971,7 +971,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
return dockerfilePath;
};
var processBuildPack = function(uint8array) {
var processBuildPack = function(uint8array) {
var archiveread = function(files) {
var getpath = function(file) {
return file.path;
@ -1056,7 +1056,7 @@ function BuildPackageCtrl($scope, Restangular, ApiService, DataFileService, $rou
$scope.accessDenied = true;
return;
}
$rootScope.title = 'Repository Build Pack - ' + resp['display_name'];
$scope.repobuild = resp;
$scope.repo = {
@ -1115,7 +1115,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
$('#confirmRestartBuildModal').modal('hide');
var subdirectory = '';
if (build['job_config']) {
if (build['job_config']) {
subdirectory = build['job_config']['build_subdir'] || '';
}
@ -1159,7 +1159,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
$scope.processANSI = function(message, container) {
var filter = container.logs._filter = (container.logs._filter || ansi2html.create());
// Note: order is important here.
var setup = filter.getSetupHtml();
var stream = filter.addInputToStream(message);
@ -1194,7 +1194,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
if ($scope.pollChannel) {
$scope.pollChannel.stop();
}
// Create a new channel for polling the build status and logs.
var conductStatusAndLogRequest = function(callback) {
getBuildStatusAndLogs(build, callback);
@ -1230,7 +1230,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
return endIndex;
};
var getBuildStatusAndLogs = function(build, callback) {
var getBuildStatusAndLogs = function(build, callback) {
var params = {
'repository': namespace + '/' + name,
'build_uuid': build.id
@ -1238,7 +1238,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
ApiService.getRepoBuildStatus(null, params, true).then(function(resp) {
if (build != $scope.currentBuild) { callback(false); return; }
// Note: We use extend here rather than replacing as Angular is depending on the
// root build object to remain the same object.
var matchingBuilds = $.grep($scope.builds, function(elem) {
@ -1258,9 +1258,9 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
'start': $scope.logStartIndex
};
ApiService.getRepoBuildLogsAsResource(params, true).withOptions(options).get(function(resp) {
ApiService.getRepoBuildLogsAsResource(params, true).withOptions(options).get(function(resp) {
if (build != $scope.currentBuild) { callback(false); return; }
// Process the logs we've received.
$scope.logStartIndex = processLogs(resp['logs'], resp['start'], resp['total']);
@ -1323,7 +1323,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
fetchRepository();
}
function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerService, $routeParams,
function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerService, $routeParams,
$rootScope, $location, UserService, Config, Features, ExternalNotificationData) {
var namespace = $routeParams.namespace;
@ -1335,7 +1335,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
$scope.permissions = {'team': [], 'user': [], 'loading': 2};
$scope.logsShown = 0;
$scope.deleting = false;
$scope.permissionCache = {};
$scope.showTriggerSetupCounter = 0;
@ -1436,7 +1436,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
var permission = $scope.permissions[kind][entityName];
var currentRole = permission.role;
permission.role = role;
var permissionPut = Restangular.one(getRestUrl('repository', namespace, name, 'permissions', kind, entityName));
permissionPut.customPUT(permission).then(function() {}, function(resp) {
$scope.permissions[kind][entityName] = {'role': currentRole};
@ -1534,7 +1534,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
$scope.deleting = true;
ApiService.deleteRepository(null, params).then(function() {
$scope.repo = null;
setTimeout(function() {
document.location = '/repository/';
}, 1000);
@ -1545,7 +1545,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
};
$scope.showNewNotificationCounter = 0;
$scope.showNewNotificationDialog = function() {
$scope.showNewNotificationCounter++;
};
@ -1629,7 +1629,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, KeyService, TriggerServi
};
$scope.showManualBuildDialog = 0;
$scope.startTrigger = function(trigger, opt_custom) {
var parameters = TriggerService.getRunParameters(trigger.service);
if (parameters.length && !opt_custom) {
@ -1767,7 +1767,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
$scope.invoicesShown = 0;
$scope.USER_PATTERN = USER_PATTERN;
$scope.loadAuthedApps = function() {
if ($scope.authorizedApps) { return; }
@ -1810,7 +1810,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
$scope.orgPlans = plans;
});
}
$scope.convertStep = 1;
};
@ -1858,7 +1858,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
}, function(result) {
$scope.updatingUser = false;
UIService.showFormError('#changeUsernameForm', result);
});
});
};
$scope.changeEmail = function() {
@ -1903,7 +1903,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
UserService.load();
}, function(result) {
$scope.updatingUser = false;
UIService.showFormError('#changePasswordForm', result);
UIService.showFormError('#changePasswordForm', result);
});
};
@ -1920,7 +1920,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
};
}
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) {
function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) {
var namespace = $routeParams.namespace;
var name = $routeParams.name;
var imageid = $routeParams.image;
@ -1944,7 +1944,7 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
if (index < 0) {
return '';
}
return filepath.substr(0, index).split('/');
};
@ -1967,10 +1967,10 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
$scope.search['$'] = filter;
document.getElementById('change-filter').value = filter;
};
$scope.initializeTree = function() {
if ($scope.tree) { return; }
$scope.tree = new ImageFileChangeTree($scope.image, $scope.combinedChanges);
$timeout(function() {
$scope.tree.draw('changes-tree-container');
@ -1990,7 +1990,7 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
var fetchImage = function() {
var params = {
'repository': namespace + '/' + name,
'image_id': imageid
'image_id': imageid
};
$scope.image = ApiService.getImageAsResource(params).get(function(image) {
@ -2015,14 +2015,14 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, I
var fetchChanges = function() {
var params = {
'repository': namespace + '/' + name,
'image_id': imageid
'image_id': imageid
};
ApiService.getImageChanges(null, params).then(function(changes) {
var combinedChanges = [];
var addCombinedChanges = function(c, kind) {
for (var i = 0; i < c.length; ++i) {
combinedChanges.push({
combinedChanges.push({
'kind': kind,
'file': c[i]
});
@ -2066,7 +2066,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
$scope.$watch('repo.namespace', function(namespace) {
// Note: Can initially be undefined.
if (!namespace) { return; }
var isUserNamespace = (namespace == $scope.user.username);
$scope.planRequired = null;
@ -2103,7 +2103,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
}
}
});
return true;
};
@ -2176,7 +2176,7 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, ApiService
var isUserNamespace = $scope.isUserNamespace;
ApiService.getPrivateAllowed(isUserNamespace ? null : $scope.repo.namespace).then(function(resp) {
$scope.checkingPlan = false;
if (resp['privateAllowed']) {
$scope.planRequired = null;
return;
@ -2218,8 +2218,8 @@ function OrgViewCtrl($rootScope, $scope, ApiService, $routeParams) {
{ 'id': 'creator', 'title': 'Creator', 'kind': 'success' },
{ 'id': 'admin', 'title': 'Admin', 'kind': 'primary' }
];
$scope.setRole = function(role, teamname) {
$scope.setRole = function(role, teamname) {
var previousRole = $scope.organization.teams[teamname].role;
$scope.organization.teams[teamname].role = role;
@ -2231,7 +2231,7 @@ function OrgViewCtrl($rootScope, $scope, ApiService, $routeParams) {
var data = $scope.organization.teams[teamname];
ApiService.updateOrganizationTeam(data, params).then(function(resp) {
}, function(resp) {
}, function(resp) {
$scope.organization.teams[teamname].role = previousRole;
$scope.roleError = resp.data || '';
$('#cannotChangeTeamModal').modal({});
@ -2306,7 +2306,7 @@ function OrgAdminCtrl($rootScope, $scope, $timeout, Restangular, $routeParams, U
PlanService.getPlans(function(plans) {
$scope.plans = plans;
$scope.plan_map = {};
for (var i = 0; i < plans.length; ++i) {
$scope.plan_map[plans[i].stripeId] = plans[i];
}
@ -2321,7 +2321,7 @@ function OrgAdminCtrl($rootScope, $scope, $timeout, Restangular, $routeParams, U
$scope.invoicesShown = 0;
$scope.applicationsShown = 0;
$scope.changingOrganization = false;
$scope.loadLogs = function() {
$scope.logsShown++;
};
@ -2444,7 +2444,7 @@ function TeamViewCtrl($rootScope, $scope, $timeout, Features, Restangular, ApiSe
$scope.addNewMember = function(member) {
if (!member || $scope.memberMap[member.name]) { return; }
var params = {
'orgname': orgname,
'teamname': teamname,
@ -2539,7 +2539,7 @@ function TeamViewCtrl($rootScope, $scope, $timeout, Features, Restangular, ApiSe
$scope.membersResource = ApiService.getOrganizationTeamMembersAsResource(params).get(function(resp) {
$scope.members = resp.members;
$scope.canEditMembers = resp.can_edit;
$('.info-icon').popover({
'trigger': 'hover',
'html': true
@ -2687,7 +2687,7 @@ function OrgMemberLogsCtrl($scope, $routeParams, $rootScope, $timeout, Restangul
});
return resp.member;
});
});
};
// Load the org info and the member info.
@ -2783,7 +2783,7 @@ function ManageApplicationCtrl($scope, $routeParams, $rootScope, $location, $tim
' under organization ' + $scope.orgname;
return resp;
});
});
};