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