the ip is now available in the appdb

This commit is contained in:
Girish Ramakrishnan
2020-12-03 11:48:25 -08:00
parent 9789ae3374
commit ce86cb892d
3 changed files with 52 additions and 19 deletions

View File

@@ -514,6 +514,18 @@ function getByIpAddress(ip, callback) {
// this is only used by the ldap test. the apps tests still uses proper docker
if (constants.TEST && exports._MOCK_GET_BY_IP_APP_ID) return get(exports._MOCK_GET_BY_IP_APP_ID, callback);
appdb.getByIpAddress(ip, function (error, app) {
if (error) return callback(error);
getDomainObjectMap(function (error, domainObjectMap) {
if (error) return callback(error);
postProcess(app, domainObjectMap);
callback(null, app);
});
});
docker.getContainerIdByIp(ip, function (error, containerId) {
if (error) return callback(error);