mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Merge pull request #3762 from leigh-johnson/3750
Resolves 404 when assigning resources/users to organizations in card view
This commit is contained in:
commit
5dfd9d4ec9
@ -23,10 +23,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "USERS"
|
label: "USERS"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -45,10 +42,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "TEAMS"
|
label: "TEAMS"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -67,10 +61,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "INVENTORIES"
|
label: "INVENTORIES"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -89,10 +80,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "PROJECTS"
|
label: "PROJECTS"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -111,10 +99,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "JOB TEMPLATES"
|
label: "JOB TEMPLATES"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -133,10 +118,7 @@ export default [
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "organizations.edit",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "organizations.edit";
|
|
||||||
},
|
|
||||||
label: "ADMINS"
|
label: "ADMINS"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
@ -8,12 +8,12 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
|
|||||||
'$log', '$compile', 'Rest', 'PaginateInit',
|
'$log', '$compile', 'Rest', 'PaginateInit',
|
||||||
'SearchInit', 'OrganizationList', 'Alert', 'Prompt', 'ClearScope',
|
'SearchInit', 'OrganizationList', 'Alert', 'Prompt', 'ClearScope',
|
||||||
'ProcessErrors', 'GetBasePath', 'Wait',
|
'ProcessErrors', 'GetBasePath', 'Wait',
|
||||||
'$state', 'generateList', 'Refresh', '$filter',
|
'$state', 'generateList', '$filter',
|
||||||
function($stateParams, $scope, $rootScope, $location,
|
function($stateParams, $scope, $rootScope, $location,
|
||||||
$log, $compile, Rest, PaginateInit,
|
$log, $compile, Rest, PaginateInit,
|
||||||
SearchInit, OrganizationList, Alert, Prompt, ClearScope,
|
SearchInit, OrganizationList, Alert, Prompt, ClearScope,
|
||||||
ProcessErrors, GetBasePath, Wait,
|
ProcessErrors, GetBasePath, Wait,
|
||||||
$state, generateList, Refresh, $filter) {
|
$state, generateList, $filter) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@ -70,19 +70,14 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("ReloadOrgListView", function() {
|
$scope.$on("ReloadOrgListView", function() {
|
||||||
var url = GetBasePath('organizations') + '?';
|
Rest.setUrl($scope.current_url);
|
||||||
if ($state.$current.self.name === "organizations" ||
|
Rest.get()
|
||||||
$state.$current.self.name === "organizations.add") {
|
.success((data) => $scope.organizations = data.results)
|
||||||
$scope.activeCard = null;
|
.error(function(data, status) {
|
||||||
}
|
ProcessErrors($scope, data, status, null, {
|
||||||
if ($scope[list.iterator + 'SearchFilters']){
|
hdr: 'Error!',
|
||||||
url = url + _.reduce($scope[list.iterator+'SearchFilters'], (result, filter) => result + '&' + filter.url, '');
|
msg: 'Call to ' + defaultUrl + ' failed. DELETE returned status: ' + status
|
||||||
}
|
});
|
||||||
Refresh({
|
|
||||||
scope: $scope,
|
|
||||||
set: list.name,
|
|
||||||
iterator: list.iterator,
|
|
||||||
url: url
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -158,7 +153,7 @@ export default ['$stateParams', '$scope', '$rootScope', '$location',
|
|||||||
});
|
});
|
||||||
// grab the pagination elements, move, destroy list generator elements
|
// grab the pagination elements, move, destroy list generator elements
|
||||||
$('#organization-pagination').appendTo('#OrgCards');
|
$('#organization-pagination').appendTo('#OrgCards');
|
||||||
$('tag-search').appendTo('.OrgCards-search');
|
$('#organizations tag-search').appendTo('.OrgCards-search');
|
||||||
$('#organizations-list').remove();
|
$('#organizations-list').remove();
|
||||||
|
|
||||||
PaginateInit({
|
PaginateInit({
|
||||||
|
@ -17,10 +17,7 @@ export default {
|
|||||||
activityStreamTarget: 'organization'
|
activityStreamTarget: 'organization'
|
||||||
},
|
},
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: function($scope) {
|
parent: "setup",
|
||||||
$scope.$parent.$emit("ReloadOrgListView");
|
|
||||||
return "setup";
|
|
||||||
},
|
|
||||||
label: "ORGANIZATIONS"
|
label: "ORGANIZATIONS"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user