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 @@
- - - - - +
diff --git a/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js b/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js index 2e3716a945..cd5a241622 100644 --- a/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js +++ b/awx/ui/client/src/job-detail/host-summary/host-summary.controller.js @@ -95,29 +95,6 @@ } }; - // @issue: OLD SEARCH - // $scope.search = function(){ - // if($scope.searchTerm && $scope.searchTerm !== '') { - // $scope.searchActive = true; - // Wait('start'); - // JobDetailService.getJobHostSummaries($stateParams.id, { - // page_size: page_size, - // host_name__icontains: encodeURIComponent($scope.searchTerm), - // }).success(function(res){ - // $scope.hosts = res.results; - // $scope.next = res.next; - // Wait('stop'); - // }); - // } - // }; - - // @issue: OLD SEARCH - // $scope.clearSearch = function(){ - // $scope.searchActive = false; - // $scope.searchTerm = null; - // init(); - // }; - $scope.setFilter = function(filter){ $scope.filter = filter; var getAll = function(){ diff --git a/awx/ui/client/src/job-detail/job-detail.controller.js b/awx/ui/client/src/job-detail/job-detail.controller.js index 067c26aa1f..c3479e397b 100644 --- a/awx/ui/client/src/job-detail/job-detail.controller.js +++ b/awx/ui/client/src/job-detail/job-detail.controller.js @@ -149,18 +149,6 @@ export default scope.job_id = job_id; scope.auto_scroll = false; - // @issue: OLD SEARCH - // scope.searchPlaysEnabled = true; - // scope.searchTasksEnabled = true; - // scope.searchHostsEnabled = true; - // scope.search_play_status = 'all'; - // scope.search_task_status = 'all'; - // scope.search_host_status = 'all'; - // - // scope.search_play_name = ''; - // scope.search_task_name = ''; - // scope.search_host_name = ''; - scope.haltEventQueue = false; scope.processing = false; scope.lessStatus = false; @@ -768,117 +756,6 @@ export default } }; - // @issue: OLD SEARCH - // scope.filterTaskStatus = function() { - // scope.search_task_status = (scope.search_task_status === 'all') ? 'failed' : 'all'; - // if (!scope.liveEventProcessing || scope.pauseLiveEvents) { - // LoadTasks({ - // scope: scope - // }); - // } - // }; - // scope.filterPlayStatus = function() { - // scope.search_play_status = (scope.search_play_status === 'all') ? 'failed' : 'all'; - // if (!scope.liveEventProcessing || scope.pauseLiveEvents) { - // LoadPlays({ - // scope: scope - // }); - // } - // }; - // scope.filterHostStatus = function(){ - // scope.search_host_status = (scope.search_host_status === 'all') ? 'failed' : 'all'; - // if (!scope.liveEventProcessing || scope.pauseLiveEvents){ - // if (scope.selectedTask !== null && scope.selectedPlay !== null){ - // var params = { - // parent: scope.selectedTask, - // page_size: scope.hostResultsMaxRows, - // order: 'host_name,counter', - // }; - // 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; - // }); - // } - // } - // }; - // scope.searchPlays = function() { - // if (scope.search_play_name) { - // scope.searchPlaysEnabled = false; - // } - // else { - // scope.searchPlaysEnabled = true; - // } - // if (!scope.liveEventProcessing || scope.pauseLiveEvents) { - // LoadPlays({ - // scope: scope - // }); - // } - // }; - // scope.searchPlaysKeyPress = function(e) { - // if (e.keyCode === 13) { - // scope.searchPlays(); - // e.stopPropagation(); - // } - // }; - // scope.searchTasks = function() { - // var params = {}; - // if (scope.search_task_name) { - // scope.searchTasksEnabled = false; - // } - // else { - // scope.searchTasksEnabled = true; - // } - // if (!scope.liveEventProcessing || scope.pauseLiveEvents) { - // if (scope.search_task_status === 'failed'){ - // params.failed = true; - // } - // LoadTasks({ - // scope: scope - // }); - // } - // }; - // scope.searchTasksKeyPress = function(e) { - // if (e.keyCode === 13) { - // scope.searchTasks(); - // e.stopPropagation(); - // } - // }; - // scope.searchHosts = function() { - // var params = {}; - // if (scope.search_host_name) { - // scope.searchHostsEnabled = false; - // } - // else { - // scope.searchHostsEnabled = true; - // } - // if ((!scope.liveEventProcessing || scope.pauseLiveEvents) && scope.selectedTask) { - // scope.hostResultsLoading = true; - // params = { - // parent: scope.selectedTask, - // event__startswith: 'runner', - // page_size: scope.hostResultsMaxRows, - // order: 'host_name,counter', - // host_name__icontains: scope.search_host_name - // }; - // 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; - // }); - // } - // }; - // scope.searchHostsKeyPress = function(e) { - // if (e.keyCode === 13) { - // scope.searchHosts(); - // e.stopPropagation(); - // } - // }; - if (scope.removeDeleteFinished) { scope.removeDeleteFinished(); } diff --git a/awx/ui/client/src/management-jobs/card/card.controller.js b/awx/ui/client/src/management-jobs/card/card.controller.js index 19e521804f..29fb0da07a 100644 --- a/awx/ui/client/src/management-jobs/card/card.controller.js +++ b/awx/ui/client/src/management-jobs/card/card.controller.js @@ -51,14 +51,6 @@ export default //ignore } - // @issue: OLD SEARCH - // if (scope.searchCleanup) { - // scope.searchCleanup(); - // } - // else { - // Wait('stop'); - // } - Wait('stop'); }; @@ -274,6 +266,7 @@ export default }; parent_scope.refreshJobs = function(){ + // TODO: what should I do here? // @issue: OLD SEARCH // scope.search(SchedulesList.iterator); }; diff --git a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js index 6d06679ffa..b6ecfae2a4 100644 --- a/awx/ui/client/src/organizations/edit/organizations-edit.controller.js +++ b/awx/ui/client/src/organizations/edit/organizations-edit.controller.js @@ -121,9 +121,6 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams', Rest.post({ id: itm_id, disassociate: 1 }) .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/organizations/linkout/controllers/organizations-projects.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js index 7032ef5f81..f2ab1307f2 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-projects.controller.js @@ -118,11 +118,7 @@ export default ['$scope', '$rootScope', '$location', '$log', // And we found the affected project $log.debug('Received event for project: ' + project.name); $log.debug('Status changed to: ' + data.status); - if (data.status === 'successful' || data.status === 'failed') { - // @issue: OLD SEARCH - // $scope.search(list.iterator, null, null, null, null, false); - - } else { + if (!(data.status === 'successful' || data.status === 'failed')) { project.scm_update_tooltip = "SCM update currently running"; project.scm_type_class = "btn-disabled"; } @@ -289,6 +285,7 @@ export default ['$scope', '$rootScope', '$location', '$log', }; $scope.refresh = function() { + // TODO: what should I do here? // @issue: OLD SEARCH // $scope.search(list.iterator); }; @@ -301,13 +298,7 @@ export default ['$scope', '$rootScope', '$location', '$log', } $scope.projects.forEach(function(project) { if (project.id === project_id) { - if (project.scm_type === "Manual" || Empty(project.scm_type)) { - // Do not respond. Button appears greyed out as if it is disabled. Not disabled though, because we need mouse over event - // to work. So user can click, but we just won't do anything. - //Alert('Missing SCM Setup', 'Before running an SCM update, edit the project and provide the SCM access information.', 'alert-info'); - } else if (project.status === 'updating' || project.status === 'running' || project.status === 'pending') { - // Alert('Update in Progress', 'The SCM update process is running. Use the Refresh button to monitor the status.', 'alert-info'); - } else { + if (!((project.scm_type === "Manual" || Empty(project.scm_type)) || (project.status === 'updating' || project.status === 'running' || project.status === 'pending'))) { ProjectUpdate({ scope: $scope, project_id: project.id }); } } diff --git a/awx/ui/client/src/projects/edit/projects-edit.controller.js b/awx/ui/client/src/projects/edit/projects-edit.controller.js index db4a647dd5..05b7cf48e7 100644 --- a/awx/ui/client/src/projects/edit/projects-edit.controller.js +++ b/awx/ui/client/src/projects/edit/projects-edit.controller.js @@ -227,8 +227,6 @@ export default ['$scope', '$rootScope', '$compile', '$location', '$log', Rest.post({ id: itm_id, disassociate: 1 }) .success(function() { $('#prompt-modal').modal('hide'); - // @issue: OLD SEARCH - // $scope.search(form.related[set].iterator); }) .error(function(data, status) { $('#prompt-modal').modal('hide');