Filter revision hash to less than 7 characters

This commit is contained in:
Marliana Lara
2017-05-10 16:28:30 -04:00
parent 3065d0a935
commit 0bf28ffed8
3 changed files with 11 additions and 3 deletions

View File

@@ -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); buildTooltips(itm);
}); });

View File

@@ -49,7 +49,8 @@ export default ['i18n', function(i18n) {
label: i18n._('Revision'), label: i18n._('Revision'),
excludeModal: true, excludeModal: true,
columnClass: 'col-lg-4 col-md-2 col-sm-3 hidden-xs', 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: { last_updated: {
label: i18n._('Last Updated'), label: i18n._('Last Updated'),

View File

@@ -72,10 +72,10 @@
* *
* ##Field Actions * ##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. * 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 | * | Attribute | Description |
* | --------- | ----------- | * | --------- | ----------- |