Script for building minified javascript using closure compiler

This commit is contained in:
chouseknecht 2013-06-10 18:31:17 -04:00
parent cba55a061a
commit 9e9e41db35
41 changed files with 197 additions and 213 deletions

View File

@ -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 = (

View File

@ -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' ];

View File

@ -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'
];

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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);

View File

@ -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'
];

View File

@ -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'];

View File

@ -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 <button> tags
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},

View File

@ -4,7 +4,7 @@
* Groups.js
* Form definition for Group model
*
*
*
*/
angular.module('GroupFormDefinition', [])
.value(
@ -34,7 +34,7 @@ angular.module('GroupFormDefinition', [])
addRequired: false,
editRequird: false,
rows: 10,
default: "\{\}",
"default": "\{\}",
dataTitle: 'Group Variables',
dataPlacement: 'right',
awPopOver: '<p>Enter variables as JSON. Both the key and value must be wrapped in double quotes. ' +
@ -49,7 +49,7 @@ angular.module('GroupFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn btn-success',
"class": 'btn btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},

View File

@ -4,7 +4,7 @@
* Hosts.js
* Form definition for Host model
*
*
*
*/
angular.module('HostFormDefinition', [])
.value(
@ -39,7 +39,7 @@ angular.module('HostFormDefinition', [])
addRequired: false,
editRequird: false,
rows: 10,
default: "\{\}",
"default": "\{\}",
awPopOver: "<p>Enter variables as JSON. Both the key and value must be wrapped in double quotes. " +
"Separate variables with commas, and wrap the entire string with { }. " +
"&nbsp;For example:</p><p>{<br\>&quot;ntp_server&quot;: &quot;ntp.example.com&quot;,<br \>" +
@ -54,7 +54,7 @@ angular.module('HostFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},

View File

@ -4,7 +4,7 @@
* Inventories.js
* Form definition for User model
*
*
*
*/
angular.module('InventoryFormDefinition', [])
.value(
@ -49,7 +49,7 @@ angular.module('InventoryFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -100,14 +100,14 @@ angular.module('InventoryFormDefinition', [])
ngClick: "editHost(\{\{ host.id \}\}, '\{\{ host.name \}\}')",
icon: 'icon-edit',
label: 'Edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Edit host'
},
delete: {
"delete": {
ngClick: "deleteHost(\{\{ host.id \}\}, '\{\{ host.name \}\}')",
icon: 'icon-remove',
label: 'Delete',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove host'
}
}

View File

@ -4,7 +4,7 @@
* JobEvents.js
* Form definition for Job Events model
*
*
*
*/
angular.module('JobEventFormDefinition', [])
.value(
@ -19,7 +19,7 @@ angular.module('JobEventFormDefinition', [])
label: 'Event ID',
type: 'text',
readonly: true,
class: 'span2'
"class": 'span2'
},
event_display: {
label: 'Event',
@ -30,7 +30,7 @@ angular.module('JobEventFormDefinition', [])
label: 'Created',
type: 'text',
readonly: true,
class: 'span4'
"class": 'span4'
},
host: {
label: 'Host',
@ -40,13 +40,13 @@ angular.module('JobEventFormDefinition', [])
status: {
label: 'Status',
type: 'text',
class: 'job-\{\{ event_status \}\}',
"class": 'job-\{\{ event_status \}\}',
readonly: true
},
event_data: {
label: 'Event Data',
type: 'textarea',
class: 'span12',
"class": 'span12',
rows: 10,
readonly: true
}

View File

@ -4,7 +4,7 @@
* JobEvents.js
* Form definition for Job Events model
*
*
* @dict
*/
angular.module('JobEventFormDefinition', [])
.value(

View File

@ -4,7 +4,7 @@
* JobTemplates.js
* Form definition for Job Template model
*
*
*
*/
angular.module('JobTemplateFormDefinition', [])
.value(
@ -35,7 +35,7 @@ angular.module('JobTemplateFormDefinition', [])
label: 'Job Type',
type: 'select',
ngOptions: 'type.label for type in job_type_options',
default: 0,
"default": 0,
addRequired: true,
editRequired: true,
column: 1,
@ -92,8 +92,8 @@ angular.module('JobTemplateFormDefinition', [])
min: 0,
max: 100,
slider: true,
class: 'input-mini',
default: '0',
"class": 'input-mini',
"default": '0',
addRequired: false,
editRequired: false,
column: 2,
@ -119,7 +119,7 @@ angular.module('JobTemplateFormDefinition', [])
label: 'Verbosity',
type: 'select',
ngOptions: 'v.label for v in verbosity_options',
default: 0,
"default": 0,
addRequired: true,
editRequired: true,
column: 2,
@ -131,10 +131,10 @@ angular.module('JobTemplateFormDefinition', [])
label: 'Extra Variables',
type: 'textarea',
rows: 6,
class: 'span12',
"class": 'span12',
addRequired: false,
editRequired: false,
default: "\{\}",
"default": "\{\}",
column: 2,
awPopOver: "<p>Enter variables as JSON. Both the key and value must be wrapped in double quotes. " +
"Separate variables with commas, and wrap the entire string with { }. " +
@ -150,7 +150,7 @@ angular.module('JobTemplateFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -190,7 +190,7 @@ angular.module('JobTemplateFormDefinition', [])
icon: 'icon-zoom-in'
}
}
},
}
}
}); //InventoryForm

View File

@ -4,7 +4,7 @@
* Jobs.js
* Form definition for Jobs model
*
*
* @dict
*/
angular.module('JobFormDefinition', [])
.value(
@ -35,7 +35,7 @@ angular.module('JobFormDefinition', [])
label: 'Job Type',
type: 'select',
ngOptions: 'type.label for type in job_type_options',
default: 'run',
"default": 'run',
addRequired: true,
editRequired: true,
column: 1
@ -87,8 +87,8 @@ angular.module('JobFormDefinition', [])
min: 0,
max: 100,
slider: true,
class: 'input-mini',
default: '0',
"class": 'input-mini',
"default": '0',
addRequired: false,
editRequired: false,
column: 2,
@ -114,7 +114,7 @@ angular.module('JobFormDefinition', [])
label: 'Verbosity',
type: 'select',
ngOptions: 'v.label for v in verbosity_options',
default: 0,
"default": 0,
addRequired: true,
editRequired: true,
column: 2,
@ -126,7 +126,7 @@ angular.module('JobFormDefinition', [])
label: 'Extra Variables',
type: 'textarea',
rows: 6,
class: 'span12',
"class": 'span12',
addRequired: false,
editRequired: false,
column: 2
@ -137,7 +137,7 @@ angular.module('JobFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -161,14 +161,14 @@ angular.module('JobFormDefinition', [])
type: 'textarea',
readonly: true,
rows: 20,
class: 'span12'
"class": 'span12'
},
result_traceback: {
label: 'Traceback',
type: 'textarea',
readonly: true,
rows: 10,
class: 'span12',
"class": 'span12',
ngShow: "result_traceback != ''"
}
},
@ -178,7 +178,7 @@ angular.module('JobFormDefinition', [])
label: 'Refresh',
icon: 'icon-refresh',
ngClick: "refresh()",
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'Refresh job status &amp; output',
mode: 'all'
},
@ -186,7 +186,7 @@ angular.module('JobFormDefinition', [])
label: 'Hosts',
icon: 'icon-th-large',
ngClick: "jobSummary()",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'View host summary',
mode: 'all'
},
@ -194,9 +194,9 @@ angular.module('JobFormDefinition', [])
label: 'Events',
icon: 'icon-list-ul',
ngClick: "jobEvents()",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'Edit job events',
mode: 'all',
mode: 'all'
}
},

