Portal Jobs

adding correct query for a list of jobs that the current user ran.
This commit is contained in:
Jared Tabor
2014-11-07 10:52:53 -05:00
parent 9873bd2bc2
commit 8fb6e50e70

View File

@@ -20,6 +20,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
listCount = 0, listCount = 0,
jobs_scope = scope.$new(true), jobs_scope = scope.$new(true),
max_rows, max_rows,
user,
html, e; html, e;
html = ''; html = '';
@@ -57,12 +58,13 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities'])
if (PortalJobsList.fields.type) { if (PortalJobsList.fields.type) {
PortalJobsList.fields.type.searchOptions = scope.type_choices; PortalJobsList.fields.type.searchOptions = scope.type_choices;
} }
user = scope.$parent.current_user.id;
LoadJobsScope({ LoadJobsScope({
parent_scope: scope, parent_scope: scope,
scope: jobs_scope, scope: jobs_scope,
list: PortalJobsList, list: PortalJobsList,
id: 'active-jobs', id: 'active-jobs',
url: GetBasePath('jobs'), //+ '?type__in=job' , //&status__in=running,completed,failed,successful,error,canceled', url: GetBasePath('jobs')+'?created_by='+user,
pageSize: max_rows, pageSize: max_rows,
spinner: true spinner: true
}); });