diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js index 3db9145d61..9072497580 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.controller.js @@ -25,16 +25,5 @@ export default [ '$scope', 'Empty', 'Wait', 'GetBasePath', 'Rest', 'ProcessError } } }; - - $scope.viewJob = function(jobId, type) { - let outputType = 'playbook'; - - if (type === 'workflow_job') { - $state.go('workflowResults', { id: jobId}, { reload: true }); - } else { - $state.go('output', { id: jobId, type: outputType }); - } - }; - } ]; diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js index 82d598bfa6..0bfaaefddb 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/host-summary-popover/host-summary-popover.directive.js @@ -1,5 +1,5 @@ -export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n', - function(templateUrl, Wait, $filter, $compile, i18n) { +export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n', '$log', + function(templateUrl, Wait, $filter, $compile, i18n, $log) { return { restrict: 'E', replace: false, @@ -19,19 +19,20 @@ export default ['templateUrl', 'Wait', '$filter', '$compile', 'i18n', function attachElem(event, html, title) { var elem = $(event.target).parent(); + try { elem.tooltip('hide'); - elem.popover('destroy'); + elem.popover('dispose'); } catch(err) { - //ignore + $log.debug(error); } $('.popover').each(function() { // remove lingering popover
" + i18n._("Status") + " | "; - html += "" + i18n._("Finished") + " | "; - html += "" + i18n._("Name") + " | "; - html += "
---|
${i18n._("Status")} | +${i18n._("Finished")} | +${i18n._("Name")} | +
---|---|---|
\n"; - html += " | " + ($filter('longDate')(row.finished)) + " | "; - html += "" + $filter('sanitize')(ellipsis(row.name)) + " | "; - html += "
+ + + + | +${($filter('longDate')(row.finished))} | ++ ${$filter('sanitize')(ellipsis(row.name))} + | +
" + i18n._("No recent job data available for this inventory.") + "
\n"; + html = `${i18n._("No recent job data available for this inventory.")}
`; } + attachElem(event, html, title); }; diff --git a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js index ad91778a2d..0310e41146 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js +++ b/awx/ui/client/src/inventories-hosts/inventories/list/source-summary-popover/source-summary-popover.directive.js @@ -21,7 +21,7 @@ export default ['templateUrl', '$compile', 'Wait', '$filter', 'i18n', var elem = $(event.target).parent(); try { elem.tooltip('hide'); - elem.popover('destroy'); + elem.popover('dispose'); } catch(err) { //ignore diff --git a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js index cf19755e77..236e2b0146 100644 --- a/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js +++ b/awx/ui/client/src/organizations/linkout/controllers/organizations-inventories.controller.js @@ -84,7 +84,7 @@ export default ['$scope', '$rootScope', '$location', var elem = $(event.target).parent(); try { elem.tooltip('hide'); - elem.popover('destroy'); + elem.popover('dispose'); } catch (err) { //ignore } diff --git a/awx/ui/client/src/vendor.js b/awx/ui/client/src/vendor.js index febd93d6e7..ca174440b5 100644 --- a/awx/ui/client/src/vendor.js +++ b/awx/ui/client/src/vendor.js @@ -33,6 +33,7 @@ $.fn.btn = btn; // Whitelist table elements so they can be used in popovers $.fn.popover.Constructor.Default.whiteList.table = []; +$.fn.popover.Constructor.Default.whiteList.th = []; $.fn.popover.Constructor.Default.whiteList.tr = []; $.fn.popover.Constructor.Default.whiteList.td = []; $.fn.popover.Constructor.Default.whiteList.tbody = [];