View File

@ -4,7 +4,7 @@
* Organization.js
* Form definition for Organization model
*
*
*
*/
angular.module('OrganizationFormDefinition', [])
.value(
@ -35,7 +35,7 @@ angular.module('OrganizationFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -61,7 +61,7 @@ angular.module('OrganizationFormDefinition', [])
label: 'Add',
icon: 'icon-plus',
awToolTip: 'Add a new user'
},
}
},
fields: {
@ -82,14 +82,14 @@ angular.module('OrganizationFormDefinition', [])
label: 'Edit',
ngClick: "edit('users', \{\{ user.id \}\}, '\{\{ user.username \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Edit user'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('users', \{\{ user.id \}\}, '\{\{ user.username \}\}', 'users')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove user'
}
}
@ -126,14 +126,14 @@ angular.module('OrganizationFormDefinition', [])
label: 'Edit',
ngClick: "edit('users', \{\{ admin.id \}\}, '\{\{ admin.username \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Edit administrator'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('admins', \{\{ admin.id \}\}, '\{\{ admin.username \}\}', 'administrators')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove administrator'
}
}

View File

@ -5,6 +5,7 @@
*
* Form definition for Projects model
*
*
*/
angular.module('ProjectFormDefinition', [])
.value(
@ -41,7 +42,7 @@ angular.module('ProjectFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},

View File

@ -4,7 +4,7 @@
* Teams.js
* Form definition for Team model
*
*
*
*/
angular.module('TeamFormDefinition', [])
.value(
@ -44,7 +44,7 @@ angular.module('TeamFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -70,7 +70,7 @@ angular.module('TeamFormDefinition', [])
icon: 'icon-plus',
label: 'Add',
awToolTip: 'Add a user'
},
}
},
fields: {
@ -91,14 +91,14 @@ angular.module('TeamFormDefinition', [])
label: 'Edit',
ngClick: "edit('users', \{\{ user.id \}\}, '\{\{ user.username \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Edit user'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('users', \{\{ user.id \}\}, '\{\{ user.username \}\}', 'users')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove user'
}
}
@ -116,7 +116,7 @@ angular.module('TeamFormDefinition', [])
icon: 'icon-plus',
label: 'Add',
add: 'Add a new credential'
},
}
},
fields: {
@ -134,14 +134,14 @@ angular.module('TeamFormDefinition', [])
label: 'Edit',
ngClick: "edit('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Modify the credential'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove the credential'
}
}
@ -158,7 +158,7 @@ angular.module('TeamFormDefinition', [])
ngClick: "add('projects')",
icon: 'icon-plus',
label: 'Add'
},
}
},
fields: {
@ -176,14 +176,14 @@ angular.module('TeamFormDefinition', [])
label: 'Edit',
ngClick: "edit('projects', \{\{ project.id \}\}, '\{\{ project.name \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Modify the project'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('projects', \{\{ project.id \}\}, '\{\{ project.name \}\}', 'projects')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Remove the project'
}
}

