Add kind column to credential list

* Populate kind column with credential_type name
* Fix replace/revert input group button sizing
This commit is contained in:
gconsidine
2017-07-18 14:39:56 -04:00
parent 415c80a279
commit 6fa3872c86
7 changed files with 28 additions and 11 deletions

View File

@@ -9,7 +9,6 @@
export default ['i18n', function(i18n) {
return {
name: 'credentials',
iterator: 'credential',
selectTitle: i18n._('Add Credentials'),
@@ -31,8 +30,8 @@ export default ['i18n', function(i18n) {
dataPlacement: 'top'
},
kind: {
label: i18n._('Type'),
ngBind: 'credential.kind_label',
label: i18n._('Kind'),
ngBind: 'credential.kind',
excludeModal: true,
nosort: true,
columnClass: 'col-md-2 hidden-sm hidden-xs'

View File

@@ -4,11 +4,11 @@
* All Rights Reserved
*************************************************/
export default ['$scope', 'Rest', 'CredentialList', 'Prompt',
'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset', 'i18n',
export default ['$scope', 'Rest', 'CredentialList', 'Prompt', 'ProcessErrors', 'GetBasePath',
'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset', 'credentialType', 'i18n',
function($scope, Rest, CredentialList, Prompt,
ProcessErrors, GetBasePath, Wait, $state, $filter, rbacUiControlService, Dataset,
i18n) {
credentialType, i18n) {
var list = CredentialList,
defaultUrl = GetBasePath('credentials');
@@ -27,6 +27,10 @@ export default ['$scope', 'Rest', 'CredentialList', 'Prompt',
$scope[list.name] = $scope[`${list.iterator}_dataset`].results;
$scope.selected = [];
$scope[list.name].forEach(credential => {
credential.kind = credentialType.getById(credential.credential_type).name;
});
}
$scope.$on(`${list.iterator}_options`, function(event, data){