Peers table changes
This commit is contained in:
parent
372c5bd25b
commit
ce125b0d8a
@ -234,12 +234,15 @@
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="peer_mobile_table" *ngFor="let peer of peers">
|
||||
<div [ngClass]="{peer_mobile_table : true, hght_40: peeritem.id != clickPeer }" id="peer_{{peer.id}}" #peeritem *ngFor="let peer of peers">
|
||||
|
||||
<div class="row peer_table_data">
|
||||
<div class="col-6 col-md-3 tble_col">
|
||||
<div class="block_div">
|
||||
<span class="expnd_blck"><i class="fa fa-plus"></i></span>
|
||||
<span *ngIf="peeritem.id != clickPeer"
|
||||
(click)="onClickPeerPlus(peer.id);" class="expnd_blck"><i class="fa fa-plus"></i></span>
|
||||
<span *ngIf="peeritem.id == clickPeer" (click)="onClickPeerMinus(peer.id);"
|
||||
class="expnd_blck"><i class="fa fa-minus"></i></span>
|
||||
<h6>Capabilities</h6>
|
||||
<span class="blck_value">{{ peer.capabilities.bits }} bits</span>
|
||||
</div>
|
||||
|
@ -15,6 +15,7 @@ export class LatestblocksComponent implements OnInit {
|
||||
public hashvalues: any;
|
||||
public pagedata: any = [];
|
||||
public clickValue: any;
|
||||
public clickPeer: any;
|
||||
public beforeClick: boolean = false;
|
||||
public clickonMobile: boolean = true;
|
||||
public peers: any;
|
||||
@ -60,7 +61,7 @@ export class LatestblocksComponent implements OnInit {
|
||||
|
||||
console.log('this.peers',this.peers);
|
||||
});
|
||||
this.peers = [{"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"54.233.177.64:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"95.216.102.217:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"90.190.172.177:3414","direction":"Outbound","total_difficulty":{"cuckaroo":2,"cuckatoo":2,"randomx":1024,"progpow":256},"height":0},{"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"67.189.82.196:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"167.71.72.2:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10}];
|
||||
this.peers = [{"id": 1,"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"54.233.177.64:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"id": 2,"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"95.216.102.217:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"id": 3,"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"90.190.172.177:3414","direction":"Outbound","total_difficulty":{"cuckaroo":2,"cuckatoo":2,"randomx":1024,"progpow":256},"height":0},{"id": 4,"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"67.189.82.196:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10},{"id": 5,"capabilities":{"bits":15},"user_agent":"MW/Epic 1.0.0","version":1,"addr":"167.71.72.2:3414","direction":"Outbound","total_difficulty":{"cuckaroo":1630,"cuckatoo":706,"randomx":138024,"progpow":49792},"height":10}];
|
||||
}
|
||||
|
||||
|
||||
@ -73,4 +74,13 @@ export class LatestblocksComponent implements OnInit {
|
||||
public onClickMinus(height) {
|
||||
this.clickValue = 0;
|
||||
}
|
||||
|
||||
public onClickPeerPlus(id) {
|
||||
// this.beforeClick = true;
|
||||
this.clickPeer = 'peer_' + id;
|
||||
}
|
||||
|
||||
public onClickPeerMinus(id) {
|
||||
this.clickPeer = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user