mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Removed extra search dialogs. Now there is only one host name filter, and it's wired up and working.
This commit is contained in:
@@ -286,7 +286,7 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
"padding-right": "15px",
|
"padding-right": "15px",
|
||||||
"z-index": 0
|
"z-index": 0
|
||||||
});
|
});
|
||||||
setTimeout(function() { $('#job-summary-container .job_well').height($('#job-detail-container').height() - 19); }, 500);
|
setTimeout(function() { $('#job-summary-container .job_well').height($('#job-detail-container').height() - 18); }, 500);
|
||||||
$('#job-summary-container').show();
|
$('#job-summary-container').show();
|
||||||
}
|
}
|
||||||
// Detail table height adjusting. First, put page height back to 'normal'.
|
// Detail table height adjusting. First, put page height back to 'normal'.
|
||||||
@@ -363,7 +363,7 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
}).show();
|
}).show();
|
||||||
|
|
||||||
// Adjust the summary table height
|
// Adjust the summary table height
|
||||||
$('#job-summary-container .job_well').height(height - 19).css({
|
$('#job-summary-container .job_well').height(height - 18).css({
|
||||||
'box-shadow': '-3px 3px 5px 0 #ccc'
|
'box-shadow': '-3px 3px 5px 0 #ccc'
|
||||||
});
|
});
|
||||||
height = Math.floor($('#job-detail-container').height() * 0.5) -
|
height = Math.floor($('#job-detail-container').height() * 0.5) -
|
||||||
@@ -572,55 +572,12 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
scope.searchTaskHosts = function() {
|
|
||||||
var url;
|
|
||||||
Wait('start');
|
|
||||||
scope.hostResults = [];
|
|
||||||
url = GetBasePath('jobs') + $routeParams.id + '/job_events/?parent=' + scope.activeTask;
|
|
||||||
url += (scope.task_host_name) ? '&host__name__icontains=' + scope.task_host_name : '';
|
|
||||||
url += '&host__name__isnull=false&page_size=' + scope.hostTableRows + '&order_by=host__name';
|
|
||||||
Rest.setUrl(url);
|
|
||||||
Rest.get()
|
|
||||||
.success(function(data) {
|
|
||||||
var i;
|
|
||||||
for (i = 0; i < data.results.length; i++) {
|
|
||||||
scope.hostResults.push({
|
|
||||||
id: data.results[i].id,
|
|
||||||
status: ( (data.results[i].failed) ? 'failed' : (data.results[i].changed) ? 'changed' : 'successful' ),
|
|
||||||
host_id: data.results[i].host,
|
|
||||||
task_id: data.results[i].parent,
|
|
||||||
name: data.results[i].summary_fields.host.name,
|
|
||||||
created: data.results[i].created,
|
|
||||||
msg: data.results[i].event_data.res.msg
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Wait('stop');
|
|
||||||
SelectHost({ scope: scope });
|
|
||||||
})
|
|
||||||
.error(function(data, status) {
|
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
|
||||||
msg: 'Call to ' + url + '. GET returned: ' + status });
|
|
||||||
});
|
|
||||||
if (scope.task_host_name) {
|
|
||||||
scope.searchTaskHostsEnabled = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
scope.searchTaskHostsEnabled = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
scope.taskHostNameKeyPress = function(e) {
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
scope.searchTaskHosts();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
scope.searchSummaryHosts = function() {
|
scope.searchSummaryHosts = function() {
|
||||||
var url;
|
var url;
|
||||||
Wait('start');
|
Wait('start');
|
||||||
scope.hosts = [];
|
scope.hosts = [];
|
||||||
url = GetBasePath('jobs') + $routeParams.id + '/job_host_summaries/?';
|
url = GetBasePath('jobs') + $routeParams.id + '/job_host_summaries/?';
|
||||||
url += (scope.summary_host_name) ? 'host__name__icontains=' + scope.summary_host_name + '&': '';
|
url += (scope.search_all_hosts_name) ? 'host__name__icontains=' + scope.search_all_hosts_name + '&': '';
|
||||||
url += 'page_size=' + scope.hostSummaryTableRows + '&order_by=host__name';
|
url += 'page_size=' + scope.hostSummaryTableRows + '&order_by=host__name';
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
@@ -637,27 +594,11 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
});
|
});
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
$('#hosts-summary-table').mCustomScrollbar("update");
|
$('#hosts-summary-table').mCustomScrollbar("update");
|
||||||
setTimeout( function() {
|
|
||||||
scope.auto_scroll = true;
|
|
||||||
$('#hosts-summary-table').mCustomScrollbar("scrollTo", "bottom");
|
|
||||||
}, 700);
|
|
||||||
})
|
})
|
||||||
.error(function(data, status) {
|
.error(function(data, status) {
|
||||||
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, null, { hdr: 'Error!',
|
||||||
msg: 'Call to ' + url + '. GET returned: ' + status });
|
msg: 'Call to ' + url + '. GET returned: ' + status });
|
||||||
});
|
});
|
||||||
if (scope.summary_host_name) {
|
|
||||||
scope.searchSummaryHostsEnabled = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
scope.searchSummaryHostsEnabled = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
scope.summaryHostNameKeyPress = function(e) {
|
|
||||||
if (e.keyCode === 13) {
|
|
||||||
scope.searchSummaryHosts();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
scope.searchAllByHost = function() {
|
scope.searchAllByHost = function() {
|
||||||
@@ -672,10 +613,11 @@ function JobDetailController ($scope, $compile, $routeParams, ClearScope, Breadc
|
|||||||
scope.search_all_tasks = [];
|
scope.search_all_tasks = [];
|
||||||
scope.search_all_plays = [];
|
scope.search_all_plays = [];
|
||||||
scope.searchAllHostsEnabled = true;
|
scope.searchAllHostsEnabled = true;
|
||||||
|
scope.activePlay = scope.plays[scope.plays.length - 1].id;
|
||||||
|
setTimeout(function() {
|
||||||
|
SelectPlay({ scope: scope, id: scope.activePlay });
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
scope.task_host_name = scope.search_all_hosts_name;
|
|
||||||
scope.searchTaskHosts();
|
|
||||||
scope.summary_host_name = scope.search_all_hosts_name;
|
|
||||||
scope.searchSummaryHosts();
|
scope.searchSummaryHosts();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -738,7 +738,7 @@ function(UpdatePlayStatus, UpdateHostStatus, UpdatePlayChild, AddHostResult, Sel
|
|||||||
//Wait('start');
|
//Wait('start');
|
||||||
scope.hostResults = [];
|
scope.hostResults = [];
|
||||||
url = GetBasePath('jobs') + $routeParams.id + '/job_events/?parent=' + id + '&';
|
url = GetBasePath('jobs') + $routeParams.id + '/job_events/?parent=' + id + '&';
|
||||||
url += (scope.task_host_name) ? 'host__name__icontains=' + scope.task_host_name + '&' : '';
|
url += (scope.search_all_hosts_name) ? 'host__name__icontains=' + scope.search_all_hosts_name + '&' : '';
|
||||||
url += 'host__isnull=false&page_size=' + scope.hostTableRows + '&order_by=host__name';
|
url += 'host__isnull=false&page_size=' + scope.hostTableRows + '&order_by=host__name';
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
|
|||||||
@@ -101,11 +101,11 @@
|
|||||||
<div id="task-hosts-section" class="section">
|
<div id="task-hosts-section" class="section">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">Hosts</div>
|
<div class="title">Hosts</div>
|
||||||
<div class="search-field">
|
<!-- <div class="search-field">
|
||||||
<input type="text" ng-model="task_host_name" placeholder="Host Name" ng-keypress="taskHostNameKeyPress($event)" />
|
<input type="text" ng-model="task_host_name" placeholder="Host Name" ng-keypress="taskHostNameKeyPress($event)" />
|
||||||
<a class="search-icon" ng-show="searchTaskHostsEnabled" ng-click="searchTaskHosts()"><i class="fa fa-search"></i></a>
|
<a class="search-icon" ng-show="searchTaskHostsEnabled" ng-click="searchTaskHosts()"><i class="fa fa-search"></i></a>
|
||||||
<a class="search-icon" ng-show="!searchTaskHostsEnabled" ng-click="task_host_name=''; searchTaskHosts()"><i class="fa fa-times"></i></a>
|
<a class="search-icon" ng-show="!searchTaskHostsEnabled" ng-click="task_host_name=''; searchTaskHosts()"><i class="fa fa-times"></i></a>
|
||||||
</div>
|
</div>!-->
|
||||||
</div>
|
</div>
|
||||||
<div id="hosts-table-detail" aw-custom-scroll data-on-total-scroll="HostDetailOnTotalScroll"
|
<div id="hosts-table-detail" aw-custom-scroll data-on-total-scroll="HostDetailOnTotalScroll"
|
||||||
data-on-total-scroll-back="HostDetailOnTotalScrollBack" class="table-detail">
|
data-on-total-scroll-back="HostDetailOnTotalScrollBack" class="table-detail">
|
||||||
@@ -141,10 +141,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="summary-search-section" class="section">
|
<div id="summary-search-section" class="section">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">Filter Events</div>
|
<div class="title">Filter Hosts</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
<div style="position:relative;">
|
<div style="position:relative;">
|
||||||
<input type="text" class="input-sm form-control" id="search_all_hosts_name" ng-model="search_all_hosts_name"
|
<input type="text" class="input-sm form-control" id="search_all_hosts_name" ng-model="search_all_hosts_name"
|
||||||
placeholder="Host Name" ng-disabled="searchAllDisabled" ng-keypress="allHostNameKeyPress($event)" />
|
placeholder="Host Name" ng-disabled="searchAllDisabled" ng-keypress="allHostNameKeyPress($event)" />
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
|
||||||
<div style="padding-top: 5px;">
|
<div style="padding-top: 5px;">
|
||||||
<label class="small-label">Show</label>
|
<label class="small-label">Show</label>
|
||||||
<div class="btn-group" aw-toggle-button>
|
<div class="btn-group" aw-toggle-button>
|
||||||
@@ -170,9 +170,9 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">Host Summary</div>
|
<div class="title">Host Summary</div>
|
||||||
<div class="search-field">
|
<div class="search-field">
|
||||||
<input type="text" ng-model="summary_host_name" placeholder="Host Name" ng-keypress="summaryHostNameKeyPress($event)" />
|
<!-- <input type="text" ng-model="summary_host_name" placeholder="Host Name" ng-keypress="summaryHostNameKeyPress($event)" />
|
||||||
<a class="search-icon" ng-show="searchSummaryHostsEnabled" ng-click="searchSummaryHosts()"><i class="fa fa-search"></i></a>
|
<a class="search-icon" ng-show="searchSummaryHostsEnabled" ng-click="searchSummaryHosts()"><i class="fa fa-search"></i></a>
|
||||||
<a class="search-icon" ng-show="!searchSummaryHostsEnabled" ng-click="summary_host_name=''; searchSummaryHosts()"><i class="fa fa-times"></i></a>
|
<a class="search-icon" ng-show="!searchSummaryHostsEnabled" ng-click="summary_host_name=''; searchSummaryHosts()"><i class="fa fa-times"></i></a> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend"><i class="fa fa-circle successful-hosts-color"></i> Successful <i class="fa fa-circle changed-hosts-color"></i> Changed
|
<div class="legend"><i class="fa fa-circle successful-hosts-color"></i> Successful <i class="fa fa-circle changed-hosts-color"></i> Changed
|
||||||
@@ -181,7 +181,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">Host</div>
|
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">Host</div>
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">Completed Tasks
|
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">Completed Tasks
|
||||||
<!-- <a href="" id="event-help-link" aw-pop-over="{{ eventsHelpText }}" aw-tool-tip="Click for help" aw-pop-over-watch="eventsHelpText" data-placement="top" data-container="body" data-title="Event Legend" class="help-link"><i class="fa fa-question-circle"></i></a> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user