Add support for new endpoint key string 'gateway' (#4954)

This commit is contained in:
Gene Lee
2019-04-09 15:19:02 -07:00
committed by GitHub
parent ea8f885f05
commit b3be1d79cd
4 changed files with 16 additions and 5 deletions

View File

@@ -481,7 +481,10 @@ export class CellModel implements ICellModel {
if (serverInfo && serverInfo.options && serverInfo.options['clusterEndpoints']) {
let endpoints: notebookUtils.IEndpoint[] = serverInfo.options['clusterEndpoints'];
if (endpoints && endpoints.length > 0) {
endpoint = endpoints.find(ep => ep.serviceName.toLowerCase() === 'knox');
endpoint = endpoints.find(ep => {
let serviceName: string = ep.serviceName.toLowerCase();
return serviceName === 'knox' || serviceName === 'gateway';
});
}
}
}