Major rename of package from lib to ansibleworks.

This commit is contained in:
Chris Church
2013-05-21 18:20:26 -04:00
parent 5133b9a30e
commit aeac739735
264 changed files with 230 additions and 316 deletions

View File

@@ -0,0 +1,39 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Admins.js
* List view object for Admins data model.
*
*
*/
angular.module('AdminListDefinition', [])
.value(
'AdminList', {
name: 'admins',
iterator: 'admin',
selectTitle: 'Add Administrators',
editTitle: 'Admins',
selectInstructions: 'Click on a row to select it. Click the Finished button when done.',
base: 'users',
index: true,
fields: {
username: {
key: true,
label: 'Username'
},
first_name: {
label: 'First Name'
},
last_name: {
label: 'Last Name'
}
},
actions: {
},
fieldActions: {
}
});

View File

@@ -0,0 +1,68 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Credentials.js
* List view object for Credential data model.
*
*
*/
angular.module('CredentialsListDefinition', [])
.value(
'CredentialList', {
name: 'credentials',
iterator: 'credential',
selectTitle: 'Add Credentials',
editTitle: 'Credentials',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
},
team: {
label: 'Team',
ngBind: 'credential.summary_fields.team.name',
sourceModel: 'team',
sourceField: 'name'
},
user: {
label: 'User',
ngBind: 'credential.summary_fields.user.usename',
sourceModel: 'user',
sourceField: 'username'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addCredential()',
basePaths: ['credentials'], // base path must be in list, or action not available
class: 'btn-success',
awToolTip: 'Create a new credential'
}
},
fieldActions: {
edit: {
ngClick: "editCredential(\{\{ credential.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit credential'
},
delete: {
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete credential'
}
}
});

View File

@@ -0,0 +1,55 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Groups.js
* List view object for Group data model.
*
*
*/
angular.module('GroupListDefinition', [])
.value(
'GroupList', {
name: 'groups',
iterator: 'group',
selectTitle: 'Add Group',
editTitle: 'Groups',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addGroup()',
class: 'btn-success',
awToolTip: 'Create a new group'
}
},
fieldActions: {
edit: {
ngClick: "editGroup(\{\{ group.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit group'
},
delete: {
ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete group'
}
}
});

View File

@@ -0,0 +1,55 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Hosts.js
* List view object for Users data model.
*
*
*/
angular.module('HostListDefinition', [])
.value(
'HostList', {
name: 'hosts',
iterator: 'host',
selectTitle: 'Add Host',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
editTitle: 'Hosts',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addHost()',
class: 'btn-success',
awToolTip: 'Create a new host'
}
},
fieldActions: {
edit: {
ngClick: "editHost(\{\{ host.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit host'
},
delete: {
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete host'
}
}
});

View File

@@ -0,0 +1,61 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Inventories.js
* List view object for Inventories data model.
*
*
*/
angular.module('InventoriesListDefinition', [])
.value(
'InventoryList', {
name: 'inventories',
iterator: 'inventory',
selectTitle: 'Add Inventories',
editTitle: 'Inventories',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Descriptions'
},
organization: {
label: 'Organization',
ngBind: 'inventory.summary_fields.organization.name',
sourceModel: 'organization',
sourceField: 'name'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addInventory()',
class: 'btn-success',
awToolTip: 'Create a new row'
}
},
fieldActions: {
edit: {
ngClick: "editInventory(\{\{ inventory.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit inventory'
},
delete: {
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete'
}
}
});

View File

@@ -0,0 +1,62 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* JobTemplates.js
* List view object for Job Templates data model.
*
*
*/
angular.module('JobTemplatesListDefinition', [])
.value(
'JobTemplateList', {
name: 'job_templates',
iterator: 'job_template',
selectTitle: 'Add Job Template',
editTitle: 'Job Templates',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addJobTemplate()',
class: 'btn-success',
basePaths: ['job_templates'],
awToolTip: 'Create a new template'
}
},
fieldActions: {
edit: {
ngClick: "editJobTemplate(\{\{ job_template.id \}\})",
icon: 'icon-edit',
awToolTip: 'View/Edit template',
class: 'btn-mini'
},
submit: {
icon: 'icon-play',
mode: 'all',
class: 'btn-mini btn-success',
ngClick: 'submitJob(\{\{ job_template.id \}\})',
awToolTip: 'Create and run a job using this template'
},
delete: {
ngClick: "deleteJobTemplate(\{\{ job_template.id \}\},'\{\{ job_template.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger btn-mini',
awToolTip: 'Delete template'
}
}
});

View File

