mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-14 00:21:01 +00:00
Working on map view
This commit is contained in:
@@ -120,8 +120,8 @@ export class Connection {
|
||||
}
|
||||
|
||||
case Actions.AddedNode: {
|
||||
const [id, nodeDetails, nodeStats, blockDetails] = message.payload;
|
||||
const node = { id, nodeDetails, nodeStats, blockDetails };
|
||||
const [id, nodeDetails, nodeStats, blockDetails, location] = message.payload;
|
||||
const node = { id, nodeDetails, nodeStats, blockDetails, location };
|
||||
|
||||
nodes.set(id, node);
|
||||
|
||||
@@ -134,6 +134,19 @@ export class Connection {
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.LocatedNode: {
|
||||
const [id, latitude, longitude] = message.payload;
|
||||
const node = nodes.get(id);
|
||||
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
node.location = [latitude, longitude];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Actions.ImportedBlock: {
|
||||
const [id, blockDetails] = message.payload;
|
||||
const node = nodes.get(id);
|
||||
|
||||
Reference in New Issue
Block a user