mirror of
https://github.com/ansible/awx.git
synced 2026-07-04 21:10:09 -02:30
add /#/home/hosts/?active-failures=true, resolves #1678
This commit is contained in:
@@ -38,7 +38,7 @@ export default
|
|||||||
label: "Hosts"
|
label: "Hosts"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "/#/home/hosts?has_active_failures=true",
|
url: "/#/home/hosts?active-failures=true",
|
||||||
number: scope.data.hosts.failed,
|
number: scope.data.hosts.failed,
|
||||||
label: "Failed Hosts",
|
label: "Failed Hosts",
|
||||||
isFailureCount: true
|
isFailureCount: true
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function(){
|
|||||||
index: false,
|
index: false,
|
||||||
hover: true,
|
hover: true,
|
||||||
well: true,
|
well: true,
|
||||||
|
emptyListText: 'NO ACTIVE FAILURES FOUND',
|
||||||
fields: {
|
fields: {
|
||||||
status: {
|
status: {
|
||||||
basePath: 'unified_jobs',
|
basePath: 'unified_jobs',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import editController from './dashboard-hosts-edit.controller';
|
|||||||
|
|
||||||
var dashboardHostsList = {
|
var dashboardHostsList = {
|
||||||
name: 'dashboardHosts',
|
name: 'dashboardHosts',
|
||||||
url: '/home/hosts',
|
url: '/home/hosts?:active-failures',
|
||||||
controller: listController,
|
controller: listController,
|
||||||
templateUrl: templateUrl('dashboard/hosts/dashboard-hosts-list'),
|
templateUrl: templateUrl('dashboard/hosts/dashboard-hosts-list'),
|
||||||
data: {
|
data: {
|
||||||
@@ -25,8 +25,8 @@ var dashboardHostsList = {
|
|||||||
features: ['FeaturesService', function(FeaturesService) {
|
features: ['FeaturesService', function(FeaturesService) {
|
||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
}],
|
}],
|
||||||
hosts: ['Rest', 'GetBasePath', function(Rest, GetBasePath){
|
hosts: ['Rest', 'GetBasePath', '$stateParams', function(Rest, GetBasePath, $stateParams){
|
||||||
var defaultUrl = GetBasePath('hosts') + '?page_size=10';
|
var defaultUrl = GetBasePath('hosts') + '?page_size=10' + ($stateParams['active-failures'] ? '&has_active_failures=true' : '' );
|
||||||
Rest.setUrl(defaultUrl);
|
Rest.setUrl(defaultUrl);
|
||||||
return Rest.get().then(function(res){
|
return Rest.get().then(function(res){
|
||||||
var results = _.map(res.data.results, function(value){
|
var results = _.map(res.data.results, function(value){
|
||||||
|
|||||||
Reference in New Issue
Block a user