1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

AC-707 fixing home page links. Cleaned up issue with gtzero search type.

This commit is contained in:
Chris Houseknecht 2013-11-21 14:34:01 +00:00
parent 2a0edd4ea5
commit 013af19be4
6 changed files with 13 additions and 4 deletions

View File

@ -55,8 +55,10 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
if ($routeParams['inventory_sources_with_failures']) {
// pass a value of true, however this field actually contains an integer value
scope[InventoryList.iterator + 'InputDisable'] = true;
scope[InventoryList.iterator + 'SearchValue'] = $routeParams['inventory_sources_with_failures'];
scope[InventoryList.iterator + 'SearchField'] = 'inventory_sources_with_failures';
scope[InventoryList.iterator + 'SearchFieldLabel'] = InventoryList.fields['inventory_sources_with_failures'].label;
scope[InventoryList.iterator + 'SearchType'] = 'gtzero';
}
scope.search(list.iterator);

View File

@ -100,6 +100,12 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
}
}
}
else if ($routeParams['status']) {
scope[list.iterator + 'SearchValue'] = $routeParams['status'];
scope[list.iterator + 'SearchField'] = 'status';
scope[list.iterator + 'SearchFieldLabel'] = list.fields['status'].label;
scope[list.iterator + 'SearchSelectValue'] = null;
}
scope.search(list.iterator);
});

View File

@ -389,7 +389,8 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
else {
if ( (!list.fields[scope[iterator + 'SearchField' + modifier]].searchType) ||
(list.fields[scope[iterator + 'SearchField' + modifier]].searchType &&
list.fields[scope[iterator + 'SearchField' + modifier]].searchType !== 'or') ) {
list.fields[scope[iterator + 'SearchField' + modifier]].searchType !== 'or' &&
list.fields[scope[iterator + 'SearchField' + modifier]].searchType !== 'gtzero') ) {
scope[iterator + 'SearchParams'] += escape(scope[iterator + 'SearchValue' + modifier]);
}
}

View File

@ -68,7 +68,7 @@ angular.module('JobStatusWidget', ['RestServices', 'Utilities'])
label: 'Groups',
link: '/#/home/groups',
count: [(dashboard.groups && dashboard.groups.total) ? dashboard.groups.total : 0],
fail: [(dashboard.groups && dashboard.groups.fob_failed) ? dashboard.groups.job_failed : 0],
fail: [(dashboard.groups && dashboard.groups.job_failed) ? dashboard.groups.job_failed : 0],
fail_link: '/#/home/groups/?has_active_failures=true'
});
html += makeRow({

View File

@ -51,7 +51,7 @@ angular.module('SCMSyncStatusWidget', ['RestServices', 'Utilities'])
link: '/#/projects',
count: [(dashboard.projects && dashboard.projects.total) ? dashboard.projects.total : 0],
fail: [(dashboard.projects && dashboard.projects.failed) ? dashboard.projects.failed : 0],
fail_link: '/#/projects/?scm_type=&status=failed'
fail_link: '/#/projects/?status=failed'
});
var labelList = [];

View File

@ -137,7 +137,7 @@
<div class="navbar navbar-inverse navbar-fixed-top main-menu" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#organizations"><img class="logo" src="{{ STATIC_URL }}img/logo.png" /></a>
<a class="navbar-brand" href="#home"><img class="logo" src="{{ STATIC_URL }}img/logo.png" /></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>