mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 13:36:02 -03:30
incorporate mabashians changes in #2896
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
export function PortalModeJobsController($scope, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
export function PortalModeJobsController($scope, $rootScope, GetBasePath, GenerateList, PortalJobsList, SearchInit,
|
||||||
PaginateInit){
|
PaginateInit){
|
||||||
|
|
||||||
var list = PortalJobsList,
|
var list = _.cloneDeep(PortalJobsList),
|
||||||
view = GenerateList,
|
view = GenerateList,
|
||||||
// show user jobs by default
|
// show user jobs by default
|
||||||
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
defaultUrl = GetBasePath('jobs') + '?created_by=' + $rootScope.current_user.id,
|
||||||
@@ -25,6 +25,11 @@ export function PortalModeJobsController($scope, $rootScope, GetBasePath, Genera
|
|||||||
|
|
||||||
var init = function(url){
|
var init = function(url){
|
||||||
defaultUrl = url ? url : defaultUrl;
|
defaultUrl = url ? url : defaultUrl;
|
||||||
|
// We need to explicitly set the lists base path so that tag searching will keep the '?created_by'
|
||||||
|
// query param when it's present. If we don't do this, then tag search will just grab the base
|
||||||
|
// path for this list (/api/v1/jobs) and lose the created_by filter
|
||||||
|
list.basePath = defaultUrl;
|
||||||
|
|
||||||
view.inject(list, {
|
view.inject(list, {
|
||||||
id: 'portal-jobs',
|
id: 'portal-jobs',
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
|
|||||||
Reference in New Issue
Block a user