View File

@ -4,7 +4,7 @@
* Users.js
* Form definition for User model
*
*
*
*/
angular.module('UserFormDefinition', [])
.value(
@ -72,7 +72,7 @@ angular.module('UserFormDefinition', [])
type: 'checkbox',
trueValue: 'true',
falseValue: 'false',
default: 'false',
"default": 'false',
ngShow: "current_user['is_superuser'] == true"
}
},
@ -81,7 +81,7 @@ angular.module('UserFormDefinition', [])
save: {
label: 'Save',
icon: 'icon-ok',
class: 'btn-success',
"class": 'btn-success',
ngClick: 'formSave()', //$scope.function to call on click, optional
ngDisabled: true //Disable when $pristine or $invalid, optional
},
@ -106,7 +106,7 @@ angular.module('UserFormDefinition', [])
icon: 'icon-plus',
label: 'Add',
awToolTip: 'Add a credential for this user'
},
}
},
fields: {
@ -124,14 +124,14 @@ angular.module('UserFormDefinition', [])
label: 'Edit',
ngClick: "edit('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}')",
icon: 'icon-edit',
class: 'btn-success',
"class": 'btn-success',
awToolTip: 'Edit the credential'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')",
icon: 'icon-remove',
class: 'btn-danger',
"class": 'btn-danger',
awToolTip: 'Delete the credential'
}
}
@ -152,7 +152,7 @@ angular.module('UserFormDefinition', [])
},
description: {
label: 'Description'
},
}
}
},

View File

