mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
remove old search comments
This commit is contained in:
@@ -283,8 +283,6 @@ export default ['$scope', '$rootScope', '$compile', '$location',
|
|||||||
})
|
})
|
||||||
.success(function() {
|
.success(function() {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search(form.related[set].iterator);
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
|
|||||||
@@ -386,15 +386,6 @@ angular.module('CredentialsHelper', ['Utilities'])
|
|||||||
Rest.post(data)
|
Rest.post(data)
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
scope.addedItem = data.id;
|
scope.addedItem = data.id;
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// Refresh({
|
|
||||||
// scope: scope,
|
|
||||||
// set: 'credentials',
|
|
||||||
// iterator: 'credential',
|
|
||||||
// url: url
|
|
||||||
// });
|
|
||||||
|
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
var base = $location.path().replace(/^\//, '').split('/')[0];
|
var base = $location.path().replace(/^\//, '').split('/')[0];
|
||||||
if (base === 'credentials') {
|
if (base === 'credentials') {
|
||||||
|
|||||||
@@ -838,14 +838,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
parent_scope.removeAddTreeRefreshed();
|
parent_scope.removeAddTreeRefreshed();
|
||||||
}
|
}
|
||||||
parent_scope.removeAddTreeRefreshed = parent_scope.$on('GroupTreeRefreshed', function() {
|
parent_scope.removeAddTreeRefreshed = parent_scope.$on('GroupTreeRefreshed', function() {
|
||||||
// Clean up
|
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// if (modal_scope.searchCleanUp) {
|
|
||||||
// modal_scope.searchCleanup();
|
|
||||||
// }
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$('#group-modal-dialog').dialog('close');
|
$('#group-modal-dialog').dialog('close');
|
||||||
}
|
}
|
||||||
@@ -948,18 +941,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
catch(e) {
|
catch(e) {
|
||||||
//ignore
|
//ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// if (modal_scope.searchCleanup) {
|
|
||||||
// modal_scope.searchCleanup();
|
|
||||||
// }
|
|
||||||
// if (parent_scope.restoreSearch) {
|
|
||||||
// parent_scope.restoreSearch();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// Wait('stop');
|
|
||||||
// }
|
|
||||||
|
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -169,18 +169,6 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
|
|||||||
var scope = params.scope,
|
var scope = params.scope,
|
||||||
parent_scope = params.parent_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) {
|
if (scope.removeHostsReloadPostRefresh) {
|
||||||
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.removeHostCopyDialogReady();
|
||||||
}
|
}
|
||||||
scope.removeCopyDialogReady = scope.$on('HostCopyDialogReady', function() {
|
scope.removeCopyDialogReady = scope.$on('HostCopyDialogReady', function() {
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// var url = GetBasePath('inventory') + group_scope.inventory.id + '/groups/';
|
|
||||||
|
|
||||||
GenerateList.inject(GroupList, {
|
GenerateList.inject(GroupList, {
|
||||||
mode: 'lookup',
|
mode: 'lookup',
|
||||||
id: 'copy-host-select-container',
|
id: 'copy-host-select-container',
|
||||||
scope: scope
|
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) {
|
if (scope.removeShowDialog) {
|
||||||
@@ -348,12 +295,6 @@ return function(params) {
|
|||||||
catch(e) {
|
catch(e) {
|
||||||
// ignore
|
// 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();
|
scope.$destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -686,11 +686,6 @@ export default
|
|||||||
|
|
||||||
scope.plays = [];
|
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;
|
scope.playsLoading = true;
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
@@ -789,11 +784,6 @@ export default
|
|||||||
if (scope.selectedPlay) {
|
if (scope.selectedPlay) {
|
||||||
url = scope.job.url + 'job_tasks/?event_id=' + 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) {
|
scope.plays.every(function(p, idx) {
|
||||||
if (p.id === scope.selectedPlay) {
|
if (p.id === scope.selectedPlay) {
|
||||||
play = scope.plays[idx];
|
play = scope.plays[idx];
|
||||||
@@ -924,11 +914,6 @@ export default
|
|||||||
order: 'host_name,counter',
|
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){
|
JobDetailService.getRelatedJobEvents(scope.job.id, params).success(function(res){
|
||||||
scope.hostResults = JobDetailService.processHostEvents(res.results);
|
scope.hostResults = JobDetailService.processHostEvents(res.results);
|
||||||
scope.hostResultsLoading = false;
|
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 = Object.keys(filteredListB);
|
||||||
keys.sort(function(a,b) { return listSort(a,b); }).reverse();
|
keys.sort(function(a,b) { return listSort(a,b); }).reverse();
|
||||||
for (idx=0; idx < scope.playsMaxRows && idx < keys.length; idx++) {
|
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 = Object.keys(filteredListB);
|
||||||
keys.sort(function(a,b) { return listSort(a,b); }).reverse();
|
keys.sort(function(a,b) { return listSort(a,b); }).reverse();
|
||||||
newKeys = [];
|
newKeys = [];
|
||||||
@@ -1202,33 +1139,8 @@ export default
|
|||||||
if (scope.activePlay && scope.activeTask && scope.jobData.plays[scope.activePlay] &&
|
if (scope.activePlay && scope.activeTask && scope.jobData.plays[scope.activePlay] &&
|
||||||
scope.jobData.plays[scope.activePlay].tasks[scope.activeTask]) {
|
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;
|
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 = Object.keys(filteredListB);
|
||||||
keys.sort(function compare(a, b) {
|
keys.sort(function compare(a, b) {
|
||||||
if (filteredListB[a].name === filteredListB[b].name) {
|
if (filteredListB[a].name === filteredListB[b].name) {
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ export default
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// scope[iterator + 'SearchSpin'] = false;
|
|
||||||
|
|
||||||
scope[set] = results;
|
scope[set] = results;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,12 +38,6 @@ button.HostEvents-close{
|
|||||||
color: @skipped;
|
color: @skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// .HostEvents-search--form{
|
|
||||||
// max-width: 420px;
|
|
||||||
// display: inline-block;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.HostEvents-filter--form{
|
.HostEvents-filter--form{
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
|
|||||||
@@ -16,56 +16,11 @@
|
|||||||
$scope.processEventStatus = JobDetailService.processEventStatus;
|
$scope.processEventStatus = JobDetailService.processEventStatus;
|
||||||
$scope.activeFilter = $stateParams.filter || null;
|
$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'];
|
$scope.filters = ['all', 'changed', 'failed', 'ok', 'unreachable', 'skipped'];
|
||||||
|
|
||||||
// watch select2 for changes
|
// watch select2 for changes
|
||||||
$('.HostEvents-select').on("select2:select", function () {
|
$('.HostEvents-select').on("select2:select", function () {
|
||||||
$scope.activeFilter = $('.HostEvents-select').val();
|
$scope.activeFilter = $('.HostEvents-select').val();
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var init = function(){
|
var init = function(){
|
||||||
@@ -79,9 +34,6 @@
|
|||||||
if ($stateParams.filter){
|
if ($stateParams.filter){
|
||||||
$scope.activeFilter = $stateParams.filter;
|
$scope.activeFilter = $stateParams.filter;
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search();
|
|
||||||
|
|
||||||
$('#HostEvents').modal('show');
|
$('#HostEvents').modal('show');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@@ -10,20 +10,9 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="HostEvents-form--container">
|
<div class="HostEvents-form--container">
|
||||||
|
<select class="HostEvents-select">
|
||||||
<!-- @issue: OLD SEARCH -->
|
<option ng-selected="filter == activeFilter" class="HostEvents-select--option" value="{{filter}}" ng-repeat="filter in filters">{{filter}}</option>
|
||||||
<!-- <form ng-submit="search()" class="form-inline HostEvents-search--form">
|
</select>
|
||||||
<div class="form-group" >
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" ng-model="searchStr" class="form-control" placeholder="SEARCH">
|
|
||||||
<span ng-click="search()" type="submit" class="input-group-addon btn btn-default"><i class="fa fa-search"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form> -->
|
|
||||||
|
|
||||||
<select class="HostEvents-select">
|
|
||||||
<option ng-selected="filter == activeFilter" class="HostEvents-select--option" value="{{filter}}" ng-repeat="filter in filters">{{filter}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- event results table -->
|
<!-- event results table -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|||||||
@@ -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.setFilter = function(filter){
|
||||||
$scope.filter = filter;
|
$scope.filter = filter;
|
||||||
var getAll = function(){
|
var getAll = function(){
|
||||||
|
|||||||
@@ -149,18 +149,6 @@ export default
|
|||||||
scope.job_id = job_id;
|
scope.job_id = job_id;
|
||||||
scope.auto_scroll = false;
|
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.haltEventQueue = false;
|
||||||
scope.processing = false;
|
scope.processing = false;
|
||||||
scope.lessStatus = 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) {
|
if (scope.removeDeleteFinished) {
|
||||||
scope.removeDeleteFinished();
|
scope.removeDeleteFinished();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,14 +51,6 @@ export default
|
|||||||
//ignore
|
//ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// if (scope.searchCleanup) {
|
|
||||||
// scope.searchCleanup();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// Wait('stop');
|
|
||||||
// }
|
|
||||||
|
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -274,6 +266,7 @@ export default
|
|||||||
};
|
};
|
||||||
|
|
||||||
parent_scope.refreshJobs = function(){
|
parent_scope.refreshJobs = function(){
|
||||||
|
// TODO: what should I do here?
|
||||||
// @issue: OLD SEARCH
|
// @issue: OLD SEARCH
|
||||||
// scope.search(SchedulesList.iterator);
|
// scope.search(SchedulesList.iterator);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -121,9 +121,6 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
|
|||||||
Rest.post({ id: itm_id, disassociate: 1 })
|
Rest.post({ id: itm_id, disassociate: 1 })
|
||||||
.success(function() {
|
.success(function() {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
|
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search(form.related[set].iterator);
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
|
|||||||
@@ -118,11 +118,7 @@ export default ['$scope', '$rootScope', '$location', '$log',
|
|||||||
// And we found the affected project
|
// And we found the affected project
|
||||||
$log.debug('Received event for project: ' + project.name);
|
$log.debug('Received event for project: ' + project.name);
|
||||||
$log.debug('Status changed to: ' + data.status);
|
$log.debug('Status changed to: ' + data.status);
|
||||||
if (data.status === 'successful' || data.status === 'failed') {
|
if (!(data.status === 'successful' || data.status === 'failed')) {
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search(list.iterator, null, null, null, null, false);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
project.scm_update_tooltip = "SCM update currently running";
|
project.scm_update_tooltip = "SCM update currently running";
|
||||||
project.scm_type_class = "btn-disabled";
|
project.scm_type_class = "btn-disabled";
|
||||||
}
|
}
|
||||||
@@ -289,6 +285,7 @@ export default ['$scope', '$rootScope', '$location', '$log',
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.refresh = function() {
|
$scope.refresh = function() {
|
||||||
|
// TODO: what should I do here?
|
||||||
// @issue: OLD SEARCH
|
// @issue: OLD SEARCH
|
||||||
// $scope.search(list.iterator);
|
// $scope.search(list.iterator);
|
||||||
};
|
};
|
||||||
@@ -301,13 +298,7 @@ export default ['$scope', '$rootScope', '$location', '$log',
|
|||||||
}
|
}
|
||||||
$scope.projects.forEach(function(project) {
|
$scope.projects.forEach(function(project) {
|
||||||
if (project.id === project_id) {
|
if (project.id === project_id) {
|
||||||
if (project.scm_type === "Manual" || Empty(project.scm_type)) {
|
if (!((project.scm_type === "Manual" || Empty(project.scm_type)) || (project.status === 'updating' || project.status === 'running' || project.status === 'pending'))) {
|
||||||
// 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 {
|
|
||||||
ProjectUpdate({ scope: $scope, project_id: project.id });
|
ProjectUpdate({ scope: $scope, project_id: project.id });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,8 +227,6 @@ export default ['$scope', '$rootScope', '$compile', '$location', '$log',
|
|||||||
Rest.post({ id: itm_id, disassociate: 1 })
|
Rest.post({ id: itm_id, disassociate: 1 })
|
||||||
.success(function() {
|
.success(function() {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
// @issue: OLD SEARCH
|
|
||||||
// $scope.search(form.related[set].iterator);
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
|
|||||||
Reference in New Issue
Block a user