mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 02:31:03 -03:30
Make home/host columns sortable
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
export default
|
export default
|
||||||
['$scope', '$state', '$stateParams', 'PageRangeSetup', 'GetBasePath', 'DashboardHostsList',
|
['$scope', '$state', '$stateParams', 'PageRangeSetup', 'GetBasePath', 'DashboardHostsList',
|
||||||
'generateList', 'PaginateInit', 'SetStatus', 'DashboardHostService', 'hosts', '$rootScope',
|
'generateList', 'PaginateInit', 'SetStatus', 'DashboardHostService', 'hosts', '$rootScope', 'SearchInit',
|
||||||
function($scope, $state, $stateParams, PageRangeSetup, GetBasePath, DashboardHostsList, GenerateList, PaginateInit, SetStatus, DashboardHostService, hosts, $rootScope){
|
function($scope, $state, $stateParams, PageRangeSetup, GetBasePath, DashboardHostsList, GenerateList, PaginateInit, SetStatus, DashboardHostService, hosts, $rootScope, SearchInit){
|
||||||
var setJobStatus = function(){
|
var setJobStatus = function(){
|
||||||
_.forEach($scope.hosts, function(value){
|
_.forEach($scope.hosts, function(value){
|
||||||
SetStatus({
|
SetStatus({
|
||||||
@@ -59,6 +59,12 @@ export default
|
|||||||
$scope.hosts = hosts.results;
|
$scope.hosts = hosts.results;
|
||||||
setJobStatus();
|
setJobStatus();
|
||||||
generator.inject(list, {mode: 'edit', scope: $scope});
|
generator.inject(list, {mode: 'edit', scope: $scope});
|
||||||
|
SearchInit({
|
||||||
|
scope: $scope,
|
||||||
|
set: 'hosts',
|
||||||
|
list: list,
|
||||||
|
url: defaultUrl
|
||||||
|
});
|
||||||
PaginateInit({
|
PaginateInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
list: list,
|
list: list,
|
||||||
@@ -77,6 +83,7 @@ export default
|
|||||||
$scope.rowBeingEdited = $state.params.id;
|
$scope.rowBeingEdited = $state.params.id;
|
||||||
$scope.listBeingEdited = "hosts";
|
$scope.listBeingEdited = "hosts";
|
||||||
}
|
}
|
||||||
|
$scope.search(list.iterator);
|
||||||
};
|
};
|
||||||
init();
|
init();
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user