Skip to content

Commit

Permalink
Fix loading route when host is part of cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
turtle0x1 committed Nov 9, 2021
1 parent 812fb9e commit 7293a67
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,17 @@
if(Object.keys(hostsAliasesLookupTable).length == 0 && match.data !== null && match.data.hasOwnProperty("hostId")){
ajaxRequest(globalUrls.universe.getEntities, {}, function(data){
data = $.parseJSON(data)
//TODO Clusters
let providedHostId = match.data.hostId;
$.each(data.clusters, function(_, cluster){
$.each(cluster.members, (_, member)=>{
hostsAliasesLookupTable[member.hostId] = member.alias
hostsIdsLookupTable[member.alias] = member.hostId
if(member.alias == providedHostId){
match.data.hostId = member.hostId
}
});
});

$.each(data.standalone.members, function(_, member){
hostsAliasesLookupTable[member.hostId] = member.alias
hostsIdsLookupTable[member.alias] = member.hostId
Expand Down

0 comments on commit 7293a67

Please sign in to comment.