Limit the cred types that we show when adding creds to JT

This commit is contained in:
mabashian 2018-07-20 11:06:49 -04:00
parent 2e55b7a4ee
commit 3f6f6a4b7d

View File

@ -100,7 +100,14 @@ function multiCredentialModalController(GetBasePath, qs, MultiCredentialService)
scope.credentials = scope.credential_dataset.results;
scope.credentialType = getInitialCredentialType();
scope.displayedCredentialTypes = scope.credentialTypes;
scope.displayedCredentialTypes = [];
scope.credentialTypes.forEach((credentialType => {
if(credentialType.kind
.match(/^(machine|cloud|net|ssh|vault)$/)) {
scope.displayedCredentialTypes.push(credentialType);
}
}));
const watchType = scope.$watch('credentialType', (newValue, oldValue) => {
if (newValue !== oldValue) {