1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Remove remaining links to job_events and job_host_summaries

Removed links found in fly-outs on inventories, inventory detail hosts, home/groups and home/hosts.
This commit is contained in:
Chris Houseknecht 2014-07-14 15:41:00 -04:00
parent 6ee61d6c72
commit b4904a4065
5 changed files with 27 additions and 24 deletions

View File

@ -179,7 +179,7 @@ function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, Lo
// close any lingering tool tipss
$(this).hide();
});
elem.attr({ "aw-pop-over": html, "data-title": title, "data-placement": "right" });
elem.attr({ "aw-pop-over": html, "data-popover-title": title, "data-placement": "right" });
$compile(elem)(scope);
elem.on('shown.bs.popover', function() {
$('.popover').each(function() {
@ -428,27 +428,26 @@ function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, Lo
scope.removeHostSummaryReady();
}
scope.removeHostSummaryReady = scope.$on('HostSummaryReady', function(e, event, data) {
var html, title = "Recent Jobs", url = GetBasePath('jobs');
var html, title = "Recent Jobs";
Wait('stop');
if (data.length > 0) {
html = "<table class=\"table table-condensed flyout\" style=\"width: 100%\">\n";
html += "<thead>\n";
html += "<tr>";
html += "<th>Status</th>";
html += "<th>View</th>";
html += "<th>Finished</th>";
html += "<th>Name</th>";
html += "</tr>\n";
html += "</thead>\n";
html += "<tbody>\n";
data.forEach(function(row) {
html += "<tr>\n";
html += "<td><a ng-click=\"viewJob('" + url + row.id + "/')\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\"><i class=\"fa icon-job-" +
row.status + "\"></i></a></td>\n";
//html += "<td>" + ($filter('date')(row.finished,'MM/dd HH:mm:ss')).replace(/ /,'<br />') + "</td>";
html += "<td><a href=\"/#/job_events/" + row.id + "\">Events</a><br />" +
"<a href=\"/#/job_host_summaries/" + row.id + "\">Hosts</a></td>";
html += "<td><a href=\"\" ng-click=\"viewJob('" + url + row.id + "/')\" >" + ellipsis(row.name) + "</a></td>";
html += "<td>" + ($filter('date')(row.finished,'MM/dd HH:mm:ss')).replace(/ /,'<br />') + "</td>";
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\">" + ellipsis(row.name) + "</a></td>";
html += "</tr>\n";
});
html += "</tbody>\n";
@ -536,7 +535,8 @@ function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, Lo
jobs.push({
id: host.last_job,
status: host.summary_fields.last_job.status,
name: host.summary_fields.last_job.name
name: host.summary_fields.last_job.name,
finished: host.summary_fields.last_job.finished
});
}
});

View File

@ -46,7 +46,7 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
// close any lingering tool tipss
$(this).hide();
});
elem.attr({ "aw-pop-over": html, "data-title": title, "data-placement": "right" });
elem.attr({ "aw-pop-over": html, "data-popover-title": title, "data-placement": "right" });
$compile(elem)($scope);
elem.on('shown.bs.popover', function() {
$('.popover').each(function() {
@ -185,7 +185,6 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
html += "<tr>";
html += "<th>Status</th>";
html += "<th>Finished</th>";
html += "<th>View</th>";
html += "<th>Name</th>";
html += "</tr>\n";
html += "</thead>\n";
@ -193,13 +192,11 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $com
data.results.forEach(function(row) {
html += "<tr>\n";
html += "<td><a ng-click=\"viewJob('" + row.url + "')\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\"><i class=\"fa icon-job-" +
row.status + "\"></i></a></td>\n";
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\"><i class=\"fa icon-job-" + row.status + "\"></i></a></td>\n";
html += "<td>" + ($filter('date')(row.finished,'MM/dd HH:mm:ss')).replace(/ /,'<br />') + "</td>";
html += "<td><a href=\"/#/job_events/" + row.id + "\">Events</a><br />" +
"<a href=\"/#/job_host_summaries/" + row.id + "\">Hosts</a></td>";
html += "<td><a href=\"\" ng-click=\"viewJob('" + row.url + "')\" >" + ellipsis(row.name) + "</a></td>";
html += "<td><a href=\"#/jobs/" + row.id + "\" " + "aw-tool-tip=\"" + row.status.charAt(0).toUpperCase() + row.status.slice(1) +
". Click for details\" aw-tip-placement=\"top\">" + ellipsis(row.name) + "</a></td>";
html += "</tr>\n";
});
html += "</tbody>\n";

View File

@ -56,7 +56,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
};
}])
.factory('SetStatus', ['SetEnabledMsg', 'Empty', function(SetEnabledMsg, Empty) {
.factory('SetStatus', ['$filter', 'SetEnabledMsg', 'Empty', function($filter, SetEnabledMsg, Empty) {
return function(params) {
var scope = params.scope,
@ -100,7 +100,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
html += "<thead>\n";
html += "<tr>\n";
html += "<th>Status</th>\n";
html += "<th>View</th>\n";
html += "<th>Finished</th>\n";
html += "<th>Name</th>\n";
html += "</tr>\n";
html += "</thead>\n";
@ -108,13 +108,18 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
for (j=0; j < jobs.length; j++) {
job = jobs[j];
html += "<tr>\n";
html += "<td><a ng-click=\"viewJob(" + job.id + ")\" " +
html += "<td><a href=\"#/jobs/" + job.id + "\" " +
"aw-tool-tip=\"" + job.status.charAt(0).toUpperCase() + job.status.slice(1) +
". Click for details\" data-placement=\"top\"><i class=\"fa icon-job-" +
job.status + "\"></i></a></td>\n";
html += "<td><a href=\"/#/job_events/" + job.id + "/?host=" + encodeURI(host.name) + "\">Events</a><br />" +
"<a href=\"/#/job_host_summaries/" + job.id + "/?host_name=" + encodeURI(host.name) + "\">Hosts</a></td>\n";
html += "<td class=\"break\">" + ellipsis(job.name) + "</td>\n";
html += "<td>" + ($filter('date')(job.finished,'MM/dd HH:mm:ss')).replace(/ /,'<br />') + "</td>\n";
html += "<td class=\"break\"><a href=\"#/jobs/" + job.id + "\" " +
"aw-tool-tip=\"" + job.status.charAt(0).toUpperCase() + job.status.slice(1) +
". Click for details\" data-placement=\"top\">" + ellipsis(job.name) + "</a></td>\n";
html += "</tr>\n";
}
html += "</tbody>\n";

View File

@ -27,10 +27,10 @@ angular.module('HomeHostListDefinition', [])
iconOnly: true,
icon: "{{ 'icon-job-' + host.active_failures }}",
awToolTip: "{{ host.badgeToolTip }}",
dataTitle: "{{ host.job_status_title }}",
awTipPlacement: "top",
dataPlacement: "right",
awPopOver: "{{ host.job_status_html }}",
dataTitle: "{{ host.job_status_title }}",
ngClick:"bob",
columnClass: "col-md-1 col-sm-2 col-xs-3",
searchable: false,

View File

@ -499,6 +499,7 @@ angular.module('GeneratorHelpers', [])
if (field.awPopOver) {
html += "aw-pop-over=\"" + field.awPopOver + "\" ";
html += (field.dataPlacement) ? "data-placement=\"" + field.dataPlacement + "\" " : "";
html += (field.dataTitle) ? "data-title=\"" + field.dataTitle + "\" " : "";
}
html += (field.ngClass) ? Attr(field, 'ngClass') : '';
html += (field.ngEllipsis) ? "data-ng-bind=\"" + list.iterator + "." + fld + "\" data-ellipsis " : "";