diff --git a/awx/ui/client/src/credentials/edit/credentials-edit.controller.js b/awx/ui/client/src/credentials/edit/credentials-edit.controller.js index 1926e811ca..2dd3ae1de2 100644 --- a/awx/ui/client/src/credentials/edit/credentials-edit.controller.js +++ b/awx/ui/client/src/credentials/edit/credentials-edit.controller.js @@ -283,8 +283,6 @@ export default ['$scope', '$rootScope', '$compile', '$location', }) .success(function() { $('#prompt-modal').modal('hide'); - // @issue: OLD SEARCH - // $scope.search(form.related[set].iterator); }) .error(function(data, status) { $('#prompt-modal').modal('hide'); diff --git a/awx/ui/client/src/helpers/Credentials.js b/awx/ui/client/src/helpers/Credentials.js index 007756d17c..edb1e700ab 100644 --- a/awx/ui/client/src/helpers/Credentials.js +++ b/awx/ui/client/src/helpers/Credentials.js @@ -386,15 +386,6 @@ angular.module('CredentialsHelper', ['Utilities']) Rest.post(data) .success(function (data) { scope.addedItem = data.id; - - // @issue: OLD SEARCH - // Refresh({ - // scope: scope, - // set: 'credentials', - // iterator: 'credential', - // url: url - // }); - Wait('stop'); var base = $location.path().replace(/^\//, '').split('/')[0]; if (base === 'credentials') { diff --git a/awx/ui/client/src/helpers/Groups.js b/awx/ui/client/src/helpers/Groups.js index 8e7dcfc7ad..295af244a1 100644 --- a/awx/ui/client/src/helpers/Groups.js +++ b/awx/ui/client/src/helpers/Groups.js @@ -838,14 +838,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name parent_scope.removeAddTreeRefreshed(); } parent_scope.removeAddTreeRefreshed = parent_scope.$on('GroupTreeRefreshed', function() { - // Clean up Wait('stop'); - - // @issue: OLD SEARCH - // if (modal_scope.searchCleanUp) { - // modal_scope.searchCleanup(); - // } - try { $('#group-modal-dialog').dialog('close'); } @@ -948,18 +941,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name catch(e) { //ignore } - - // @issue: OLD SEARCH - // if (modal_scope.searchCleanup) { - // modal_scope.searchCleanup(); - // } - // if (parent_scope.restoreSearch) { - // parent_scope.restoreSearch(); - // } - // else { - // Wait('stop'); - // } - Wait('stop'); }; diff --git a/awx/ui/client/src/helpers/Hosts.js b/awx/ui/client/src/helpers/Hosts.js index 2cb4aa36a5..627c3a76eb 100644 --- a/awx/ui/client/src/helpers/Hosts.js +++ b/awx/ui/client/src/helpers/Hosts.js @@ -169,18 +169,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name, var scope = params.scope, parent_scope = params.parent_scope; - // @issue: OLD SEARCH - // var list = InventoryHosts, - // group_id = params.group_id, - // inventory_id = params.inventory_id; - // pageSize = (params.pageSize) ? params.pageSize : 20, - // - // url = ( !Empty(group_id) ) ? GetBasePath('groups') + group_id + '/all_hosts/' : - // GetBasePath('inventory') + inventory_id + '/hosts/'; - - // @issue: OLD SEARCH - // scope.search_place_holder='Search ' + scope.selected_group_name; - if (scope.removeHostsReloadPostRefresh) { scope.removeHostsReloadPostRefresh(); } @@ -198,27 +186,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name, } } }); - - // @issue: OLD SEARCH - // SearchInit({ scope: scope, set: 'hosts', list: list, url: url }); - // PaginateInit({ scope: scope, list: list, url: url, pageSize: pageSize }); - // - // if ($stateParams.host_name) { - // scope[list.iterator + 'InputDisable'] = false; - // scope[list.iterator + 'SearchValue'] = $stateParams.host_name; - // scope[list.iterator + 'SearchField'] = 'name'; - // scope[list.iterator + 'SearchFieldLabel'] = list.fields.name.label; - // scope[list.iterator + 'SearchSelectValue'] = null; - // } - // - // if (scope.show_failures) { - // scope[list.iterator + 'InputDisable'] = true; - // scope[list.iterator + 'SearchValue'] = 'true'; - // scope[list.iterator + 'SearchField'] = 'has_active_failures'; - // scope[list.iterator + 'SearchFieldLabel'] = list.fields.has_active_failures.label; - // scope[list.iterator + 'SearchSelectValue'] = { value: 1 }; - // } - // scope.search(list.iterator, null, true); }; }]) @@ -274,31 +241,11 @@ return function(params) { scope.removeHostCopyDialogReady(); } scope.removeCopyDialogReady = scope.$on('HostCopyDialogReady', function() { - // @issue: OLD SEARCH - // var url = GetBasePath('inventory') + group_scope.inventory.id + '/groups/'; - GenerateList.inject(GroupList, { mode: 'lookup', id: 'copy-host-select-container', scope: scope - //, - //instructions: instructions }); - - // @issue: OLD SEARCH - // SearchInit({ - // scope: scope, - // set: GroupList.name, - // list: GroupList, - // url: url - // }); - // PaginateInit({ - // scope: scope, - // list: GroupList, - // url: url, - // mode: 'lookup' - // }); - // scope.search(GroupList.iterator, null, true, false); }); if (scope.removeShowDialog) { @@ -348,12 +295,6 @@ return function(params) { catch(e) { // ignore } - - // @issue: OLD SEARCH - // scope.searchCleanup(); - - // @issue: OLD SEARCH - // group_scope.restoreSearch(); // Restore all parent search stuff and refresh hosts and groups lists scope.$destroy(); }; diff --git a/awx/ui/client/src/helpers/JobDetail.js b/awx/ui/client/src/helpers/JobDetail.js index 0cda454f2e..ad049ed481 100644 --- a/awx/ui/client/src/helpers/JobDetail.js +++ b/awx/ui/client/src/helpers/JobDetail.js @@ -686,11 +686,6 @@ export default scope.plays = []; - // @issue: OLD SEARCH - factory needs refactoring! will be completely rehauled for job details 3.1 update - // url = scope.job.url + 'job_plays/?page_size=' + scope.playsMaxRows + '&order=id'; - // url += (scope.search_play_name) ? '&play__icontains=' + encodeURIComponent(scope.search_play_name) : ''; - // url += (scope.search_play_status === 'failed') ? '&failed=true' : ''; - scope.playsLoading = true; Rest.setUrl(url); Rest.get() @@ -789,11 +784,6 @@ export default if (scope.selectedPlay) { url = scope.job.url + 'job_tasks/?event_id=' + scope.selectedPlay; - // @issue: OLD SEARCH - // url += (scope.search_task_name) ? '&task__icontains=' + encodeURIComponent(scope.search_task_name) : ''; - // url += (scope.search_task_status === 'failed') ? '&failed=true' : ''; - // url += '&page_size=' + scope.tasksMaxRows + '&order=id'; - scope.plays.every(function(p, idx) { if (p.id === scope.selectedPlay) { play = scope.plays[idx]; @@ -924,11 +914,6 @@ export default order: 'host_name,counter', }; - // @issue: OLD SEARCH - // if (scope.search_host_status === 'failed'){ - // params.failed = true; - // } - JobDetailService.getRelatedJobEvents(scope.job.id, params).success(function(res){ scope.hostResults = JobDetailService.processHostEvents(res.results); scope.hostResultsLoading = false; @@ -1060,30 +1045,6 @@ export default } } - // @issue: OLD SEARCH - // if (scope.search_play_name) { - // for (key in plays) { - // if (filteredListX[key].name.indexOf(scope.search_play_name) > 0) { - // filteredListA[key] = filteredListX[key]; - // } - // } - // } - // else { - // filteredListA = filteredListX; - // } - - // @issue: OLD SEARCH - // if (scope.search_play_status === 'failed') { - // for (key in filteredListA) { - // if (filteredListA[key].status === 'failed') { - // filteredListB[key] = plays[key]; - // } - // } - // } - // else { - // filteredListB = filteredListA; - // } - keys = Object.keys(filteredListB); keys.sort(function(a,b) { return listSort(a,b); }).reverse(); for (idx=0; idx < scope.playsMaxRows && idx < keys.length; idx++) { @@ -1139,30 +1100,6 @@ export default } } - // @issue: OLD SEARCH - // if (scope.search_task_name) { - // for (key in filteredListX) { - // if (filteredListX[key].name.indexOf(scope.search_task_name) > 0) { - // filteredListA[key] = filteredListX[key]; - // } - // } - // } - // else { - // filteredListA = filteredListX; - // } - - // @issue: OLD SEARCH - // if (scope.search_task_status === 'failed') { - // for (key in filteredListA) { - // if (filteredListA[key].status === 'failed') { - // filteredListB[key] = tasks[key]; - // } - // } - // } - // else { - // filteredListB = filteredListA; - // } - keys = Object.keys(filteredListB); keys.sort(function(a,b) { return listSort(a,b); }).reverse(); newKeys = []; @@ -1202,33 +1139,8 @@ export default if (scope.activePlay && scope.activeTask && scope.jobData.plays[scope.activePlay] && scope.jobData.plays[scope.activePlay].tasks[scope.activeTask]) { - //hostResults = JSON.parse(JSON.stringify(scope.jobData.plays[scope.activePlay].tasks[scope.activeTask].hostResults)); hostResults = scope.jobData.plays[scope.activePlay].tasks[scope.activeTask].hostResults; - // @issue: OLD SEARCH - // if (scope.search_host_name) { - // for (key in hostResults) { - // if (hostResults[key].name.indexOf(scope.search_host_name) > 0) { - // filteredListA[key] = hostResults[key]; - // } - // } - // } - // else { - // filteredListA = hostResults; - // } - - // @issue: OLD SEARCH - // if (scope.search_host_status === 'failed' || scope.search_host_status === 'unreachable') { - // for (key in filteredListA) { - // if (filteredListA[key].status === 'failed') { - // filteredListB[key] = filteredListA[key]; - // } - // } - // } - // else { - // filteredListB = filteredListA; - // } - keys = Object.keys(filteredListB); keys.sort(function compare(a, b) { if (filteredListB[a].name === filteredListB[b].name) { diff --git a/awx/ui/client/src/helpers/teams.js b/awx/ui/client/src/helpers/teams.js index b89d2a1283..936023f003 100644 --- a/awx/ui/client/src/helpers/teams.js +++ b/awx/ui/client/src/helpers/teams.js @@ -39,9 +39,6 @@ export default } } - // @issue: OLD SEARCH - // scope[iterator + 'SearchSpin'] = false; - scope[set] = results; } }); diff --git a/awx/ui/client/src/job-detail/host-events/host-events.block.less b/awx/ui/client/src/job-detail/host-events/host-events.block.less index c309dfeab6..df52944cf0 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.block.less +++ b/awx/ui/client/src/job-detail/host-events/host-events.block.less @@ -38,12 +38,6 @@ button.HostEvents-close{ color: @skipped; } -// @issue: OLD SEARCH -// .HostEvents-search--form{ -// max-width: 420px; -// display: inline-block; -// } - .HostEvents-filter--form{ padding-top: 15px; padding-bottom: 15px; diff --git a/awx/ui/client/src/job-detail/host-events/host-events.controller.js b/awx/ui/client/src/job-detail/host-events/host-events.controller.js index 87b1bc00a0..5664c89877 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.controller.js +++ b/awx/ui/client/src/job-detail/host-events/host-events.controller.js @@ -16,56 +16,11 @@ $scope.processEventStatus = JobDetailService.processEventStatus; $scope.activeFilter = $stateParams.filter || null; - // @issue: OLD SEARCH - // $scope.search = function(){ - // Wait('start'); - // //http://docs.ansible.com/ansible-tower/latest/html/towerapi/intro.html#filtering - // // SELECT WHERE host_name LIKE str OR WHERE play LIKE str OR WHERE task LIKE str AND host_name NOT "" - // // selecting non-empty host_name fields prevents us from displaying non-runner events, like playbook_on_task_start - // var params = { - // host_name: $scope.hostName, - // }; - // if ($scope.searchStr && $scope.searchStr !== ''){ - // params.or__play__icontains = encodeURIComponent($scope.searchStr); - // params.or__task__icontains = encodeURIComponent($scope.searchStr); - // } - // - // switch($scope.activeFilter){ - // case 'skipped': - // params.event = 'runner_on_skipped'; - // break; - // case 'unreachable': - // params.event = 'runner_on_unreachable'; - // break; - // case 'ok': - // params.event = 'runner_on_ok'; - // params.changed = 'false'; - // break; - // case 'failed': - // params.event = 'runner_on_failed'; - // break; - // case 'changed': - // params.event = 'runner_on_ok'; - // params.changed = true; - // break; - // default: - // break; - // } - // JobDetailService.getRelatedJobEvents($stateParams.id, params) - // .success(function(res){ - // $scope.results = res.results; - // Wait('stop'); - // }); - // }; - $scope.filters = ['all', 'changed', 'failed', 'ok', 'unreachable', 'skipped']; // watch select2 for changes $('.HostEvents-select').on("select2:select", function () { - $scope.activeFilter = $('.HostEvents-select').val(); - - // @issue: OLD SEARCH - // $scope.search(); + $scope.activeFilter = $('.HostEvents-select').val(); }); var init = function(){ @@ -79,9 +34,6 @@ if ($stateParams.filter){ $scope.activeFilter = $stateParams.filter; - // @issue: OLD SEARCH - // $scope.search(); - $('#HostEvents').modal('show'); } else{ diff --git a/awx/ui/client/src/job-detail/host-events/host-events.partial.html b/awx/ui/client/src/job-detail/host-events/host-events.partial.html index c0b598a23a..00bacf066c 100644 --- a/awx/ui/client/src/job-detail/host-events/host-events.partial.html +++ b/awx/ui/client/src/job-detail/host-events/host-events.partial.html @@ -10,20 +10,9 @@