@@ -0,0 +1,85 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Jobs.js
* List view object for Team data model.
*
*
*/
angular.module('JobsListDefinition', [])
.value(
'JobList', {
name: 'jobs',
iterator: 'job',
editTitle: 'Jobs',
index: false,
hover: true,
class: 'jobs-table',
fields: {
id: {
label: 'Job ID',
key: true,
desc: true,
searchType: 'int'
},
name: {
label: 'Name',
link: true,
},
created: {
label: 'Creation Date',
link: true
},
status: {
label: 'Status',
icon: 'icon-circle',
class: 'job-\{\{ job.status \}\}'
}
},
actions: {
refresh: {
ngClick: "refreshJob(\{\{ job.id \}\})",
icon: 'icon-refresh',
awToolTip: 'Refresh the page',
mode: 'all'
}
},
fieldActions: {
edit: {
ngClick: "editJob(\{\{ job.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit detail',
},
summary: {
title: 'Summary',
icon: 'icon-filter',
ngClick: 'viewSummary(\{{ job.id \}\})',
class: 'btn-success btn-mini',
awToolTip: 'View host summary',
ngDisabled: "job.status == 'new'"
},
events: {
title: 'Detail',
icon: 'icon-list-ul',
mode: 'all',
ngClick: 'viewEvents(\{{ job.id \}\})',
class: 'btn-success btn-mini',
awToolTip: 'View events',
ngDisabled: "job.status == 'new'"
},
cancel: {
title: 'Cancel',
icon: 'icon-minus-sign',
mode: 'all',
ngClick: 'deleteJob(\{\{ job.id \}\})',
class: 'btn-danger btn-mini',
awToolTip: 'Cancel job',
ngDisabled: "job.status == 'error' || job.status == 'failed' || job.status == 'success'"
}
}
});

View File

@@ -0,0 +1,54 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Organizations.js
* List view object for Organizations data model.
*
*
*/
angular.module('OrganizationListDefinition', [])
.value(
'OrganizationList', {
name: 'organizations',
iterator: 'organization',
selectTitle: 'Add Organizations',
editTitle: 'Organizations',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Description'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addOrganization()',
class: 'btn-success',
awToolTip: 'Create a new row'
}
},
fieldActions: {
edit: {
ngClick: "editOrganization(\{\{ organization.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit organization'
},
delete: {
ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete organization'
}
}
});

View File

@@ -0,0 +1,55 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Projects.js
* List view object for Project data model.
*
*
*/
angular.module('ProjectsListDefinition', [])
.value(
'ProjectList', {
name: 'projects',
iterator: 'project',
selectTitle: 'Add Project',
editTitle: '{{ name }}',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Descriptions'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addProject()',
class: 'btn-success',
awToolTip: 'Create a new project'
}
},
fieldActions: {
edit: {
ngClick: "editProject(\{\{ project.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/edit project'
},
delete: {
ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete project'
}
}
});

View File

@@ -0,0 +1,61 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Teams.js
* List view object for Team data model.
*
*
*/
angular.module('TeamsListDefinition', [])
.value(
'TeamList', {
name: 'teams',
iterator: 'team',
selectTitle: 'Add Team',
editTitle: 'Teams',
selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new row.',
index: true,
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Descriptions'
},
organization: {
label: 'Organization',
ngBind: 'team.organization_name',
sourceModel: 'organization',
sourceField: 'name'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addTeam()',
class: 'btn-success',
awToolTip: 'Create a new team'
}
},
fieldActions: {
edit: {
ngClick: "editTeam(\{\{ team.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit team'
},
delete: {
ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete team'
}
}
});

View File

@@ -0,0 +1,60 @@
/*********************************************
* Copyright (c) 2013 AnsibleWorks, Inc.
*
* Users.js
* List view object for Users data model.
*
*
*/
angular.module('UserListDefinition', [])
.value(
'UserList', {
name: 'users',
iterator: 'user',
selectTitle: 'Add Users',
editTitle: 'Users',
selectInstructions: 'Check the Select checkbox next to each user to be added, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new user.',
editInstructions: 'Create new users from the Organizations tab. Each Organization has an associated list of Users.',
index: true,
fields: {
username: {
key: true,
label: 'Username'
},
first_name: {
label: 'First Name'
},
last_name: {
label: 'Last Name'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'select', // One of: edit, select, all
ngClick: 'addUser()',
basePaths: ['organizations'], // base path must be in list, or action not available
class: 'btn-success',
awToolTip: 'Create a new user'
}
},
fieldActions: {
edit: {
ngClick: "editUser(\{\{ user.id \}\})",
icon: 'icon-edit',
class: 'btn-mini',
awToolTip: 'View/Edit user'
},
delete: {
ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')",
icon: 'icon-remove',
class: 'btn-mini btn-danger',
awToolTip: 'Delete user'
}
}
});