mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 18:50:04 -03:30
Latest UI changs. First iteration on Jobs page.
This commit is contained in:
@@ -16,6 +16,7 @@ angular.module('AdminListDefinition', [])
|
||||
editTitle: 'Admins',
|
||||
selectInstructions: 'Click on a row to select it. Click the Finished button when done.',
|
||||
base: 'users',
|
||||
index: true,
|
||||
|
||||
fields: {
|
||||
username: {
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('CredentialsListDefinition', [])
|
||||
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: {
|
||||
@@ -44,7 +45,7 @@ angular.module('CredentialsListDefinition', [])
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addCredential()',
|
||||
basePaths: ['credentials'], // base path must be in list, or action not available
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new credential'
|
||||
}
|
||||
},
|
||||
@@ -53,13 +54,14 @@ angular.module('CredentialsListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editCredential(\{\{ credential.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit credential'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete credential'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('GroupListDefinition', [])
|
||||
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: {
|
||||
@@ -31,7 +32,7 @@ angular.module('GroupListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addGroup()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new group'
|
||||
}
|
||||
},
|
||||
@@ -40,13 +41,14 @@ angular.module('GroupListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editGroup(\{\{ group.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit group'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete group'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('HostListDefinition', [])
|
||||
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: {
|
||||
@@ -31,7 +32,7 @@ angular.module('HostListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addHost()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new host'
|
||||
}
|
||||
},
|
||||
@@ -40,13 +41,14 @@ angular.module('HostListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editHost(\{\{ host.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit host'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete host'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('InventoriesListDefinition', [])
|
||||
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: {
|
||||
@@ -37,7 +38,7 @@ angular.module('InventoriesListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addInventory()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new row'
|
||||
}
|
||||
},
|
||||
@@ -46,13 +47,14 @@ angular.module('InventoriesListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editInventory(\{\{ inventory.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('JobTemplatesListDefinition', [])
|
||||
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: {
|
||||
@@ -31,29 +32,30 @@ angular.module('JobTemplatesListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addJobTemplate()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
basePaths: ['job_templates'],
|
||||
awToolTip: 'Create a new template'
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
submit: {
|
||||
icon: 'icon-play',
|
||||
mode: 'all',
|
||||
ngClick: 'submitJob(\{\{ job_template.id \}\})',
|
||||
class: 'btn btn-mini',
|
||||
awToolTip: 'Create and run a job using this template'
|
||||
},
|
||||
edit: {
|
||||
ngClick: "editJobTemplate(\{\{ job_template.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
awToolTip: 'Edit template'
|
||||
awToolTip: 'Edit template',
|
||||
class: 'btn-mini'
|
||||
},
|
||||
submit: {
|
||||
icon: 'icon-play',
|
||||
mode: 'all',
|
||||
class: 'btn-mini',
|
||||
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',
|
||||
class: 'btn-danger btn-mini',
|
||||
awToolTip: 'Delete template'
|
||||
}
|
||||
}
|
||||
|
||||
79
lib/ui/static/js/lists/Jobs.js
Normal file
79
lib/ui/static/js/lists/Jobs.js
Normal file
@@ -0,0 +1,79 @@
|
||||
/*********************************************
|
||||
* 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
|
||||
},
|
||||
created: {
|
||||
label: 'Creation Date',
|
||||
link: true
|
||||
},
|
||||
name: {
|
||||
label: 'Name',
|
||||
link: true,
|
||||
},
|
||||
status: {
|
||||
label: 'Status',
|
||||
icon: 'icon-circle',
|
||||
class: 'job-\{\{ job.status \}\}'
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
edit: {
|
||||
ngClick: "editJob(\{\{ job.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit job',
|
||||
ngDisabled: "job.status != 'new'"
|
||||
},
|
||||
summary: {
|
||||
title: 'Summary',
|
||||
icon: 'icon-filter',
|
||||
ngClick: 'viewSummary()',
|
||||
class: 'btn-success btn-mini',
|
||||
awToolTip: 'Job summary',
|
||||
ngDisabled: "job.status == 'new'"
|
||||
},
|
||||
events: {
|
||||
title: 'Detail',
|
||||
icon: 'icon-list-ul',
|
||||
mode: 'all',
|
||||
ngClick: 'viewEvents()',
|
||||
class: 'btn-info btn-mini',
|
||||
awToolTip: 'Job event detail',
|
||||
ngDisabled: "job.status == 'new'"
|
||||
},
|
||||
cancel: {
|
||||
title: 'Cancel',
|
||||
icon: 'icon-minus-sign',
|
||||
mode: 'all',
|
||||
ngClick: 'cancel(\{\{ job.id \}\})',
|
||||
class: 'btn-danger btn-mini',
|
||||
awToolTip: 'Cancel job',
|
||||
ngDisabled: "job.status == 'error' || job.status == 'failed'"
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -14,6 +14,7 @@ angular.module('OrganizationListDefinition', [])
|
||||
iterator: 'organization',
|
||||
selectTitle: 'Add Organizations',
|
||||
editTitle: 'Organizations',
|
||||
index: true,
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
@@ -30,7 +31,7 @@ angular.module('OrganizationListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addOrganization()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new row'
|
||||
}
|
||||
},
|
||||
@@ -39,13 +40,14 @@ angular.module('OrganizationListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editOrganization(\{\{ organization.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('ProjectsListDefinition', [])
|
||||
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: {
|
||||
@@ -31,7 +32,7 @@ angular.module('ProjectsListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addProject()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new project'
|
||||
}
|
||||
},
|
||||
@@ -40,13 +41,14 @@ angular.module('ProjectsListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editProject(\{\{ project.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit project'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete project'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ angular.module('TeamsListDefinition', [])
|
||||
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: {
|
||||
@@ -37,7 +38,7 @@ angular.module('TeamsListDefinition', [])
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addTeam()',
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new team'
|
||||
}
|
||||
},
|
||||
@@ -46,13 +47,14 @@ angular.module('TeamsListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editTeam(\{\{ team.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit team'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete team'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ angular.module('UserListDefinition', [])
|
||||
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: {
|
||||
@@ -36,7 +37,7 @@ angular.module('UserListDefinition', [])
|
||||
mode: 'select', // One of: edit, select, all
|
||||
ngClick: 'addUser()',
|
||||
basePaths: ['organizations'], // base path must be in list, or action not available
|
||||
class: 'btn btn-success',
|
||||
class: 'btn-success',
|
||||
awToolTip: 'Create a new user'
|
||||
}
|
||||
},
|
||||
@@ -45,13 +46,14 @@ angular.module('UserListDefinition', [])
|
||||
edit: {
|
||||
ngClick: "editUser(\{\{ user.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
class: 'btn-mini',
|
||||
awToolTip: 'Edit user'
|
||||
},
|
||||
|
||||
delete: {
|
||||
ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')",
|
||||
icon: 'icon-remove',
|
||||
class: 'btn-danger',
|
||||
class: 'btn-mini btn-danger',
|
||||
awToolTip: 'Delete user'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user