@ -98,9 +98,9 @@ angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFo
}
}])
.factory('SubmitJob',['PromptPasswords', 'CredentialForm', '$compile', 'Rest', '$location', 'GetBasePath', 'CredentialList',
.factory('SubmitJob',['PromptPasswords', '$compile', 'Rest', '$location', 'GetBasePath', 'CredentialList',
'LookUpInit', 'JobTemplateForm', 'ProcessErrors',
function(PromptPasswords, JobTemplateForm, $compile, Rest, $location, GetBasePath, CredentialList, LookUpInit, JobTemplateForm,
function(PromptPasswords, $compile, Rest, $location, GetBasePath, CredentialList, LookUpInit, JobTemplateForm,
ProcessErrors) {
return function(params) {
var scope = params.scope;
@ -111,7 +111,9 @@ angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFo
function postJob(data) {
// Create the job record
(scope.credentialWatchRemove) ? scope.credentialWatchRemove() : null;
if (scope.credentialWatchRemove) {
scope.credentialWatchRemove();
}
var dt = new Date().toISOString();
var url = (data.related.jobs) ? data.related.jobs : data.related.job_template + 'jobs/';
var name = (template_name) ? template_name : data.name;

View File

@ -4,7 +4,7 @@
* Admins.js
* List view object for Admins data model.
*
*
* @dict
*/
angular.module('AdminListDefinition', [])
.value(

View File

@ -4,7 +4,7 @@
* Credentials.js
* List view object for Credential data model.
*
*
* @dict
*/
angular.module('CredentialsListDefinition', [])
.value(
@ -48,7 +48,7 @@ angular.module('CredentialsListDefinition', [])
mode: 'all', // One of: edit, select, all
ngClick: 'addCredential()',
basePaths: ['teams','users'], // base path must be in list, or action not available
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new credential'
}
},
@ -58,15 +58,15 @@ angular.module('CredentialsListDefinition', [])
ngClick: "editCredential(\{\{ credential.id \}\})",
icon: 'icon-edit',
label: 'Edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit credential'
},
delete: {
"delete": {
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
icon: 'icon-remove',
label: 'Delete',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete credential'
}
}

View File

@ -4,7 +4,7 @@
* Groups.js
* List view object for Group data model.
*
*
*
*/
angular.module('GroupListDefinition', [])
.value(
@ -34,7 +34,7 @@ angular.module('GroupListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'createGroup()',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new group'
}
},
@ -44,15 +44,15 @@ angular.module('GroupListDefinition', [])
label: 'Edit',
ngClick: "editGroup(\{\{ group.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit group'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete group'
}
}

View File

@ -4,7 +4,7 @@
* Hosts.js
* List view object for Users data model.
*
*
*
*/
angular.module('HostListDefinition', [])
.value(
@ -36,7 +36,7 @@ angular.module('HostListDefinition', [])
mode: 'all', // One of: edit, select, all
ngClick: 'createHost()',
ngHide: 'showAddButton == false',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new host'
}
},
@ -46,15 +46,15 @@ angular.module('HostListDefinition', [])
label: 'Edit',
ngClick: "editHost(\{\{ host.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit host'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete host'
}
}

View File

@ -4,7 +4,7 @@
* Inventories.js
* List view object for Inventories data model.
*
*
*
*/
angular.module('InventoriesListDefinition', [])
.value(
@ -40,7 +40,7 @@ angular.module('InventoriesListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addInventory()',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'Create a new row'
}
},
@ -50,15 +50,15 @@ angular.module('InventoriesListDefinition', [])
label: 'Edit',
ngClick: "editInventory(\{\{ inventory.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit inventory'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete'
}
}

View File

@ -4,7 +4,7 @@
* Jobs.js
* List view object for Team data model.
*
*
*
*/
angular.module('JobEventsListDefinition', [])
.value(
@ -28,7 +28,7 @@ angular.module('JobEventsListDefinition', [])
link: true
},
created: {
label: 'Creation Date',
label: 'Creation Date'
},
host: {
label: 'Host',
@ -40,7 +40,7 @@ angular.module('JobEventsListDefinition', [])
status: {
label: 'Status',
icon: 'icon-circle',
class: 'job-\{\{ jobevent.status \}\}',
"class": 'job-\{\{ jobevent.status \}\}',
searchField: 'failed',
searchType: 'boolean',
searchOptions: [{ name: "success", value: 0 }, { name: "error", value: 1 }]
@ -53,14 +53,14 @@ angular.module('JobEventsListDefinition', [])
icon: 'icon-refresh',
label: 'Refresh',
awToolTip: 'Refresh the page',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
mode: 'all'
},
edit: {
label: 'Edit',
ngClick: "jobDetails()",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'Edit job details',
mode: 'all'
},
@ -68,7 +68,7 @@ angular.module('JobEventsListDefinition', [])
label: 'Hosts',
icon: 'icon-th-large',
ngClick: "jobSummary()",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'View host summary',
mode: 'all'
}
@ -79,8 +79,8 @@ angular.module('JobEventsListDefinition', [])
label: 'View',
ngClick: "editJobEvent(\{\{ jobevent.id \}\})",
icon: 'icon-zoom-in',
class: 'btn-small',
awToolTip: 'View event details',
},
"class": 'btn-small',
awToolTip: 'View event details'
}
}
});

