mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 03:30:02 -03:30
Key column on a list view is now clickable -taking you to the detail page. Moved action buttons to top of page next to search widget. Added finishing touches to job submission on job_templates list view.
This commit is contained in:
@@ -128,6 +128,7 @@ function JobTemplatesList ($scope, $rootScope, $location, $log, $routeParams, Re
|
||||
function postJob(data) {
|
||||
// Once we have a credential and all required passwords, use this
|
||||
// to create and start a job
|
||||
(scope.credentialWatchRemove) ? scope.credentialWatchRemove() : null;
|
||||
var dt = new Date().toISOString();
|
||||
Rest.setUrl(data.related.jobs);
|
||||
Rest.post({
|
||||
@@ -165,13 +166,17 @@ function JobTemplatesList ($scope, $rootScope, $location, $log, $routeParams, Re
|
||||
// Create a job record
|
||||
if (data.credential == '' || data.credential == null) {
|
||||
// Template does not have credential, prompt for one
|
||||
scope.$watch('credential', function(newVal, oldVal) {
|
||||
if (scope.credentialWatchRemove) {
|
||||
scope.credentialWatchRemove();
|
||||
}
|
||||
scope.credentialWatchRemove = scope.$watch('credential', function(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
console.log('credential is: ' + scope.credential);
|
||||
// After user selects a credential from the modal,
|
||||
// submit the job
|
||||
data.credential = scope.credential;
|
||||
postJob(data);
|
||||
if (scope.credential != '' && scope.credential !== null && scope.credential !== undefined) {
|
||||
data.credential = scope.credential;
|
||||
postJob(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
LookUpInit({
|
||||
|
||||
Reference in New Issue
Block a user