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:
chouseknecht
2013-05-17 06:38:37 -04:00
parent 66f93364b1
commit 0f4a4b6cb9
13 changed files with 53 additions and 21 deletions

View File

@@ -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({