View File

@ -4,7 +4,7 @@
* JobHosts.js
* List view object for Job Host Summary data model.
*
*
*
*/
angular.module('JobHostDefinition', [])
.value(
@ -53,7 +53,7 @@ angular.module('JobHostDefinition', [])
label: 'Refresh',
icon: 'icon-refresh',
ngClick: "refresh()",
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Refresh the page',
mode: 'all'
},
@ -61,7 +61,7 @@ angular.module('JobHostDefinition', [])
label: 'Edit',
icon: 'icon-edit',
ngClick: "jobDetails()",
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Edit job details',
mode: 'all'
},
@ -69,9 +69,9 @@ angular.module('JobHostDefinition', [])
label: 'Events',
icon: 'icon-list-ul',
ngClick: "jobEvents()",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'View job events',
mode: 'all',
mode: 'all'
}
},

View File

@ -4,7 +4,7 @@
* JobTemplates.js
* List view object for Job Templates data model.
*
*
*
*/
angular.module('JobTemplatesListDefinition', [])
.value(
@ -34,7 +34,7 @@ angular.module('JobTemplatesListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addJobTemplate()',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
basePaths: ['job_templates'],
awToolTip: 'Create a new template'
}
@ -46,21 +46,21 @@ angular.module('JobTemplatesListDefinition', [])
ngClick: "editJobTemplate(\{\{ job_template.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit template',
class: 'btn-small btn-success'
"class": 'btn-small btn-success'
},
submit: {
label: 'Launch',
icon: 'icon-rocket',
mode: 'all',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
ngClick: 'submitJob(\{\{ job_template.id \}\})',
awToolTip: 'Start a job using this template'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteJobTemplate(\{\{ job_template.id \}\},'\{\{ job_template.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger btn-small',
"class": 'btn-danger btn-small',
awToolTip: 'Delete template'
}
}

View File

@ -4,7 +4,7 @@
* Jobs.js
* List view object for Team data model.
*
*
*
*/
angular.module('JobsListDefinition', [])
.value(
@ -15,7 +15,7 @@ angular.module('JobsListDefinition', [])
editTitle: 'Jobs',
index: false,
hover: true,
class: 'jobs-table',
"class": 'jobs-table',
fields: {
id: {
@ -26,7 +26,7 @@ angular.module('JobsListDefinition', [])
},
name: {
label: 'Name',
link: true,
link: true
},
created: {
label: 'Creation Date',
@ -35,7 +35,7 @@ angular.module('JobsListDefinition', [])
status: {
label: 'Status',
icon: 'icon-circle',
class: 'job-\{\{ job.status \}\}',
"class": 'job-\{\{ job.status \}\}',
searchType: 'select',
searchOptions: [
{ name: "new", value: "new" },
@ -51,7 +51,7 @@ angular.module('JobsListDefinition', [])
actions: {
refresh: {
label: 'Refresh',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
ngClick: "refreshJob(\{\{ job.id \}\})",
icon: 'icon-refresh',
awToolTip: 'Refresh the page',
@ -64,7 +64,7 @@ angular.module('JobsListDefinition', [])
label: 'Hosts',
icon: 'icon-th-large',
ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.name \}\}')",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'View host summary',
ngDisabled: "job.status == 'new'"
},
@ -73,7 +73,7 @@ angular.module('JobsListDefinition', [])
icon: 'icon-list-ul',
mode: 'all',
ngClick: "viewEvents(\{{ job.id \}\}, '\{\{ job.name \}\}')",
class: 'btn-info btn-small',
"class": 'btn-info btn-small',
awToolTip: 'View events',
ngDisabled: "job.status == 'new'"
},
@ -81,23 +81,23 @@ angular.module('JobsListDefinition', [])
icon: 'icon-edit',
label: 'Edit',
ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.name \}\}')",
class: 'btn-success btn-small',
awToolTip: 'Edit job details',
"class": 'btn-success btn-small',
awToolTip: 'Edit job details'
},
rerun: {
icon: 'icon-retweet',
mode: 'all',
ngClick: "submitJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}' )",
class: 'btn-success btn-small',
awToolTip: 'Re-run this job',
"class": 'btn-success btn-small',
awToolTip: 'Re-run this job'
},
cancel: {
icon: 'icon-minus-sign',
mode: 'all',
ngClick: 'deleteJob(\{\{ job.id \}\})',
class: 'btn-danger btn-small',
"class": 'btn-danger btn-small',
awToolTip: 'Cancel job',
ngDisabled: "job.status != 'new' && job.status != 'pending' && job.status != 'running'"
},
}
}
});

View File

@ -4,7 +4,7 @@
* Organizations.js
* List view object for Organizations data model.
*
*
*
*/
angular.module('OrganizationListDefinition', [])
.value(
@ -33,7 +33,7 @@ angular.module('OrganizationListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addOrganization()',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new row'
}
},
@ -43,15 +43,15 @@ angular.module('OrganizationListDefinition', [])
label: 'Edit',
ngClick: "editOrganization(\{\{ organization.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit organization'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete organization'
}
}

View File

@ -34,7 +34,7 @@ angular.module('ProjectsListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addProject()',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new project'
}
},
@ -44,15 +44,15 @@ angular.module('ProjectsListDefinition', [])
label: 'Edit',
ngClick: "editProject(\{\{ project.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/edit project'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete project'
}
}

View File

@ -4,7 +4,7 @@
* Teams.js
* List view object for Team data model.
*
*
*
*/
angular.module('TeamsListDefinition', [])
.value(
@ -40,7 +40,7 @@ angular.module('TeamsListDefinition', [])
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addTeam()',
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new team'
}
},
@ -50,15 +50,15 @@ angular.module('TeamsListDefinition', [])
label: 'Edit',
ngClick: "editTeam(\{\{ team.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit team'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete team'
}
}

View File

@ -4,7 +4,7 @@
* Users.js
* List view object for Users data model.
*
*
*
*/
angular.module('UserListDefinition', [])
.value(
@ -38,7 +38,7 @@ angular.module('UserListDefinition', [])
mode: 'all', // One of: edit, select, all
ngClick: 'addUser()',
basePaths: ['organizations','users'], // base path must be in list, or action not available
class: 'btn-success btn-small',
"class": 'btn-success btn-small',
awToolTip: 'Create a new user'
}
},
@ -48,15 +48,15 @@ angular.module('UserListDefinition', [])
label: 'Edit',
ngClick: "editUser(\{\{ user.id \}\})",
icon: 'icon-edit',
class: 'btn-small btn-success',
"class": 'btn-small btn-success',
awToolTip: 'View/Edit user'
},
delete: {
"delete": {
label: 'Delete',
ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')",
icon: 'icon-remove',
class: 'btn-small btn-danger',
"class": 'btn-small btn-danger',
awToolTip: 'Delete user'
}
}

View File

@ -73,7 +73,7 @@ angular.module('AuthService', ['ngCookies'])
return $http({
method: 'GET',
url: '/api/v1/me/',
headers: { 'Authorization': 'Token ' + this.getToken() },
headers: { 'Authorization': 'Token ' + this.getToken() }
});
},

View File

