Merge pull request #2624 from mabashian/2612-jt-scm

Limit the cred types that we show when adding creds to JT
This commit is contained in:
Michael Abashian 2018-07-24 14:24:03 -04:00 committed by GitHub
commit 21568f74c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {