Moved UI into its own Django app.

This commit is contained in:
Chris Church
2013-05-08 11:41:00 -04:00
parent 839d681b70
commit eff2e65c9a
170 changed files with 88490 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*********************************************
* 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 the Select checkbox next to each user to be added. Click the Finished button when done.',
fields: {
username: {
key: true,
label: 'Username'
},
first_name: {
label: 'First Name'
},
last_name: {
label: 'Last Name'
}
},
actions: {
},
fieldActions: {
}
});

View File

@@ -0,0 +1,52 @@
/*********************************************
* 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',
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 btn-mini btn-success',
awToolTip: 'Create a new group'
}
},
fieldActions: {
edit: {
ngClick: "editGroup(\{\{ group.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit group'
},
delete: {
ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete group'
}
}
});

View File

@@ -0,0 +1,52 @@
/*********************************************
* 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',
editTitle: 'Hosts',
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 btn-mini btn-success',
awToolTip: 'Create a new host'
}
},
fieldActions: {
edit: {
ngClick: "editHost(\{\{ host.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit host'
},
delete: {
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete host'
}
}
});

View File

@@ -0,0 +1,59 @@
/*********************************************
* 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: 'Check the Select checkbox next to each inventory to be added, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new inventory.',
fields: {
name: {
key: true,
label: 'Name'
},
description: {
label: 'Descriptions'
},
organization: {
label: 'Organization',
ngBind: 'inventory.organization_name',
sourceModel: 'organization',
sourceField: 'name'
}
},
actions: {
add: {
icon: 'icon-plus',
mode: 'all', // One of: edit, select, all
ngClick: 'addInventory()',
class: 'btn btn-mini btn-success',
awToolTip: 'Create a new row'
}
},
fieldActions: {
edit: {
ngClick: "editInventory(\{\{ inventory.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit'
},
delete: {
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete'
}
}
});

View File

@@ -0,0 +1,52 @@
/*********************************************
* 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',
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 btn-mini btn-success',
awToolTip: 'Create a new row'
}
},
fieldActions: {
edit: {
ngClick: "editOrganization(\{\{ organization.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit'
},
delete: {
ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete'
}
}
});

View File

@@ -0,0 +1,59 @@
/*********************************************
* 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: 'Check the Select checkbox next to each team to be added, and click Finished when done. Use the green <i class=\"icon-plus\"></i> button to create a new team.',
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 btn-mini btn-success',
awToolTip: 'Create a new team'
}
},
fieldActions: {
edit: {
ngClick: "editTeam(\{\{ team.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit team'
},
delete: {
ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete team'
}
}
});

View File

@@ -0,0 +1,57 @@
/*********************************************
* 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 Organizaton has an associated list of Users.',
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()',
class: 'btn btn-mini btn-success',
awToolTip: 'Create a new row'
}
},
fieldActions: {
edit: {
ngClick: "editUser(\{\{ user.id \}\})",
icon: 'icon-edit',
awToolTip: 'Edit'
},
delete: {
ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')",
icon: 'icon-remove',
class: 'btn-danger',
awToolTip: 'Delete'
}
}
});