Merge pull request #2325 from mempool/nymkappa/bugfix/isp-chart-ids
Fix missing isp ids on isp pie chart
This commit is contained in:
commit
b66cfa23a8
@ -296,19 +296,24 @@ class NodesApi {
|
|||||||
|
|
||||||
if (!ispList[isp1]) {
|
if (!ispList[isp1]) {
|
||||||
ispList[isp1] = {
|
ispList[isp1] = {
|
||||||
id: channel.isp1ID,
|
id: channel.isp1ID.toString(),
|
||||||
capacity: 0,
|
capacity: 0,
|
||||||
channels: 0,
|
channels: 0,
|
||||||
nodes: {},
|
nodes: {},
|
||||||
};
|
};
|
||||||
|
} else if (ispList[isp1].id.indexOf(channel.isp1ID) === -1) {
|
||||||
|
ispList[isp1].id += ',' + channel.isp1ID.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ispList[isp2]) {
|
if (!ispList[isp2]) {
|
||||||
ispList[isp2] = {
|
ispList[isp2] = {
|
||||||
id: channel.isp2ID,
|
id: channel.isp2ID.toString(),
|
||||||
capacity: 0,
|
capacity: 0,
|
||||||
channels: 0,
|
channels: 0,
|
||||||
nodes: {},
|
nodes: {},
|
||||||
};
|
};
|
||||||
|
} else if (ispList[isp2].id.indexOf(channel.isp2ID) === -1) {
|
||||||
|
ispList[isp2].id += ',' + channel.isp2ID.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
ispList[isp1].capacity += channel.capacity;
|
ispList[isp1].capacity += channel.capacity;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user