From 9e9e41db35f103883d18d17deb667a04f3d224fc Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Mon, 10 Jun 2013 18:31:17 -0400 Subject: [PATCH] Script for building minified javascript using closure compiler --- ansibleworks/settings/defaults.py | 2 +- .../ui/static/js/controllers/Credentials.js | 6 ++-- .../ui/static/js/controllers/Inventories.js | 8 +++--- .../ui/static/js/controllers/JobTemplates.js | 4 +-- ansibleworks/ui/static/js/controllers/Jobs.js | 4 +-- .../ui/static/js/controllers/Organizations.js | 4 +-- .../ui/static/js/controllers/Projects.js | 4 +-- .../ui/static/js/controllers/Teams.js | 6 ++-- .../ui/static/js/controllers/Users.js | 6 ++-- .../ui/static/js/forms/Credentials.js | 24 ++-------------- ansibleworks/ui/static/js/forms/Groups.js | 6 ++-- ansibleworks/ui/static/js/forms/Hosts.js | 6 ++-- .../ui/static/js/forms/Inventories.js | 10 +++---- ansibleworks/ui/static/js/forms/JobEvents.js | 10 +++---- .../ui/static/js/forms/JobEvents.js.old | 2 +- .../ui/static/js/forms/JobTemplates.js | 18 ++++++------ ansibleworks/ui/static/js/forms/Jobs.js | 26 ++++++++--------- .../ui/static/js/forms/Organizations.js | 18 ++++++------ ansibleworks/ui/static/js/forms/Projects.js | 3 +- ansibleworks/ui/static/js/forms/Teams.js | 28 +++++++++---------- ansibleworks/ui/static/js/forms/Users.js | 16 +++++------ .../ui/static/js/helpers/JobTemplate.js | 8 ++++-- ansibleworks/ui/static/js/lists/Admins.js | 2 +- .../ui/static/js/lists/Credentials.js | 10 +++---- ansibleworks/ui/static/js/lists/Groups.js | 10 +++---- ansibleworks/ui/static/js/lists/Hosts.js | 10 +++---- .../ui/static/js/lists/Inventories.js | 10 +++---- ansibleworks/ui/static/js/lists/JobEvents.js | 18 ++++++------ ansibleworks/ui/static/js/lists/JobHosts.js | 10 +++---- .../ui/static/js/lists/JobTemplates.js | 12 ++++---- ansibleworks/ui/static/js/lists/Jobs.js | 26 ++++++++--------- .../ui/static/js/lists/Organizations.js | 10 +++---- ansibleworks/ui/static/js/lists/Projects.js | 8 +++--- ansibleworks/ui/static/js/lists/Teams.js | 10 +++---- ansibleworks/ui/static/js/lists/Users.js | 10 +++---- .../ui/static/lib/ansible/authenticate.js | 2 +- .../ui/static/lib/ansible/form-generator.js | 26 ++++++++--------- .../ui/static/lib/ansible/list-generator.js | 10 +++---- .../ui/static/lib/ansible/prompt-dialog.js | 2 +- .../ui/static/lib/ansible/rest-services.js | 3 +- ansibleworks/ui/templates/ui/index.html | 2 +- 41 files changed, 197 insertions(+), 213 deletions(-) diff --git a/ansibleworks/settings/defaults.py b/ansibleworks/settings/defaults.py index a19c2569b1..c224f866e3 100644 --- a/ansibleworks/settings/defaults.py +++ b/ansibleworks/settings/defaults.py @@ -14,7 +14,7 @@ for setting in dir(global_settings): # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( diff --git a/ansibleworks/ui/static/js/controllers/Credentials.js b/ansibleworks/ui/static/js/controllers/Credentials.js index 163f005f21..5f19b903c6 100644 --- a/ansibleworks/ui/static/js/controllers/Credentials.js +++ b/ansibleworks/ui/static/js/controllers/Credentials.js @@ -54,7 +54,7 @@ function CredentialsList ($scope, $rootScope, $location, $log, $routeParams, Res var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -347,7 +347,7 @@ function CredentialsEdit ($scope, $rootScope, $compile, $location, $log, $routeP }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { @@ -406,4 +406,4 @@ function CredentialsEdit ($scope, $rootScope, $compile, $location, $log, $routeP CredentialsEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath' ]; - \ No newline at end of file + diff --git a/ansibleworks/ui/static/js/controllers/Inventories.js b/ansibleworks/ui/static/js/controllers/Inventories.js index e17ca20184..ce388c1032 100644 --- a/ansibleworks/ui/static/js/controllers/Inventories.js +++ b/ansibleworks/ui/static/js/controllers/Inventories.js @@ -54,7 +54,7 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -296,7 +296,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { @@ -342,7 +342,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP action: function(obj) { GroupsEdit({ "inventory_id": id, group_id: $(obj).attr('group_id') }); }, separator_before: true }, - delete: { + "delete": { label: 'Delete Group', action: function(obj) { GroupsDelete({ scope: scope, "inventory_id": id, group_id: $(obj).attr('group_id') }) } } @@ -421,4 +421,4 @@ InventoriesEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$l 'OrganizationList', 'TreeInit', 'GetBasePath', 'GroupsList', 'GroupsEdit', 'LoadInventory', 'GroupsDelete', 'HostsList', 'HostsAdd', 'HostsEdit', 'HostsDelete' ]; - \ No newline at end of file + diff --git a/ansibleworks/ui/static/js/controllers/JobTemplates.js b/ansibleworks/ui/static/js/controllers/JobTemplates.js index 2914310a37..9505cab3af 100644 --- a/ansibleworks/ui/static/js/controllers/JobTemplates.js +++ b/ansibleworks/ui/static/js/controllers/JobTemplates.js @@ -55,7 +55,7 @@ function JobTemplatesList ($scope, $rootScope, $location, $log, $routeParams, Re var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -469,7 +469,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { diff --git a/ansibleworks/ui/static/js/controllers/Jobs.js b/ansibleworks/ui/static/js/controllers/Jobs.js index 9d8c8f2d37..f45a7290fe 100644 --- a/ansibleworks/ui/static/js/controllers/Jobs.js +++ b/ansibleworks/ui/static/js/controllers/Jobs.js @@ -91,7 +91,7 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest, }); } else { - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -335,7 +335,7 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { diff --git a/ansibleworks/ui/static/js/controllers/Organizations.js b/ansibleworks/ui/static/js/controllers/Organizations.js index dce73783a0..9d98196bdf 100644 --- a/ansibleworks/ui/static/js/controllers/Organizations.js +++ b/ansibleworks/ui/static/js/controllers/Organizations.js @@ -59,7 +59,7 @@ function OrganizationsList ($scope, $rootScope, $location, $log, Rest, Alert, Lo var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -239,7 +239,7 @@ function OrganizationsEdit ($scope, $rootScope, $compile, $location, $log, $rout }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { diff --git a/ansibleworks/ui/static/js/controllers/Projects.js b/ansibleworks/ui/static/js/controllers/Projects.js index 11be08e5d7..4b50f32263 100644 --- a/ansibleworks/ui/static/js/controllers/Projects.js +++ b/ansibleworks/ui/static/js/controllers/Projects.js @@ -54,7 +54,7 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -293,7 +293,7 @@ function ProjectsEdit ($scope, $rootScope, $compile, $location, $log, $routePara }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { var action = function() { var url = GetBasePath('projects') + id + '/' + set + '/'; Rest.setUrl(url); diff --git a/ansibleworks/ui/static/js/controllers/Teams.js b/ansibleworks/ui/static/js/controllers/Teams.js index c3b1b86c0c..72df9aeaab 100644 --- a/ansibleworks/ui/static/js/controllers/Teams.js +++ b/ansibleworks/ui/static/js/controllers/Teams.js @@ -60,7 +60,7 @@ function TeamsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Ale var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -323,7 +323,7 @@ function TeamsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { @@ -355,4 +355,4 @@ TeamsEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', ' 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'TeamLookUpOrganizationInit', 'Prompt', 'GetBasePath' ]; - \ No newline at end of file + diff --git a/ansibleworks/ui/static/js/controllers/Users.js b/ansibleworks/ui/static/js/controllers/Users.js index 650d94587a..132007f250 100644 --- a/ansibleworks/ui/static/js/controllers/Users.js +++ b/ansibleworks/ui/static/js/controllers/Users.js @@ -46,7 +46,7 @@ function UsersList ($scope, $rootScope, $location, $log, $routeParams, Rest, var action = function() { var url = defaultUrl + id + '/'; Rest.setUrl(url); - Rest.delete() + Rest.destroy() .success( function(data, status, headers, config) { $('#prompt-modal').modal('hide'); scope.search(list.iterator); @@ -328,7 +328,7 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, }; // Related set: Delete button - scope.delete = function(set, itm_id, name, title) { + scope['delete'] = function(set, itm_id, name, title) { $rootScope.flashMessage = null; var action = function() { @@ -357,4 +357,4 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, UsersEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'UserForm', 'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope', 'GetBasePath']; - \ No newline at end of file + diff --git a/ansibleworks/ui/static/js/forms/Credentials.js b/ansibleworks/ui/static/js/forms/Credentials.js index 179bcd761b..67607c3a6b 100644 --- a/ansibleworks/ui/static/js/forms/Credentials.js +++ b/ansibleworks/ui/static/js/forms/Credentials.js @@ -4,6 +4,7 @@ * Credentials.js * Form definition for Credential model * + * * */ angular.module('CredentialFormDefinition', []) @@ -58,7 +59,7 @@ angular.module('CredentialFormDefinition', []) addRequired: false, editRequired: false, rows: 10, - class: 'span10' + "class": 'span10' }, "ssh_key_unlock": { label: 'Key Password', @@ -102,32 +103,13 @@ angular.module('CredentialFormDefinition', []) awPassMatch: true, associated: 'sudo_password' } - // , - // user: { - // label: 'User', - // type: 'lookup', - // sourceModel: 'user', - // sourceField: 'username', - // addRequired: false, - // editRequired: false, - // ngClick: 'lookUpUser()' - // }, - // team: { - // label: 'Team', - // type: 'lookup', - // sourceModel: 'team', - // sourceField: 'name', - // addRequired: false, - // editRequired: false, - // ngClick: 'lookUpTeam()' - // } }, buttons: { //for now always generates