mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
fix $stateParams coming from dashboard -> inventory/project w/ sync failures, resolves #1792
This commit is contained in:
@@ -269,7 +269,7 @@ var tower = angular.module('Tower', [
|
|||||||
}).
|
}).
|
||||||
|
|
||||||
state('projects', {
|
state('projects', {
|
||||||
url: '/projects',
|
url: '/projects?{status}',
|
||||||
templateUrl: urlPrefix + 'partials/projects.html',
|
templateUrl: urlPrefix + 'partials/projects.html',
|
||||||
controller: ProjectsList,
|
controller: ProjectsList,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
Wait('start');
|
Wait('start');
|
||||||
|
|
||||||
var list = ProjectList,
|
var list = ProjectList,
|
||||||
defaultUrl = GetBasePath('projects'),
|
defaultUrl = GetBasePath('projects') + ($stateParams.status ? '?status=' + $stateParams.status : ''), view = GenerateList,
|
||||||
view = GenerateList,
|
|
||||||
base = $location.path().replace(/^\//, '').split('/')[0],
|
base = $location.path().replace(/^\//, '').split('/')[0],
|
||||||
mode = (base === 'projects') ? 'edit' : 'select',
|
mode = (base === 'projects') ? 'edit' : 'select',
|
||||||
url = (base === 'teams') ? GetBasePath('teams') + $stateParams.team_id + '/projects/' : defaultUrl,
|
url = (base === 'teams') ? GetBasePath('teams') + $stateParams.team_id + '/projects/' : defaultUrl,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default
|
|||||||
label: "Inventories",
|
label: "Inventories",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "/#/inventories/?inventory_sources_with_failures",
|
url: "/#/inventories?status=sync-failed",
|
||||||
number: scope.data.inventories.inventory_failed,
|
number: scope.data.inventories.inventory_failed,
|
||||||
label: "Inventory Sync Failures",
|
label: "Inventory Sync Failures",
|
||||||
isFailureCount: true
|
isFailureCount: true
|
||||||
@@ -60,7 +60,7 @@ export default
|
|||||||
label: "Projects"
|
label: "Projects"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "/#/projects/?status=failed",
|
url: "/#/projects?status=failed",
|
||||||
number: scope.data.projects.failed,
|
number: scope.data.projects.failed,
|
||||||
label: "Project Sync Failures",
|
label: "Project Sync Failures",
|
||||||
isFailureCount: true
|
isFailureCount: true
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function InventoriesList($scope, $rootScope, $location, $log,
|
|||||||
Find, Empty, $state) {
|
Find, Empty, $state) {
|
||||||
|
|
||||||
var list = InventoryList,
|
var list = InventoryList,
|
||||||
defaultUrl = GetBasePath('inventory'),
|
defaultUrl = GetBasePath('inventory') + ($stateParams.status === 'sync-failed' ? '?not__inventory_sources_with_failures=0' : ''),
|
||||||
view = generateList,
|
view = generateList,
|
||||||
paths = $location.path().replace(/^\//, '').split('/'),
|
paths = $location.path().replace(/^\//, '').split('/'),
|
||||||
mode = (paths[0] === 'inventories') ? 'edit' : 'select';
|
mode = (paths[0] === 'inventories') ? 'edit' : 'select';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import InventoriesList from './inventory-list.controller';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'inventories',
|
name: 'inventories',
|
||||||
route: '/inventories',
|
route: '/inventories?{status}',
|
||||||
templateUrl: templateUrl('inventories/inventories'),
|
templateUrl: templateUrl('inventories/inventories'),
|
||||||
controller: InventoriesList,
|
controller: InventoriesList,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Reference in New Issue
Block a user