diff --git a/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js b/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js index 423db0eceb..6a3e1ba13e 100644 --- a/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js +++ b/awx/ui/client/src/access/add-rbac-user-team/rbac-selected-list.directive.js @@ -7,10 +7,10 @@ /* jshint unused: vars */ export default ['$compile', 'i18n', 'generateList', 'ProjectList', 'TemplateList', 'InventoryList', 'CredentialList', - 'OrganizationList', + 'OrganizationList', '$window', function($compile, i18n, generateList, ProjectList, TemplateList, InventoryList, CredentialList, - OrganizationList) { + OrganizationList, $window) { return { restrict: 'E', scope: { @@ -60,6 +60,7 @@ export default ['$compile', 'i18n', 'generateList', name: list.fields.name }; list.fields.name.columnClass = 'col-md-5 col-sm-5 col-xs-10'; + list.fields.name.ngClick = 'linkoutResource("job_template", job_template)'; break; case 'workflow_templates': list.name = 'workflow_job_templates'; @@ -68,6 +69,7 @@ export default ['$compile', 'i18n', 'generateList', name: list.fields.name }; list.fields.name.columnClass = 'col-md-5 col-sm-5 col-xs-10'; + list.fields.name.ngClick = 'linkoutResource("workflow_job_template", workflow_job_template)'; break; case 'credentials': case 'organizations': @@ -126,6 +128,40 @@ export default ['$compile', 'i18n', 'generateList', multiselect_scope[type][deselectedIdx].isSelected = false; }; + scope.linkoutResource = function(type, resource) { + + let url; + + switch(type){ + case 'project': + url = "/#/projects/" + resource.id; + break; + case 'inventory': + url = resource.kind && resource.kind === "smart" ? "/#/inventories/smart/" + resource.id : "/#/inventories/inventory/" + resource.id; + break; + case 'job_template': + url = "/#/templates/job_template/" + resource.id; + break; + case 'workflow_job_template': + url = "/#/templates/workflow_job_template/" + resource.id; + break; + case 'user': + url = "/#/users/" + resource.id; + break; + case 'team': + url = "/#/teams/" + resource.id; + break; + case 'organization': + url = "/#/organizations/" + resource.id; + break; + case 'credential': + url = "/#/credentials/" + resource.id; + break; + } + + $window.open(url,'_blank'); + }; + element.append(list_html); $compile(element.contents())(scope); } diff --git a/awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js b/awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js index 02017f4c7f..1c280970b7 100644 --- a/awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js +++ b/awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js @@ -71,7 +71,6 @@ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateL }; list.fields.name.ngClick = 'linkoutResource("job_template", job_template)'; list.fields.name.columnClass = 'col-md-6 col-sm-6 col-xs-11'; - list.fields.name.ngHref = '#/templates/job_template/{{job_template.id}}'; break; case 'WorkflowTemplates': @@ -83,7 +82,6 @@ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateL }; list.fields.name.ngClick = 'linkoutResource("workflow_job_template", workflow_template)'; list.fields.name.columnClass = 'col-md-6 col-sm-6 col-xs-11'; - list.fields.name.ngHref = '#/templates/workflow_job_template/{{workflow_template.id}}'; break; case 'Users': list.fields = { diff --git a/awx/ui/client/src/credential-types/credential-types.list.js b/awx/ui/client/src/credential-types/credential-types.list.js index a32be91ece..2e70ad9280 100644 --- a/awx/ui/client/src/credential-types/credential-types.list.js +++ b/awx/ui/client/src/credential-types/credential-types.list.js @@ -21,7 +21,7 @@ export default ['i18n', function(i18n){ label: i18n._('Name'), columnClass: 'col-md-3 col-sm-9 col-xs-9', modalColumnClass: 'col-md-8', - awToolTip: '{{credential_type.description}}', + awToolTip: '{{credential_type.description | sanitize}}', dataPlacement: 'top' }, kind: { diff --git a/awx/ui/client/src/credentials/credentials.list.js b/awx/ui/client/src/credentials/credentials.list.js index 2ca40d2840..36f87541a7 100644 --- a/awx/ui/client/src/credentials/credentials.list.js +++ b/awx/ui/client/src/credentials/credentials.list.js @@ -26,7 +26,7 @@ export default ['i18n', function(i18n) { label: i18n._('Name'), columnClass: 'col-md-3 col-sm-9 col-xs-9', modalColumnClass: 'col-md-12', - awToolTip: '{{credential.description}}', + awToolTip: '{{credential.description | sanitize}}', dataPlacement: 'top' }, kind: { diff --git a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js index f1175316f4..233dcaa7f9 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/inventory.list.js @@ -47,7 +47,7 @@ export default ['i18n', function(i18n) { label: i18n._('Name'), columnClass: 'col-md-4 col-sm-3 col-xs-6 List-staticColumnAdjacent', modalColumnClass: 'col-md-12', - awToolTip: "{{ inventory.description }}", + awToolTip: "{{ inventory.description | sanitize }}", awTipPlacement: "top", ngClick: 'editInventory(inventory)' }, diff --git a/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js b/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js index 6c2a9a775b..d81977d49d 100644 --- a/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js +++ b/awx/ui/client/src/inventory-scripts/inventory-scripts.list.js @@ -20,7 +20,7 @@ export default ['i18n', function(i18n){ label: i18n._('Name'), columnClass: 'col-md-3 col-sm-9 col-xs-9', modalColumnClass: 'col-md-8', - awToolTip: '{{inventory_script.description}}', + awToolTip: '{{inventory_script.description | sanitize}}', dataPlacement: 'top' }, organization: { diff --git a/awx/ui/client/src/management-jobs/management-jobs.list.js b/awx/ui/client/src/management-jobs/management-jobs.list.js index 22474d0461..4d0b1eb573 100644 --- a/awx/ui/client/src/management-jobs/management-jobs.list.js +++ b/awx/ui/client/src/management-jobs/management-jobs.list.js @@ -16,7 +16,7 @@ export default function(){ name: { label: 'Name', columnClass: 'col-sm-4 col-xs-4', - awToolTip: '{{configure_job.description}}', + awToolTip: '{{configure_job.description | sanitize}}', dataPlacement: 'top' } }, diff --git a/awx/ui/client/src/notifications/notificationTemplates.list.js b/awx/ui/client/src/notifications/notificationTemplates.list.js index c90b93db5c..fc0b3dd484 100644 --- a/awx/ui/client/src/notifications/notificationTemplates.list.js +++ b/awx/ui/client/src/notifications/notificationTemplates.list.js @@ -32,7 +32,7 @@ export default ['i18n', function(i18n){ label: i18n._('Name'), columnClass: 'col-md-3 col-sm-9 col-xs-9', linkTo: '/#/notification_templates/{{notification_template.id}}', - awToolTip: '{{notification_template.description}}', + awToolTip: '{{notification_template.description | sanitize}}', dataPlacement: 'top' }, notification_type: { diff --git a/awx/ui/client/src/organizations/list/organizations-list.partial.html b/awx/ui/client/src/organizations/list/organizations-list.partial.html index d5c61e4370..3180fdc8d8 100644 --- a/awx/ui/client/src/organizations/list/organizations-list.partial.html +++ b/awx/ui/client/src/organizations/list/organizations-list.partial.html @@ -52,9 +52,9 @@ ng-repeat="card in orgCards track by card.id">