@ -106,12 +106,12 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
applyDefaults: function() {
for (fld in this.form.fields) {
if (this.form.fields[fld].default || this.form.fields[fld].default == 0) {
if (this.form.fields[fld]['default'] || this.form.fields[fld]['default'] == 0) {
if (this.form.fields[fld].type == 'select' && this.scope[fld + '_options']) {
this.scope[fld] = this.scope[fld + '_options'][this.form.fields[fld].default];
this.scope[fld] = this.scope[fld + '_options'][this.form.fields[fld]['default']];
}
else {
this.scope[fld] = this.form.fields[fld].default;
this.scope[fld] = this.form.fields[fld]['default'];
}
}
}
@ -166,7 +166,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
}
html += "<input type=\"text\" name=\"" + fld + "\" ";
html += "ng-model=\"" + fld + "\" ";
html += (field.class) ? this.attr(field, "class") : "";
html += (field['class']) ? this.attr(field, "class") : "";
html += " readonly />\n";
return html;
},
@ -203,7 +203,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
html += 'name="' + fld + '" ';
html += (field.ngChange) ? this.attr(field,'ngChange') : "";
html += (field.id) ? this.attr(field,'id') : "";
html += (field.class) ? this.attr(field, 'class') : "";
html += (field['class']) ? this.attr(field, 'class') : "";
html += (field.placeholder) ? this.attr(field,'placeholder') : "";
html += (options.mode == 'edit' && field.editRequired) ? "required " : "";
html += (options.mode == 'add' && field.addRequired) ? "required " : "";
@ -262,7 +262,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
html += (field.rows) ? this.attr(field, 'rows') : "";
html += "ng-model=\"" + fld + '" ';
html += 'name="' + fld + '" ';
html += (field.class) ? this.attr(field,'class') : "";
html += (field['class']) ? this.attr(field,'class') : "";
html += (field.ngChange) ? this.attr(field,'ngChange') : "";
html += (field.id) ? this.attr(field,'id') : "";
html += (field.placeholder) ? this.attr(field,'placeholder') : "";
@ -337,8 +337,8 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
html += "<div class=\"controls\">\n";
// Use 'text' rather than 'number' so that our integer directive works correctly
html += (field.slider) ? "<div class=\"slider\" id=\"" + fld + "-slider\"></div>\n" : "";
html += "<input type=\"text\" value=\"" + field.default + "\" ";
html += (field.class) ? this.attr(field, 'class') : "";
html += "<input type=\"text\" value=\"" + field['default'] + "\" ";
html += (field['class']) ? this.attr(field, 'class') : "";
html += (field.slider) ? "ng-slider=\"" + fld + "\" " : "";
html += "ng-model=\"" + fld + '" ';
html += 'name="' + fld + '" ';
@ -483,7 +483,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
for (action in this.form.statusActions) {
act = this.form.statusActions[action];
html += "<button " + this.attr(act, 'ngClick') + "class=\"btn";
html += (act.class) ? " " + act.class : "";
html += (act['class']) ? " " + act['class'] : "";
html += "\" ";
html += (act.awToolTip) ? this.attr(act,'awToolTip') : "";
html += (act.awToolTip) ? "data-placement=\"top\" " : "";
@ -572,7 +572,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
//button
html += "<button ";
html += "class=\"btn btn-small";
html += (button.class) ? " " + button.class : "";
html += (button['class']) ? " " + button['class'] : "";
html += "\" ";
if (button.ngClick) {
html += this.attr(button,'ngClick');
@ -759,8 +759,8 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
html += "<td class=\"actions\">";
for (action in form.related[itm].fieldActions) {
html += "<button class=\"btn btn-mini";
html += (form.related[itm]['fieldActions'][action].class) ?
" " + form.related[itm]['fieldActions'][action].class : "";
html += (form.related[itm]['fieldActions'][action]['class']) ?
" " + form.related[itm]['fieldActions'][action]['class'] : "";
html += "\" ";
html += (form.related[itm]['fieldActions'][action].awToolTip) ? this.attr(form.related[itm]['fieldActions'][action],'awToolTip') : "";
html += this.attr(form.related[itm]['fieldActions'][action],'ngClick') +
@ -919,7 +919,7 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
for (act in form.related[itm].fieldActions) {
var action = form.related[itm].fieldActions[act];
html += "<button class=\"btn btn-small";
html += (action.class) ? " " + action.class : "";
html += (action['class']) ? " " + action['class'] : "";
html += "\" " + this.attr(action,'ngClick');
html += (action.awToolTip) ? this.attr(action,'awToolTip') : "";
html += (action.awToolTip) ? "data-placement=\"top\" " : "";

View File

@ -7,7 +7,7 @@
*
*/
angular.module('ListGenerator', ['GeneratorHelpers',])
angular.module('ListGenerator', ['GeneratorHelpers'])
.factory('GenerateList', [ '$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget',
function($location, $compile, $rootScope, SearchWidget, PaginateWidget) {
return {
@ -153,7 +153,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
if ( (list.actions[action].basePaths == undefined) ||
(list.actions[action].basePaths && list.actions[action].basePaths.indexOf(base) > -1) ) {
html += "<button " + this.attr(list.actions[action], 'ngClick') + "class=\"btn";
html += (list.actions[action].class) ? " " + list.actions[action].class : " btn-small";
html += (list.actions[action]['class']) ? " " + list.actions[action]['class'] : " btn-small";
html += "\" ";
html += (list.actions[action].ngHide) ? this.attr(list.actions[action],'ngHide') : "";
html += (list.actions[action].awToolTip) ? this.attr(list.actions[action],'awToolTip') : "";
@ -173,7 +173,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
// table header row
html += "<table class=\"table table-condensed"
html += (list.class) ? " " + list.class : "";
html += (list['class']) ? " " + list['class'] : "";
html += (options.mode == 'lookup' || list.hover) ? " table-hover" : "";
html += "\">\n";
html += "<thead>\n";
@ -213,7 +213,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
cnt++;
html += "<td ";
html += "<td class=\"" + fld + "-column";
html += (list.fields[fld].class) ? " " + list.fields[fld].class : "";
html += (list.fields[fld]['class']) ? " " + list.fields[fld]['class'] : "";
html += "\" ";
html += (list.fields[fld].ngClass) ? this.attr(list.fields[fld], 'ngClass') : "";
html += ">\n";
@ -250,7 +250,7 @@ angular.module('ListGenerator', ['GeneratorHelpers',])
html += "<td class=\"actions\">";
for (action in list.fieldActions) {
html += "<button class=\"btn";
html += (list.fieldActions[action].class) ? " " + list.fieldActions[action].class : " btn-small";
html += (list.fieldActions[action]['class']) ? " " + list.fieldActions[action]['class'] : " btn-small";
html += "\" " + this.attr(list.fieldActions[action],'ngClick');
html += (list.fieldActions[action].ngShow) ? this.attr(list.fieldActions[action],'ngShow') : "";
html += (list.fieldActions[action].awToolTip) ? this.attr(list.fieldActions[action],'awToolTip') : "";

View File

@ -23,7 +23,7 @@ angular.module('PromptDialog', [])
var scope = dialog.scope();
scope.promptHeader = params.hdr;
scope.promptBody = params.body;
var cls = (params.class == null || params.class == undefined) ? 'btn-danger' : params.class;
var cls = (params['class'] == null || params['class'] == undefined) ? 'btn-danger' : params['class'];
$('#prompt-action-btn').addClass(cls); //Use jquery because django template engine conflicts with Angular's
// use of {{...}}
//scope.id = params.id;

View File

@ -20,7 +20,6 @@ angular.module('RestServices',['ngCookies','AuthService'])
var key,rgx;
for (key in this.params) {
rgx = new RegExp("\\:" + key,'gm');
rgx.compile;
if (rgx.test(this.url)) {
this.url = this.url.replace(rgx,this.params[key]);
delete this.params[key];
@ -51,7 +50,7 @@ angular.module('RestServices',['ngCookies','AuthService'])
data: data });
},
delete: function(data) {
destroy: function(data) {
var url = this.url;
return $http({method: 'DELETE',
url: url,

View File

@ -15,7 +15,7 @@
<script src="{{ STATIC_URL }}lib/angular/angular-resource.js"></script>
<script src="{{ STATIC_URL }}lib/angular/angular-cookies.js"></script>
{% if 0 and not settings.DEBUG %} {# FIXME: Change to use minified JS once we are building it. #}
<script src="{{ STATIC_URL }}js/ansible.min.js"></script> <!-- FIXME: Change to whatever we end up calling the minified file. -->
<script src="{{ STATIC_URL }}js/ansibleworks-min.js"></script> <!-- FIXME: Change to whatever we end up calling the minified file. -->
{% else %}
<script src="{{ STATIC_URL }}js/app.js"></script>
<script src="{{ STATIC_URL }}lib/ansible/authenticate.js"></script>