From 0bf28ffed8064baf34080d0217caca6528a8c6e8 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 10 May 2017 16:28:30 -0400 Subject: [PATCH] Filter revision hash to less than 7 characters --- .../client/src/projects/list/projects-list.controller.js | 7 +++++++ awx/ui/client/src/projects/projects.list.js | 3 ++- .../src/shared/list-generator/list-generator.factory.js | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/projects/list/projects-list.controller.js b/awx/ui/client/src/projects/list/projects-list.controller.js index e70c12f44d..4aef74979c 100644 --- a/awx/ui/client/src/projects/list/projects-list.controller.js +++ b/awx/ui/client/src/projects/list/projects-list.controller.js @@ -62,6 +62,13 @@ export default ['$scope', '$rootScope', '$log', 'Rest', 'Alert', }); } + if (list.fields.scm_revision && $scope.options && + $scope.options.hasOwnProperty('scm_revision')) { + console.log(list.fields.scm_revision); + itm.scm_revision = $filter('limitTo')(itm.scm_revision, 7, 0); + + } + buildTooltips(itm); }); diff --git a/awx/ui/client/src/projects/projects.list.js b/awx/ui/client/src/projects/projects.list.js index a4700a3acf..c920afa801 100644 --- a/awx/ui/client/src/projects/projects.list.js +++ b/awx/ui/client/src/projects/projects.list.js @@ -49,7 +49,8 @@ export default ['i18n', function(i18n) { label: i18n._('Revision'), excludeModal: true, columnClass: 'col-lg-4 col-md-2 col-sm-3 hidden-xs', - class: 'List-staticColumnAdjacent--monospace' + class: 'List-staticColumnAdjacent--monospace', + ngBind: 'project.scm_revision' }, last_updated: { label: i18n._('Last Updated'), diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js index dea1d2383c..eade5fe6da 100644 --- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js +++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js @@ -72,10 +72,10 @@ * * ##Field Actions * - * A list contains a fieldActions object. Each icon found in the Actions column is defined as an object within the feildActions object. fieldActions can have a columnClass attribute, + * A list contains a fieldActions object. Each icon found in the Actions column is defined as an object within the fieldActions object. fieldActions can have a columnClass attribute, * which may contain a string of CSS class names to add to the action <td> element. It may also contain a label attribute, which can be set to false to suppress the Actions column header. * - * Feld action items can have the following attributes: + * Field action items can have the following attributes: * * | Attribute | Description | * | --------- | ----------- |