mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 19:07:39 -02:30
No longer create\/execute job when template is saved. Execute job from list view by clicking 'play' button. Prompts for missing credential and all required password.
This commit is contained in:
@@ -82,3 +82,28 @@ angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFo
|
||||
$('#password-modal').modal();
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
* form: <form object>,
|
||||
* current_item: <id of item to select on open>,
|
||||
* list: <list object>,
|
||||
* field: <name of the form field with which the lookup is associated>
|
||||
* field: <name of the form field with which the lookup is associated>,
|
||||
* hdr: <optional. modal dialog header>
|
||||
* })
|
||||
*/
|
||||
|
||||
@@ -25,18 +26,20 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
|
||||
var list = params.list; // list object
|
||||
var field = params.field; // form field
|
||||
var postAction = params.postAction //action to perform post user selection
|
||||
|
||||
|
||||
// Show pop-up to select user
|
||||
var name = list.iterator.charAt(0).toUpperCase() + list.iterator.substring(1);
|
||||
var defaultUrl = (list.name == 'inventories') ? GetBasePath('inventory') : GetBasePath(list.name);
|
||||
|
||||
var hdr = (params.hdr) ? params.hdr : 'Select ' + name;
|
||||
|
||||
$('input[name="' + form.fields[field].sourceModel + '_' + form.fields[field].sourceField + '"]').attr('data-url',defaultUrl +
|
||||
'?' + form.fields[field].sourceField + '__' + 'iexact=:value');
|
||||
$('input[name="' + form.fields[field].sourceModel + '_' + form.fields[field].sourceField + '"]').attr('data-source',field);
|
||||
|
||||
scope['lookUp' + name] = function() {
|
||||
var listGenerator = GenerateList;
|
||||
var listScope = listGenerator.inject(list, { mode: 'lookup', hdr: 'Select ' + name });
|
||||
var listScope = listGenerator.inject(list, { mode: 'lookup', hdr: hdr });
|
||||
listScope.selectAction = function() {
|
||||
var found = false;
|
||||
var name;
|
||||
@@ -44,7 +47,7 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
|
||||
if (listScope[list.iterator + "_" + listScope[list.name][i].id + "_class"] == "success") {
|
||||
found = true;
|
||||
scope[field] = listScope[list.name][i].id;
|
||||
if (form.fields[field] && form.fields[field].sourceModel) {
|
||||
if (scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) {
|
||||
scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] =
|
||||
listScope[list.name][i][form.fields[field].sourceField];
|
||||
scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]
|
||||
|
||||
Reference in New Issue
Block a user